From 38a058d7af6e43eb27bb3b8ce34472a0235085fd Mon Sep 17 00:00:00 2001 From: Yury Bondarenko Date: Wed, 1 Feb 2023 13:10:37 +0100 Subject: [PATCH 0001/1529] Add configuration option to disable inlined CSS in SSR HTML When inlining CSS, Angular Universal needs to extract critical styles. This seems to take up a significant chunk of processing time. However, loading may appear less smooth when this feature is disabled. Added to the configuration to make it easier to A/B test this without a full re-build. --- server.ts | 1 + src/config/universal-config.interface.ts | 9 +++++++++ src/environments/environment.production.ts | 3 ++- src/environments/environment.ts | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/server.ts b/server.ts index 81137ad56a..b65fb177b7 100644 --- a/server.ts +++ b/server.ts @@ -116,6 +116,7 @@ export function app() { server.engine('html', (_, options, callback) => ngExpressEngine({ bootstrap: ServerAppModule, + inlineCriticalCss: environment.universal.inlineCriticalCss, providers: [ { provide: REQUEST, diff --git a/src/config/universal-config.interface.ts b/src/config/universal-config.interface.ts index c088dcd657..3ff68fea66 100644 --- a/src/config/universal-config.interface.ts +++ b/src/config/universal-config.interface.ts @@ -4,4 +4,13 @@ export interface UniversalConfig extends Config { preboot: boolean; async: boolean; time: boolean; + + /** + * Whether to inline "critical" styles into the server-side rendered HTML. + * + * Determining which styles are critical is a relatively expensive operation; + * this option can be disabled to boost server performance at the expense of + * loading smoothness. + */ + inlineCriticalCss?; } diff --git a/src/environments/environment.production.ts b/src/environments/environment.production.ts index 09b5f19ade..7dd9bd2aa3 100644 --- a/src/environments/environment.production.ts +++ b/src/environments/environment.production.ts @@ -7,6 +7,7 @@ export const environment: Partial = { universal: { preboot: true, async: true, - time: false + time: false, + inlineCriticalCss: true, } }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index dc0e808be0..10f71618e1 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -12,7 +12,8 @@ export const environment: Partial = { universal: { preboot: false, async: true, - time: false + time: false, + inlineCriticalCss: true, } }; From 3a48ed390b832c1a0a953284f6449678b2e8d361 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 5 Jul 2023 18:03:25 +0300 Subject: [PATCH 0002/1529] src/app: fix path to deny-request-copy component The themed-deny-request-copy.component erroneously includes the cus- tom theme's deny-request-copy component instead of its own. Closes: https://github.com/DSpace/dspace-angular/issues/2351 --- .../deny-request-copy/themed-deny-request-copy.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts b/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts index 664e4c541b..1539d49622 100644 --- a/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts +++ b/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; import { ThemedComponent } from 'src/app/shared/theme-support/themed.component'; -import { DenyRequestCopyComponent } from 'src/themes/custom/app/request-copy/deny-request-copy/deny-request-copy.component'; +import { DenyRequestCopyComponent } from './deny-request-copy.component'; /** * Themed wrapper for deny-request-copy.component From 7bf4da55cf8cb7017ce5c1b096e14df3d69eeff8 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 7 Jul 2023 11:56:47 -0500 Subject: [PATCH 0003/1529] Enable Pull Request Opened action to assign PRs to their creator --- .../pull_request_opened.yml | 26 ------------------- .github/workflows/pull_request_opened.yml | 24 +++++++++++++++++ 2 files changed, 24 insertions(+), 26 deletions(-) delete mode 100644 .github/disabled-workflows/pull_request_opened.yml create mode 100644 .github/workflows/pull_request_opened.yml diff --git a/.github/disabled-workflows/pull_request_opened.yml b/.github/disabled-workflows/pull_request_opened.yml deleted file mode 100644 index 0dc718c0b9..0000000000 --- a/.github/disabled-workflows/pull_request_opened.yml +++ /dev/null @@ -1,26 +0,0 @@ -# This workflow runs whenever a new pull request is created -# TEMPORARILY DISABLED. Unfortunately this doesn't work for PRs created from forked repositories (which is how we tend to create PRs). -# There is no known workaround yet. See https://github.community/t/how-to-use-github-token-for-prs-from-forks/16818 -name: Pull Request opened - -# Only run for newly opened PRs against the "main" branch -on: - pull_request: - types: [opened] - branches: - - main - -jobs: - automation: - runs-on: ubuntu-latest - steps: - # Assign the PR to whomever created it. This is useful for visualizing assignments on project boards - # See https://github.com/marketplace/actions/pull-request-assigner - - name: Assign PR to creator - uses: thomaseizinger/assign-pr-creator-action@v1.0.0 - # Note, this authentication token is created automatically - # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - # Ignore errors. It is possible the PR was created by someone who cannot be assigned - continue-on-error: true diff --git a/.github/workflows/pull_request_opened.yml b/.github/workflows/pull_request_opened.yml new file mode 100644 index 0000000000..9b61af72d1 --- /dev/null +++ b/.github/workflows/pull_request_opened.yml @@ -0,0 +1,24 @@ +# This workflow runs whenever a new pull request is created +name: Pull Request opened + +# Only run for newly opened PRs against the "main" or maintenance branches +# We allow this to run for `pull_request_target` so that github secrets are available +# (This is required to assign a PR back to the creator when the PR comes from a forked repo) +on: + pull_request_target: + types: [ opened ] + branches: + - main + - 'dspace-**' + +permissions: + pull-requests: write + +jobs: + automation: + runs-on: ubuntu-latest + steps: + # Assign the PR to whomever created it. This is useful for visualizing assignments on project boards + # See https://github.com/toshimaru/auto-author-assign + - name: Assign PR to creator + uses: toshimaru/auto-author-assign@v1.6.2 From a484379f69af39a6b1b83aaa310f95b47671c1f9 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 7 Jul 2023 11:56:54 -0500 Subject: [PATCH 0004/1529] Ensure codescan and label_merge_conflicts run on maintenance branches --- .github/workflows/codescan.yml | 10 +++++++--- .github/workflows/label_merge_conflicts.yml | 7 ++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/codescan.yml b/.github/workflows/codescan.yml index 35a2e2d24a..8b415296c7 100644 --- a/.github/workflows/codescan.yml +++ b/.github/workflows/codescan.yml @@ -5,12 +5,16 @@ # because CodeQL requires a fresh build with all tests *disabled*. name: "Code Scanning" -# Run this code scan for all pushes / PRs to main branch. Also run once a week. +# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week. on: push: - branches: [ main ] + branches: + - main + - 'dspace-**' pull_request: - branches: [ main ] + branches: + - main + - 'dspace-**' # Don't run if PR is only updating static documentation paths-ignore: - '**/*.md' diff --git a/.github/workflows/label_merge_conflicts.yml b/.github/workflows/label_merge_conflicts.yml index c1396b6f45..7ea3327741 100644 --- a/.github/workflows/label_merge_conflicts.yml +++ b/.github/workflows/label_merge_conflicts.yml @@ -1,11 +1,12 @@ # This workflow checks open PRs for merge conflicts and labels them when conflicts are found name: Check for merge conflicts -# Run whenever the "main" branch is updated -# NOTE: This means merge conflicts are only checked for when a PR is merged to main. +# Run this for all pushes (i.e. merges) to 'main' or maintenance branches on: push: - branches: [ main ] + branches: + - main + - 'dspace-**' # So that the `conflict_label_name` is removed if conflicts are resolved, # we allow this to run for `pull_request_target` so that github secrets are available. pull_request_target: From 1809f0585c833631f5f36d0e45c47fc9e01000cd Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 7 Jul 2023 12:05:56 -0500 Subject: [PATCH 0005/1529] Split docker images into separate jobs to run in parallel. Ensure 'main' codebase is tagged as 'latest' --- .github/workflows/docker.yml | 84 ++++++++++++++++++++++++------------ 1 file changed, 57 insertions(+), 27 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 9a2c838d83..0c36d5af98 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -15,29 +15,35 @@ on: permissions: contents: read # to fetch code (actions/checkout) + +env: + # Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action) + # For a new commit on default branch (main), use the literal tag 'latest' on Docker image. + # For a new commit on other branches, use the branch name as the tag for Docker image. + # For a new tag, copy that tag name as the tag for Docker image. + IMAGE_TAGS: | + type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} + type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }} + type=ref,event=tag + # Define default tag "flavor" for docker/metadata-action per + # https://github.com/docker/metadata-action#flavor-input + # We manage the 'latest' tag ourselves to the 'main' branch (see settings above) + TAGS_FLAVOR: | + latest=false + # Architectures / Platforms for which we will build Docker images + # If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work. + # If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64. + PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }} + + jobs: - docker: + ############################################### + # Build/Push the 'dspace/dspace-angular' image + ############################################### + dspace-angular: # Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular' if: github.repository == 'dspace/dspace-angular' runs-on: ubuntu-latest - env: - # Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action) - # For a new commit on default branch (main), use the literal tag 'dspace-7_x' on Docker image. - # For a new commit on other branches, use the branch name as the tag for Docker image. - # For a new tag, copy that tag name as the tag for Docker image. - IMAGE_TAGS: | - type=raw,value=dspace-7_x,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }} - type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }} - type=ref,event=tag - # Define default tag "flavor" for docker/metadata-action per - # https://github.com/docker/metadata-action#flavor-input - # We turn off 'latest' tag by default. - TAGS_FLAVOR: | - latest=false - # Architectures / Platforms for which we will build Docker images - # If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work. - # If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64. - PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }} steps: # https://github.com/actions/checkout @@ -61,9 +67,6 @@ jobs: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_ACCESS_TOKEN }} - ############################################### - # Build/Push the 'dspace/dspace-angular' image - ############################################### # https://github.com/docker/metadata-action # Get Metadata for docker_build step below - name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular' image @@ -77,7 +80,7 @@ jobs: # https://github.com/docker/build-push-action - name: Build and push 'dspace-angular' image id: docker_build - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: ./Dockerfile @@ -89,9 +92,36 @@ jobs: tags: ${{ steps.meta_build.outputs.tags }} labels: ${{ steps.meta_build.outputs.labels }} - ##################################################### - # Build/Push the 'dspace/dspace-angular' image ('-dist' tag) - ##################################################### + ############################################################# + # Build/Push the 'dspace/dspace-angular' image ('-dist' tag) + ############################################################# + dspace-angular-dist: + # Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular' + if: github.repository == 'dspace/dspace-angular' + runs-on: ubuntu-latest + + steps: + # https://github.com/actions/checkout + - name: Checkout codebase + uses: actions/checkout@v3 + + # https://github.com/docker/setup-buildx-action + - name: Setup Docker Buildx + uses: docker/setup-buildx-action@v2 + + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU emulation to build for multiple architectures + uses: docker/setup-qemu-action@v2 + + # https://github.com/docker/login-action + - name: Login to DockerHub + # Only login if not a PR, as PRs only trigger a Docker build and not a push + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_ACCESS_TOKEN }} + # https://github.com/docker/metadata-action # Get Metadata for docker_build_dist step below - name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular-dist' image @@ -107,7 +137,7 @@ jobs: - name: Build and push 'dspace-angular-dist' image id: docker_build_dist - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v4 with: context: . file: ./Dockerfile.dist From 4965bdee5f1c340cc604bba4240f3ca23682ea4b Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 28 Jul 2023 14:10:44 -0500 Subject: [PATCH 0006/1529] Add action to automatically create a port PR when specified (cherry picked from commit 338b63ebb8ed847dfd2d2d872b2bc0a4994c7b83) --- .../workflows/port_merged_pull_request.yml | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/port_merged_pull_request.yml diff --git a/.github/workflows/port_merged_pull_request.yml b/.github/workflows/port_merged_pull_request.yml new file mode 100644 index 0000000000..50faf3f886 --- /dev/null +++ b/.github/workflows/port_merged_pull_request.yml @@ -0,0 +1,44 @@ +# This workflow will attempt to port a merged pull request to +# the branch specified in a "port to" label (if exists) +name: Port merged Pull Request + +# Only run for merged PRs against the "main" or maintenance branches +# We allow this to run for `pull_request_target` so that github secrets are available +# (This is required when the PR comes from a forked repo) +on: + pull_request_target: + types: [ closed ] + branches: + - main + - 'dspace-**' + +permissions: + contents: write # so action can add comments + pull-requests: write # so action can create pull requests + +jobs: + port_pr: + runs-on: ubuntu-latest + # Don't run on closed *unmerged* pull requests + if: github.event.pull_request.merged + steps: + # Checkout code + - uses: actions/checkout@v3 + # Port PR to other branch (ONLY if labeled with "port to") + # See https://github.com/korthout/backport-action + - name: Create backport pull requests + uses: korthout/backport-action@v1 + with: + # Trigger based on a "port to [branch]" label on PR + # (This label must specify the branch name to port to) + label_pattern: '^port to ([^ ]+)$' + # Title to add to the (newly created) port PR + pull_title: '[Port ${target_branch}] ${pull_title}' + # Description to add to the (newly created) port PR + pull_description: 'Port of #${pull_number} by @${pull_author} to `${target_branch}`.' + # Copy all labels from original PR to (newly created) port PR + # NOTE: The labels matching 'label_pattern' are automatically excluded + copy_labels_pattern: '.*' + # Use a personal access token (PAT) to create PR as 'dspace-bot' user. + # A PAT is required in order for the new PR to trigger its own actions (for CI checks) + github_token: ${{ secrets.PR_PORT_TOKEN }} \ No newline at end of file From 867ae9c341368113c1d9a6746f95e03b136df76d Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 28 Jul 2023 14:11:08 -0500 Subject: [PATCH 0007/1529] Minor update to label_merge_conflicts to ignore any errors (seem random at this time) (cherry picked from commit d75d12b423206e0261372b372c27c04c36336cff) --- .github/workflows/label_merge_conflicts.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/label_merge_conflicts.yml b/.github/workflows/label_merge_conflicts.yml index 7ea3327741..ccc6c401c0 100644 --- a/.github/workflows/label_merge_conflicts.yml +++ b/.github/workflows/label_merge_conflicts.yml @@ -25,6 +25,8 @@ jobs: # See: https://github.com/prince-chrismc/label-merge-conflicts-action - name: Auto-label PRs with merge conflicts uses: prince-chrismc/label-merge-conflicts-action@v3 + # Ignore any failures -- may occur (randomly?) for older, outdated PRs. + continue-on-error: true # Add "merge conflict" label if a merge conflict is detected. Remove it when resolved. # Note, the authentication token is created automatically # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token From 1b9656b1351a0de44e15c3d26cab56645b200956 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Fri, 30 Jun 2023 09:49:01 +0300 Subject: [PATCH 0008/1529] src/assets/i18n: update Finnish language strings Contributed by Reeta Kuukoski from the National Library of Finland. --- src/assets/i18n/fi.json5 | 3382 +++++++++++++++++++++++++++++++++----- 1 file changed, 2975 insertions(+), 407 deletions(-) diff --git a/src/assets/i18n/fi.json5 b/src/assets/i18n/fi.json5 index 62e7e6bffe..c56fcb6fec 100644 --- a/src/assets/i18n/fi.json5 +++ b/src/assets/i18n/fi.json5 @@ -9,8 +9,6 @@ // "401.unauthorized": "unauthorized", "401.unauthorized": "valtuuttamaton", - - // "403.help": "You don't have permission to access this page. You can use the button below to get back to the home page.", "403.help": "Sinulla ei ole oikeutta nähdä sivua. Voit palata etusivulle alla olevalla painikkeella.", @@ -20,10 +18,17 @@ // "403.forbidden": "forbidden", "403.forbidden": "kielletty", + // "500.page-internal-server-error": "Service Unavailable", + "500.page-internal-server-error": "Palvelu ei ole saatavilla", + // "500.help": "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.", + "500.help": "Palvelin ei tilapäisesti pysty käsittelemään pyyntöäsi huoltokatkon tai kapasiteettiongelmien vuoksi. Yritä myöhemmin uudelleen.", + + // "500.link.home-page": "Take me to the home page", + "500.link.home-page": "Palaa etusivulle", // "404.help": "We can't find the page you're looking for. The page may have been moved or deleted. You can use the button below to get back to the home page. ", - "404.help": "Hakemaasi sivua ei löytynyt. Sivu on voitu siirtää tai poistaa. Painamalla alapuolella olevaa nappia palaat etusivulle. ", + "404.help": "Hakemaasi sivua ei löytynyt. Sivu on voitu siirtää tai poistaa. Painamalla alapuolella olevaa painiketta palaat etusivulle. ", // "404.link.home-page": "Take me to the home page", "404.link.home-page": "Palaa etusivulle", @@ -31,6 +36,36 @@ // "404.page-not-found": "page not found", "404.page-not-found": "sivua ei löytynyt", + // "error-page.description.401": "unauthorized", + "error-page.description.401": "valtuuttamaton", + + // "error-page.description.403": "forbidden", + "error-page.description.403": "kielletty", + + // "error-page.description.500": "Service Unavailable", + "error-page.description.500": "Palvelu ei ole saatavilla", + + // "error-page.description.404": "page not found", + "error-page.description.404": "sivua ei löytynyt", + + // "error-page.orcid.generic-error": "An error occurred during login via ORCID. Make sure you have shared your ORCID account email address with DSpace. If the error persists, contact the administrator", + "error-page.orcid.generic-error": "Virhe ORCID-kirjautumisessa. Varmista, että olet tuonut ORCID-tilisi sähköpostiosoitteen DSpaceen. Jos virhe jatkuu, ota yhteyttä ylläpitäjään.", + + // "access-status.embargo.listelement.badge": "Embargo", + "access-status.embargo.listelement.badge": "Embargo", + + // "access-status.metadata.only.listelement.badge": "Metadata only", + "access-status.metadata.only.listelement.badge": "Vain metadata", + + // "access-status.open.access.listelement.badge": "Open Access", + "access-status.open.access.listelement.badge": "Open Access", + + // "access-status.restricted.listelement.badge": "Restricted", + "access-status.restricted.listelement.badge": "Rajattu", + + // "access-status.unknown.listelement.badge": "Unknown", + "access-status.unknown.listelement.badge": "Tuntematon", + // "admin.curation-tasks.breadcrumbs": "System curation tasks", "admin.curation-tasks.breadcrumbs": "Järjestelmän kuratointitehtävät", @@ -157,11 +192,11 @@ // "admin.registries.bitstream-formats.table.name": "Name", "admin.registries.bitstream-formats.table.name": "Nimi", - // "admin.registries.bitstream-formats.table.id" : "ID", + // "admin.registries.bitstream-formats.table.id": "ID", "admin.registries.bitstream-formats.table.id": "ID", - // "admin.registries.bitstream-formats.table.return": "Return", - "admin.registries.bitstream-formats.table.return": "Palaa", + // "admin.registries.bitstream-formats.table.return": "Back", + "admin.registries.bitstream-formats.table.return": "Paluu", // "admin.registries.bitstream-formats.table.supportLevel.KNOWN": "Known", "admin.registries.bitstream-formats.table.supportLevel.KNOWN": "Tunnettu", @@ -175,10 +210,8 @@ // "admin.registries.bitstream-formats.table.supportLevel.head": "Support Level", "admin.registries.bitstream-formats.table.supportLevel.head": "Tukitaso", - // "admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Format Registry", - "admin.registries.bitstream-formats.title": "DSpace Angular :: Tiedostoformaattirekisteri", - - + // "admin.registries.bitstream-formats.title": "Bitstream Format Registry", + "admin.registries.bitstream-formats.title": "Tiedostoformaattirekisteri", // "admin.registries.metadata.breadcrumbs": "Metadata registry", "admin.registries.metadata.breadcrumbs": "Metadatarekisteri", @@ -216,10 +249,8 @@ // "admin.registries.metadata.schemas.table.namespace": "Namespace", "admin.registries.metadata.schemas.table.namespace": "Nimiavaruus", - // "admin.registries.metadata.title": "DSpace Angular :: Metadata Registry", - "admin.registries.metadata.title": "DSpace Angular :: Metadatarekisteri", - - + // "admin.registries.metadata.title": "Metadata Registry", + "admin.registries.metadata.title": "Metadatarekisteri", // "admin.registries.schema.breadcrumbs": "Metadata schema", "admin.registries.schema.breadcrumbs": "Metadataskeema", @@ -293,13 +324,11 @@ // "admin.registries.schema.notification.success": "Success", "admin.registries.schema.notification.success": "Valmis", - // "admin.registries.schema.return": "Return", - "admin.registries.schema.return": "Palaa", - - // "admin.registries.schema.title": "DSpace Angular :: Metadata Schema Registry", - "admin.registries.schema.title": "DSpace Angular :: Metadataskeemarekisteri", - + // "admin.registries.schema.return": "Back", + "admin.registries.schema.return": "Paluu", + // "admin.registries.schema.title": "Metadata Schema Registry", + "admin.registries.schema.title": "Metadataskeemarekisteri", // "admin.access-control.epeople.actions.delete": "Delete EPerson", "admin.access-control.epeople.actions.delete": "Poista käyttäjä", @@ -313,7 +342,10 @@ // "admin.access-control.epeople.actions.stop-impersonating": "Stop impersonating EPerson", "admin.access-control.epeople.actions.stop-impersonating": "Lopeta käyttäjänä esiintyminen", - // "admin.access-control.epeople.title": "DSpace Angular :: EPeople", + // "admin.access-control.epeople.breadcrumbs": "EPeople", + "admin.access-control.epeople.breadcrumbs": "Käyttäjät", + + // "admin.access-control.epeople.title": "EPeople", "admin.access-control.epeople.title": "DSpace Angular :: Käyttäjät", // "admin.access-control.epeople.head": "EPeople", @@ -334,6 +366,9 @@ // "admin.access-control.epeople.search.button": "Search", "admin.access-control.epeople.search.button": "Hae", + // "admin.access-control.epeople.search.placeholder": "Search people...", + "admin.access-control.epeople.search.placeholder": "Hae käyttäjiä...", + // "admin.access-control.epeople.button.add": "Add EPerson", "admin.access-control.epeople.button.add": "Lisää käyttäjä", @@ -352,6 +387,9 @@ // "admin.access-control.epeople.table.edit.buttons.edit": "Edit \"{{name}}\"", "admin.access-control.epeople.table.edit.buttons.edit": "Muokkaa \"{{name}}\"", + // "admin.access-control.epeople.table.edit.buttons.edit-disabled": "You are not authorized to edit this group", + "admin.access-control.epeople.table.edit.buttons.edit-disabled": "Sinulla ei ole valtuuksia muokata tätä ryhmää", + // "admin.access-control.epeople.table.edit.buttons.remove": "Delete \"{{name}}\"", "admin.access-control.epeople.table.edit.buttons.remove": "Poista \"{{name}}\"", @@ -382,6 +420,9 @@ // "admin.access-control.epeople.form.requireCertificate": "Requires certificate", "admin.access-control.epeople.form.requireCertificate": "Vaatii sertifikaatin", + // "admin.access-control.epeople.form.return": "Back", + "admin.access-control.epeople.form.return": "Paluu", + // "admin.access-control.epeople.form.notification.created.success": "Successfully created EPerson \"{{name}}\"", "admin.access-control.epeople.form.notification.created.success": "Käyttäjä \"{{name}}\" luotu", @@ -415,6 +456,9 @@ // "admin.access-control.epeople.form.table.name": "Name", "admin.access-control.epeople.form.table.name": "Nimi", + // "admin.access-control.epeople.form.table.collectionOrCommunity": "Collection/Community", + "admin.access-control.epeople.form.table.collectionOrCommunity": "Kokoelma/Yhteisö", + // "admin.access-control.epeople.form.memberOfNoGroups": "This EPerson is not a member of any groups", "admin.access-control.epeople.form.memberOfNoGroups": "Tämä käyttäjä ei kuulu mihinkään ryhmään", @@ -427,16 +471,23 @@ // "admin.access-control.epeople.notification.deleted.success": "Successfully deleted EPerson: \"{{name}}\"", "admin.access-control.epeople.notification.deleted.success": "Käyttäjä poistettu: \"{{name}}\"", + // "admin.access-control.groups.title": "Groups", + "admin.access-control.groups.title": "Ryhmät", + // "admin.access-control.groups.breadcrumbs": "Groups", + "admin.access-control.groups.breadcrumbs": "Ryhmät", - // "admin.access-control.groups.title": "DSpace Angular :: Groups", - "admin.access-control.groups.title": "DSpace Angular :: Ryhmät", + // "admin.access-control.groups.singleGroup.breadcrumbs": "Edit Group", + // "admin.access-control.groups.singleGroup.breadcrumbs": "Ryhmän muokkaus", - // "admin.access-control.groups.title.singleGroup": "DSpace Angular :: Edit Group", - "admin.access-control.groups.title.singleGroup": "DSpace Angular :: Ryhmän muokkaus", + // "admin.access-control.groups.title.singleGroup": "Edit Group", + "admin.access-control.groups.title.singleGroup": "Ryhmän muokkaus", - // "admin.access-control.groups.title.addGroup": "DSpace Angular :: New Group", - "admin.access-control.groups.title.addGroup": "DSpace Angular :: Uusi ryhmä", + // "admin.access-control.groups.title.addGroup": "New Group", + "admin.access-control.groups.title.addGroup": "Uusi ryhmä", + + // "admin.access-control.groups.addGroup.breadcrumbs": "New Group", + "admin.access-control.groups.addGroup.breadcrumbs": "uusi ryhmä", // "admin.access-control.groups.head": "Groups", "admin.access-control.groups.head": "Ryhmät", @@ -453,12 +504,18 @@ // "admin.access-control.groups.search.button": "Search", "admin.access-control.groups.search.button": "Hae", + // "admin.access-control.groups.search.placeholder": "Search groups...", + "admin.access-control.groups.search.placeholder": "Hae ryhmiä...", + // "admin.access-control.groups.table.id": "ID", "admin.access-control.groups.table.id": "ID", // "admin.access-control.groups.table.name": "Name", "admin.access-control.groups.table.name": "Nimi", + // "admin.access-control.groups.table.collectionOrCommunity": "Collection/Community", + "admin.access-control.groups.table.collectionOrCommunity": "Kokoelma/Yhteisö", + // "admin.access-control.groups.table.members": "Members", "admin.access-control.groups.table.members": "Jäsenet", @@ -483,8 +540,6 @@ // "admin.access-control.groups.notification.deleted.failure.content": "Cause: \"{{cause}}\"", "admin.access-control.groups.notification.deleted.failure.content": "Syy: \"{{cause}}\"", - - // "admin.access-control.groups.form.alert.permanent": "This group is permanent, so it can't be edited or deleted. You can still add and remove group members using this page.", "admin.access-control.groups.form.alert.permanent": "Tämä ryhmä on pysyvä, eikä sitä voi muokata tai poistaa. Ryhmään voi kuitenkin lisätä ja poistaa jäseniä tällä sivulla.", @@ -500,6 +555,9 @@ // "admin.access-control.groups.form.groupName": "Group name", "admin.access-control.groups.form.groupName": "Ryhmän nimi", + // "admin.access-control.groups.form.groupCommunity": "Community or Collection", + "admin.access-control.groups.form.groupCommunity": "Yhteisö tai kokoelma", + // "admin.access-control.groups.form.groupDescription": "Description", "admin.access-control.groups.form.groupDescription": "Kuvaus", @@ -572,6 +630,15 @@ // "admin.access-control.groups.form.members-list.table.name": "Name", "admin.access-control.groups.form.members-list.table.name": "Nimi", + // "admin.access-control.groups.form.members-list.table.identity": "Identity", + "admin.access-control.groups.form.members-list.table.identity": "Identiteetti", + + // "admin.access-control.groups.form.members-list.table.email": "Email", + "admin.access-control.groups.form.members-list.table.email": "Sähköpostiosoite", + + // "admin.access-control.groups.form.members-list.table.netid": "NetID", + "admin.access-control.groups.form.members-list.table.netid": "Käyttäjätunnus", + // "admin.access-control.groups.form.members-list.table.edit": "Remove / Add", "admin.access-control.groups.form.members-list.table.edit": "Poista / Lisää", @@ -626,6 +693,9 @@ // "admin.access-control.groups.form.subgroups-list.table.name": "Name", "admin.access-control.groups.form.subgroups-list.table.name": "Nimi", + // "admin.access-control.groups.form.subgroups-list.table.collectionOrCommunity": "Collection/Community", + "admin.access-control.groups.form.subgroups-list.table.collectionOrCommunity": "Kokoelma/Yhteisö", + // "admin.access-control.groups.form.subgroups-list.table.edit": "Remove / Add", "admin.access-control.groups.form.subgroups-list.table.edit": "Poista / Lisää", @@ -662,10 +732,18 @@ // "admin.access-control.groups.form.subgroups-list.no-subgroups-yet": "No subgroups in group yet.", "admin.access-control.groups.form.subgroups-list.no-subgroups-yet": "Ryhmällä ei ole alaryhmiä.", - // "admin.access-control.groups.form.return": "Return to groups", - "admin.access-control.groups.form.return": "Palaa ryhmiin", + // "admin.access-control.groups.form.return": "Back", + "admin.access-control.groups.form.return": "Paluu", + // "admin.access-control.groups.form.tooltip.editGroupPage": "On this page, you can modify the properties and members of a group. In the top section, you can edit the group name and description, unless this is an admin group for a collection or community, in which case the group name and description are auto-generated and cannot be edited. In the following sections, you can edit group membership. See [the wiki](https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group) for more details.", + "admin.access-control.groups.form.tooltip.editGroupPage": "Tällä sivulla voit muokata ryhmän ominaisuuksia ja jäseniä. Yläosassa voit muokata ryhmän nimeä ja kuvausta, paitsi jos kyseessä on kokoelman tai yhteisön ylläpitäjäryhmä, jolloin ryhmän nimi ja kuvaus luodaan automaattisesti, eikä niitä voi muokata. Muissa osioissa voit muokata ryhmän jäsenyyttä. Katso lisätietoja wiki-sivulta (https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group).", + // "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "To add or remove an EPerson to/from this group, either click the 'Browse All' button or use the search bar below to search for users (use the dropdown to the left of the search bar to choose whether to search by metadata or by email). Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", + "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "Voit lisätä tai poistaa ryhmän käyttäjän joko napsauttamalla 'Selaa kaikkia' -painiketta tai käyttämällä alla olevaa hakupalkkia käyttäjien etsimiseen (käytä hakupalkin vasemmalla puolella olevaa pudotusvalikkoa valitaksesi, haetaanko metatietojen vai sähköpostin perusteella). Napsauta sitten plus-kuvaketta jokaisen käyttäjän kohdalla, jonka haluat lisätä alla olevaan luetteloon, tai roskakorikuvaketta jokaisen käyttäjän kohdalla, jonka haluat poistaa. Alla olevassa luettelossa voi olla useita sivuja: voit siirtyä seuraaville sivuille luettelon alapuolella olevilla sivunohjaimilla. Kun olet valmis, tallenna muutokset napsauttamalla yläosassa olevaa Tallenna-painiketta.", + + // "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "To add or remove a Subgroup to/from this group, either click the 'Browse All' button or use the search bar below to search for users. Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", + // TODO New key - Add a translation - ree made ticket 2321 to DSpace's github + "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "Jos haluat lisätä tai poistaa alaryhmän tähän ryhmään tai tästä ryhmästä, napsauta joko 'Selaa kaikkia' -painiketta tai käytä alla olevaa hakupalkkia käyttäjien etsimiseen. Napsauta sitten luettelossa plus-kuvaketta jokaisen käyttäjän kohdalla, jonka haluat lisätä, tai roskakorikuvaketta jokaisen käyttäjän kohdalla, jonka haluat poistaa. Luettelossa voi olla useita sivuja: voit siirtyä seuraaville sivuille luettelon alapuolella olevilla sivunohjaimilla. Kun olet valmis, tallenna muutokset napsauttamalla yläosassa olevaa Tallenna-painiketta.", // "admin.search.breadcrumbs": "Administrative Search", "admin.search.breadcrumbs": "Ylläpitäjän haku", @@ -682,17 +760,17 @@ // "admin.search.item.edit": "Edit", "admin.search.item.edit": "Muokkaa", - // "admin.search.item.make-private": "Make Private", + // "admin.search.item.make-private": "Make non-discoverable", "admin.search.item.make-private": "Tee yksityiseksi", - // "admin.search.item.make-public": "Make Public", + // "admin.search.item.make-public": "Make discoverable", "admin.search.item.make-public": "Tee julkiseksi", // "admin.search.item.move": "Move", "admin.search.item.move": "Siirrä", // "admin.search.item.reinstate": "Reinstate", - "admin.search.item.reinstate": "Palauta käyttöön", + "admin.search.item.reinstate": "Palauta", // "admin.search.item.withdraw": "Withdraw", "admin.search.item.withdraw": "Poista käytöstä", @@ -703,9 +781,6 @@ // "administrativeView.search.results.head": "Administrative Search", "administrativeView.search.results.head": "Ylläpitäjän haku", - - - // "admin.workflow.breadcrumbs": "Administer Workflow", "admin.workflow.breadcrumbs": "Hallinnoi työnkulkua", @@ -715,43 +790,191 @@ // "admin.workflow.item.workflow": "Workflow", "admin.workflow.item.workflow": "Työnkulku", + // "admin.workflow.item.workspace": "Workspace", + "admin.workflow.item.workspace": "Työtila", + // "admin.workflow.item.delete": "Delete", "admin.workflow.item.delete": "Poista", // "admin.workflow.item.send-back": "Send back", "admin.workflow.item.send-back": "Lähetä takaisin", + // "admin.workflow.item.policies": "Policies", + "admin.workflow.item.policies": "Käytännöt", + // "admin.workflow.item.supervision": "Supervision", + "admin.workflow.item.supervision": "Valvonta", // "admin.metadata-import.breadcrumbs": "Import Metadata", "admin.metadata-import.breadcrumbs": "Importoi metadata", + // "admin.batch-import.breadcrumbs": "Import Batch", + "admin.batch-import.breadcrumbs": "Importoi erä", + // "admin.metadata-import.title": "Import Metadata", "admin.metadata-import.title": "Importoi metadata", + // "admin.batch-import.title": "Import Batch", + "admin.batch-import.title": "Importoi erä", + // "admin.metadata-import.page.header": "Import Metadata", "admin.metadata-import.page.header": "Importoi metadata", + // "admin.batch-import.page.header": "Import Batch", + "admin.batch-import.page.header": "Importoi erä", + // "admin.metadata-import.page.help": "You can drop or browse CSV files that contain batch metadata operations on files here", "admin.metadata-import.page.help": "Voit pudottaa tähän tai selata CSV-tiedostoja, joilla voit tehdä metadatatoimintoja usealle tietueelle", + // "admin.batch-import.page.help": "Select the Collection to import into. Then, drop or browse to a Simple Archive Format (SAF) zip file that includes the Items to import", + "admin.batch-import.page.help": "Valitse kokoelma, johon tietueet importoidaan. Sen jälkeen pudota tai selaa esiin importoitavat tietueet sisältävä Simple Archive Format (SAF) -ZIP-tiedosto.", + + // "admin.batch-import.page.toggle.help": "It is possible to perform import either with file upload or via URL, use above toggle to set the input source", + "admin.batch-import.page.toggle.help": "Importoinnin voi tehdä joko lataamalla tiedoston tai URL-osoitteen kautta. Käytä yllä olevaa kytkintä valitaksesi syöttötavan.", + // "admin.metadata-import.page.dropMsg": "Drop a metadata CSV to import", "admin.metadata-import.page.dropMsg": "Pudota CSV-metadata importoimista varten", + // "admin.batch-import.page.dropMsg": "Drop a batch ZIP to import", + "admin.batch-import.page.dropMsg": "Pudota erän ZIP-tiedosto importoimista varten", + // "admin.metadata-import.page.dropMsgReplace": "Drop to replace the metadata CSV to import", "admin.metadata-import.page.dropMsgReplace": "Pudota korvataksesi importoitava CSV-metadata", - // "admin.metadata-import.page.button.return": "Return", + // "admin.batch-import.page.dropMsgReplace": "Drop to replace the batch ZIP to import", + "admin.batch-import.page.dropMsgReplace": "Pudota korvataksesi importoitava erän ZIP-tiedosto", + + // "admin.metadata-import.page.button.return": "Back", "admin.metadata-import.page.button.return": "Paluu", // "admin.metadata-import.page.button.proceed": "Proceed", "admin.metadata-import.page.button.proceed": "Jatka", + // "admin.metadata-import.page.button.select-collection": "Select Collection", + "admin.metadata-import.page.button.select-collection": "Valitse kokoelma", + // "admin.metadata-import.page.error.addFile": "Select file first!", "admin.metadata-import.page.error.addFile": "Valitse ensin tiedosto!", + // "admin.metadata-import.page.error.addFileUrl": "Insert file url first!", + "admin.metadata-import.page.error.addFileUrl": "Syötä tiedoston URL ensin!", + // "admin.batch-import.page.error.addFile": "Select Zip file first!", + "admin.batch-import.page.error.addFile": "Valitse ZIP-tiedosto ensin!", + // "admin.metadata-import.page.toggle.upload": "Upload", + "admin.metadata-import.page.toggle.upload": "Lataa", + + // "admin.metadata-import.page.toggle.url": "URL", + "admin.metadata-import.page.toggle.url": "URL", + + // "admin.metadata-import.page.urlMsg": "Insert the batch ZIP url to import", + "admin.metadata-import.page.urlMsg": "Syötä erän ZIP-URL importoitavaksi", + + // "admin.metadata-import.page.validateOnly": "Validate Only", + "admin.metadata-import.page.validateOnly": "Pelkkä validointi", + + // "admin.metadata-import.page.validateOnly.hint": "When selected, the uploaded CSV will be validated. You will receive a report of detected changes, but no changes will be saved.", + "admin.metadata-import.page.validateOnly.hint": "Kun tämä valitaan, ladattu CSV-tiedosto validoidaan. Saat raportin havaituista muutoksista, mutta muutoksia ei tallenneta.", + + // "advanced-workflow-action.rating.form.rating.label": "Rating", + "advanced-workflow-action.rating.form.rating.label": "Arviointi", + + // "advanced-workflow-action.rating.form.rating.error": "You must rate the item", + "advanced-workflow-action.rating.form.rating.error": "Sinun on arvioitava tietua", + + // "advanced-workflow-action.rating.form.review.label": "Review", + "advanced-workflow-action.rating.form.review.label": "Tarkasta", + + // "advanced-workflow-action.rating.form.review.error": "You must enter a review to submit this rating", + "advanced-workflow-action.rating.form.review.error": "Sinun on annettava arvostelu lähettääksesi tämän arvioinnin", + + // "advanced-workflow-action.rating.description": "Please select a rating below", + "advanced-workflow-action.rating.description": "Valitse arviointi alapuolelta", + + // "advanced-workflow-action.rating.description-requiredDescription": "Please select a rating below and also add a review", + "advanced-workflow-action.rating.description-requiredDescription": "Valitse arviointi alapuolelta. Lisää myös arvostelu", + + // "advanced-workflow-action.select-reviewer.description-single": "Please select a single reviewer below before submitting", + "advanced-workflow-action.select-reviewer.description-single": "Valitse yksi tarkastaja alapuolelta ennen lähettämistä", + + // "advanced-workflow-action.select-reviewer.description-multiple": "Please select one or more reviewers below before submitting", + "advanced-workflow-action.select-reviewer.description-multiple": "Valitse yksi tai useampi tarkastaja alapuolelta ennen lähettämistä", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.head": "EPeople", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.head": "Käyttäjät", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.head": "Add EPeople", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.head": "Lisää käyttäjiä", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.button.see-all": "Browse All", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.button.see-all": "Selaa kaikkia", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.headMembers": "Current Members", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.headMembers": "Nykyiset jäsenet", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.metadata": "Metadata", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.metadata": "Metadata", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.email": "E-mail (exact)", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.scope.email": "Sähköpostiosoite (oikea)", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.button": "Search", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.search.button": "Hae", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.id": "ID", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.id": "ID", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.name": "Name", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.name": "Nimi", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.identity": "Identity", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.identity": "Identiteetti", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.email": "Email", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.email": "Sähköpostiosoite", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.netid": "NetID", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.netid": "Käyttäjätunnus", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit": "Remove / Add", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit": "Poista / Lisää", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.remove": "Remove member with name \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.remove": "Poista jäsen nimellä \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.addMember": "Successfully added member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.addMember": "Jäsen lisätty: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.addMember": "Failed to add member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.addMember": "Jäsenen lisäys epäonnistui: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.deleteMember": "Successfully deleted member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.success.deleteMember": "Jäsen poistettu: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.deleteMember": "Failed to delete member: \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.deleteMember": "Jäsenen poisto epäonnistui: \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.add": "Add member with name \"{{name}}\"", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.table.edit.buttons.add": "Lisää jäsen nimellä \"{{name}}\"", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.noActiveGroup": "No current active group, submit a name first.", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.notification.failure.noActiveGroup": "Ei aktiivista ryhmää, syötä ensin nimi", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-members-yet": "No members in group yet, search and add.", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-members-yet": "Ryhmässä ei ole vielä jäseniä, hae ja lisää.", + + // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-items": "No EPeople found in that search", + "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.no-items": "Haku ei palauttanut käyttäjiä", + + // "advanced-workflow-action.select-reviewer.no-reviewer-selected.error": "No reviewer selected.", + "advanced-workflow-action.select-reviewer.no-reviewer-selected.error": "Ei valittua tarkastajaa.", + + // "admin.batch-import.page.validateOnly.hint": "When selected, the uploaded ZIP will be validated. You will receive a report of detected changes, but no changes will be saved.", + "admin.batch-import.page.validateOnly.hint": "Kun tämä valitaan, ladattu ZIP-tiedosto validoidaan. the uploaded ZIP will be validated. Saat raportin havaituista muutoksista, mutta muutoksia ei tallenneta.", + + // "admin.batch-import.page.remove": "remove", + "admin.batch-import.page.remove": "poista", // "auth.errors.invalid-user": "Invalid email address or password.", "auth.errors.invalid-user": "Virheellinen sähköpostiosoite tai salasana.", @@ -759,7 +982,23 @@ // "auth.messages.expired": "Your session has expired. Please log in again.", "auth.messages.expired": "Istuntosi on vanhentunut. Kirjaudu uudelleen.", + // "auth.messages.token-refresh-failed": "Refreshing your session token failed. Please log in again.", + "auth.messages.token-refresh-failed": "Istuntotunnisteen päivittäminen epäonnistui. Kirjaudu uudelleen.", + // "bitstream.download.page": "Now downloading {{bitstream}}...", + "bitstream.download.page": "Nyt ladataan {{bitstream}}...", + + // "bitstream.download.page.back": "Back", + "bitstream.download.page.back": "Paluu", + + // "bitstream.edit.authorizations.link": "Edit bitstream's Policies", + "bitstream.edit.authorizations.link": "Muokkaa tiedostokäytäntöjä", + + // "bitstream.edit.authorizations.title": "Edit bitstream's Policies", + "bitstream.edit.authorizations.title": "Muokkaa tiedostokäytäntöjä", + + // "bitstream.edit.return": "Back", + "bitstream.edit.return": "Paluu", // "bitstream.edit.bitstream": "Bitstream: ", "bitstream.edit.bitstream": "Tiedosto: ", @@ -803,6 +1042,33 @@ // "bitstream.edit.notifications.error.format.title": "An error occurred saving the bitstream's format", "bitstream.edit.notifications.error.format.title": "Virhe tallennettaessa tiedoston formaattia", + // "bitstream.edit.notifications.error.primaryBitstream.title": "An error occurred saving the primary bitstream", + "bitstream.edit.notifications.error.primaryBitstream.title": "Virhe tallennettaessa päätiedostoa", + + // "bitstream.edit.form.iiifLabel.label": "IIIF Label", + "bitstream.edit.form.iiifLabel.label": "IIIF-nimike", + + // "bitstream.edit.form.iiifLabel.hint": "Canvas label for this image. If not provided default label will be used.", + "bitstream.edit.form.iiifLabel.hint": "Kuvan canvasin nimike. Ellei nimikettä anneta, käytetään oletusnimikettä.", + + // "bitstream.edit.form.iiifToc.label": "IIIF Table of Contents", + "bitstream.edit.form.iiifToc.label": "IIIF-sisällysluettelo", + + // "bitstream.edit.form.iiifToc.hint": "Adding text here makes this the start of a new table of contents range.", + "bitstream.edit.form.iiifToc.hint": "Jos tekstiä lisätään tähän, tästä alkaa uusi sisällysluetteloaihe.", + + // "bitstream.edit.form.iiifWidth.label": "IIIF Canvas Width", + "bitstream.edit.form.iiifWidth.label": "IIIF-canvasin leveys", + + // "bitstream.edit.form.iiifWidth.hint": "The canvas width should usually match the image width.", + "bitstream.edit.form.iiifWidth.hint": "Canvasin leveyden tulee vastata kuvan leveyttä.", + + // "bitstream.edit.form.iiifHeight.label": "IIIF Canvas Height", + "bitstream.edit.form.iiifHeight.label": "IIIF-canvasin korkeus", + + // "bitstream.edit.form.iiifHeight.hint": "The canvas height should usually match the image height.", + "bitstream.edit.form.iiifHeight.hint": "Canvasin korkeuden tulee vastata kuvan korkeutta.", + // "bitstream.edit.notifications.saved.content": "Your changes to this bitstream were saved.", "bitstream.edit.notifications.saved.content": "Muutokset tiedostoon on tallennettu.", @@ -812,7 +1078,65 @@ // "bitstream.edit.title": "Edit bitstream", "bitstream.edit.title": "Muokkaa tiedostoa", + // "bitstream-request-a-copy.alert.canDownload1": "You already have access to this file. If you want to download the file, click ", + "bitstream-request-a-copy.alert.canDownload1": "Sinulla on jo pääsy tähän tiedostoon. Jos haluat ladata tiedoston, napsauta ", + // "bitstream-request-a-copy.alert.canDownload2": "here", + "bitstream-request-a-copy.alert.canDownload2": "tässä", + + // "bitstream-request-a-copy.header": "Request a copy of the file", + "bitstream-request-a-copy.header": "Pyydä tiedostokopiota", + + // "bitstream-request-a-copy.intro": "Enter the following information to request a copy for the following item: ", + "bitstream-request-a-copy.intro": "Syötä seuraavat tiedot pyytääksesi kopiota tietueesta: ", + + // "bitstream-request-a-copy.intro.bitstream.one": "Requesting the following file: ", + "bitstream-request-a-copy.intro.bitstream.one": "Pyydetään seuraavaa tiedostoa: ", + + // "bitstream-request-a-copy.intro.bitstream.all": "Requesting all files. ", + "bitstream-request-a-copy.intro.bitstream.all": "Pyydetään kaikkia tiedostoja. ", + + // "bitstream-request-a-copy.name.label": "Name *", + "bitstream-request-a-copy.name.label": "Nimi *", + + // "bitstream-request-a-copy.name.error": "The name is required", + "bitstream-request-a-copy.name.error": "Nimi on pakollinen tieto", + + // "bitstream-request-a-copy.email.label": "Your e-mail address *", + "bitstream-request-a-copy.email.label": "Sähköpostiosoite *", + + // "bitstream-request-a-copy.email.hint": "This email address is used for sending the file.", + "bitstream-request-a-copy.email.hint": "Tätä sähköpostiosoitetta käytetään tiedostoa lähetettäessä.", + + // "bitstream-request-a-copy.email.error": "Please enter a valid email address.", + "bitstream-request-a-copy.email.error": "Syötä toimiva sähköpostiosoite.", + + // "bitstream-request-a-copy.allfiles.label": "Files", + "bitstream-request-a-copy.allfiles.label": "Tiedostot", + + // "bitstream-request-a-copy.files-all-false.label": "Only the requested file", + "bitstream-request-a-copy.files-all-false.label": "Vain pyydetty tiedosto", + + // "bitstream-request-a-copy.files-all-true.label": "All files (of this item) in restricted access", + "bitstream-request-a-copy.files-all-true.label": "Kaikilla (tämän tietueen) tiedostoilla on rajattu käyttöoikeus", + + // "bitstream-request-a-copy.message.label": "Message", + "bitstream-request-a-copy.message.label": "Viesti", + + // "bitstream-request-a-copy.return": "Back", + "bitstream-request-a-copy.return": "Paluu", + + // "bitstream-request-a-copy.submit": "Request copy", + "bitstream-request-a-copy.submit": "Pyydä kopio", + + // "bitstream-request-a-copy.submit.success": "The item request was submitted successfully.", + "bitstream-request-a-copy.submit.success": "Tietuepyyntö on lähetetty.", + + // "bitstream-request-a-copy.submit.error": "Something went wrong with submitting the item request.", + "bitstream-request-a-copy.submit.error": "Tapahtui virhe lähetettäessä tietuepyyntöä", + + // "browse.back.all-results": "All browse results", + "browse.back.all-results": "Kaikki selaustulokset", // "browse.comcol.by.author": "By Author", "browse.comcol.by.author": "Tekijän mukaan", @@ -823,6 +1147,9 @@ // "browse.comcol.by.subject": "By Subject", "browse.comcol.by.subject": "Asiasanan mukaan", + // "browse.comcol.by.srsc": "By Subject Category", + "browse.comcol.by.srsc": "Aihekategorian mukaan", + // "browse.comcol.by.title": "By Title", "browse.comcol.by.title": "Nimekkeen mukaan", @@ -853,17 +1180,35 @@ // "browse.metadata.subject.breadcrumbs": "Browse by Subject", "browse.metadata.subject.breadcrumbs": "Selaa asiasanan mukaan", + // "browse.metadata.srsc.breadcrumbs": "Browse by Subject Category", + "browse.metadata.srsc.breadcrumbs": "Selaa aihekategorian luokan mukaan", + // "browse.metadata.title.breadcrumbs": "Browse by Title", "browse.metadata.title.breadcrumbs": "Selaa nimekkeen mukaan", + // "pagination.next.button": "Next", + "pagination.next.button": "Seuraava", + + // "pagination.previous.button": "Previous", + "pagination.previous.button": "Edellinen", + + // "pagination.next.button.disabled.tooltip": "No more pages of results", + "pagination.next.button.disabled.tooltip": "Ei enempää tulossivuja", + + // "browse.startsWith": ", starting with {{ startsWith }}", + "browse.startsWith": ", alkaa kirjaimella {{ startsWith }}", + // "browse.startsWith.choose_start": "(Choose start)", "browse.startsWith.choose_start": "(Valitse alku)", // "browse.startsWith.choose_year": "(Choose year)", "browse.startsWith.choose_year": "(Valitse vuosi)", - // "browse.startsWith.jump": "Jump to a point in the index:", - "browse.startsWith.jump": "Hyppää indeksin kohtaan:", + // "browse.startsWith.choose_year.label": "Choose the issue year", + "browse.startsWith.choose_year.label": "Valitse julkaisuvuosi", + + // "browse.startsWith.jump": "Filter results by year or month", + "browse.startsWith.jump": "Suodata tulokset vuoden tai kuukauden mukaan", // "browse.startsWith.months.april": "April", "browse.startsWith.months.april": "Huhtikuu", @@ -895,6 +1240,9 @@ // "browse.startsWith.months.none": "(Choose month)", "browse.startsWith.months.none": "(Valitse kuukausi)", + // "browse.startsWith.months.none.label": "Choose the issue month", + "browse.startsWith.months.none.label": "Valitse julkaisukuukausi", + // "browse.startsWith.months.november": "November", "browse.startsWith.months.november": "Marraskuu", @@ -904,23 +1252,44 @@ // "browse.startsWith.months.september": "September", "browse.startsWith.months.september": "Syyskuu", - // "browse.startsWith.submit": "Go", - "browse.startsWith.submit": "Ok", + // "browse.startsWith.submit": "Browse", + "browse.startsWith.submit": "Selaa", - // "browse.startsWith.type_date": "Or type in a date (year-month):", - "browse.startsWith.type_date": "Tai anna päiväys (vuosi-kuukausi):", + // "browse.startsWith.type_date": "Filter results by date", + "browse.startsWith.type_date": "Suodata tulokset päivämäärän mukaan", - // "browse.startsWith.type_text": "Or enter first few letters:", - "browse.startsWith.type_text": "Tai anna muutama alkukirjain:", + // "browse.startsWith.type_date.label": "Or type in a date (year-month) and click on the Browse button", + "browse.startsWith.type_date.label": "Tai syötä päiväys (vuosi-kuukausi) ja napsauta Selaa-painiketta", - // "browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}", - "browse.title": "Selataan {{ collection }}-kokoelmaa {{ field }}-kentän arvolla {{ value }}", + // "browse.startsWith.type_text": "Filter results by typing the first few letters", + "browse.startsWith.type_text": "Suodata tuloksia antamalla muutama alkukirjain", + // "browse.startsWith.input": "Filter", + "browse.startsWith.input": "Suodata", + + // "browse.taxonomy.button": "Browse", + "browse.taxonomy.button": "Selaa", + + // "browse.title": "Browsing {{ collection }} by {{ field }}{{ startsWith }} {{ value }}", + "browse.title": "Selataan {{ collection }}-kokoelmaa {{ field }}{{ startsWith }}-kentän arvolla {{ value }}", + + // "browse.title.page": "Browsing {{ collection }} by {{ field }} {{ value }}", + "browse.title.page": "Selataan {{ collection }}-kokoelmaa {{ field }}-kentän arvolla {{ value }}", + + // "search.browse.item-back": "Back to Results", + "search.browse.item-back": "Paluu tuloksiin", // "chips.remove": "Remove chip", "chips.remove": "Poista chip", + // "claimed-approved-search-result-list-element.title": "Approved", + "claimed-approved-search-result-list-element.title": "Hyväksytty", + // "claimed-declined-search-result-list-element.title": "Rejected, sent back to submitter", + "claimed-declined-search-result-list-element.title": "Hylätty, lähetetty takaisin tallentajalle", + + // "claimed-declined-task-search-result-list-element.title": "Declined, sent back to Review Manager's workflow", + "claimed-declined-task-search-result-list-element.title": "Kieltäydytty, lähetetty takaisin päätarkastajan työnkulkuun", // "collection.create.head": "Create a Collection", "collection.create.head": "Luo kokoelma", @@ -940,6 +1309,9 @@ // "collection.delete.confirm": "Confirm", "collection.delete.confirm": "Vahvista", + // "collection.delete.processing": "Deleting", + "collection.delete.processing": "Poistetaan", + // "collection.delete.head": "Delete Collection", "collection.delete.head": "Poista kokoelma", @@ -952,8 +1324,6 @@ // "collection.delete.text": "Are you sure you want to delete collection \"{{ dso }}\"", "collection.delete.text": "Haluatko varmasti poistaa kokoelman \"{{ dso }}\"", - - // "collection.edit.delete": "Delete this collection", "collection.edit.delete": "Poista kokoelma", @@ -963,8 +1333,6 @@ // "collection.edit.breadcrumbs": "Edit Collection", "collection.edit.breadcrumbs": "Muokkaa kokoelmaa", - - // "collection.edit.tabs.mapper.head": "Item Mapper", "collection.edit.tabs.mapper.head": "Tietueliitosväline", @@ -1016,13 +1384,20 @@ // "collection.edit.item-mapper.remove": "Remove selected item mappings", "collection.edit.item-mapper.remove": "Poista valitut tietueliitokset", + // "collection.edit.item-mapper.search-form.placeholder": "Search items...", + "collection.edit.item-mapper.search-form.placeholder": "Hae tietueita...", + // "collection.edit.item-mapper.tabs.browse": "Browse mapped items", "collection.edit.item-mapper.tabs.browse": "Selaa liitettyjä tietueita", // "collection.edit.item-mapper.tabs.map": "Map new items", "collection.edit.item-mapper.tabs.map": "Liitä uusia tietueita", + // "collection.edit.logo.delete.title": "Delete logo", + "collection.edit.logo.delete.title": "Poista logo", + // "collection.edit.logo.delete-undo.title": "Undo delete", + "collection.edit.logo.delete-undo.title": "Kumoa poisto", // "collection.edit.logo.label": "Collection logo", "collection.edit.logo.label": "Kokoelman logo", @@ -1045,15 +1420,11 @@ // "collection.edit.logo.upload": "Drop a Collection Logo to upload", "collection.edit.logo.upload": "Pudota kokoelman logo ladattavaksi", - - // "collection.edit.notifications.success": "Successfully edited the Collection", "collection.edit.notifications.success": "Kokoelman muokkaus onnistui", - // "collection.edit.return": "Return", - "collection.edit.return": "Palaa", - - + // "collection.edit.return": "Back", + "collection.edit.return": "Paluu", // "collection.edit.tabs.curate.head": "Curate", "collection.edit.tabs.curate.head": "Kuratoi", @@ -1067,6 +1438,15 @@ // "collection.edit.tabs.authorizations.title": "Collection Edit - Authorizations", "collection.edit.tabs.authorizations.title": "Kokoelman muokkaus - Käyttöoikeudet", + // "collection.edit.item.authorizations.load-bundle-button": "Load more bundles", + "collection.edit.item.authorizations.load-bundle-button": "Lataa lisää nippuja", + + // "collection.edit.item.authorizations.load-more-button": "Load more", + "collection.edit.item.authorizations.load-more-button": "Lataa lisää", + + // "collection.edit.item.authorizations.show-bitstreams-button": "Show bitstream policies for bundle", + "collection.edit.item.authorizations.show-bitstreams-button": "Näytä nipun tiedostokäytännöt", + // "collection.edit.tabs.metadata.head": "Edit Metadata", "collection.edit.tabs.metadata.head": "Muokkaa metadataa", @@ -1115,7 +1495,7 @@ // "collection.edit.tabs.source.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", "collection.edit.tabs.source.notifications.discarded.content": "Muutokset hylätty. Valitse 'Kumoa' palauttaaksesi muutokset", - // "collection.edit.tabs.source.notifications.discarded.title": "Changed discarded", + // "collection.edit.tabs.source.notifications.discarded.title": "Changes discarded", "collection.edit.tabs.source.notifications.discarded.title": "Muutokset hylätty", // "collection.edit.tabs.source.notifications.invalid.content": "Your changes were not saved. Please make sure all fields are valid before you save.", @@ -1133,8 +1513,6 @@ // "collection.edit.tabs.source.title": "Collection Edit - Content Source", "collection.edit.tabs.source.title": "Kokoelman muokkaus - Sisältölähde", - - // "collection.edit.template.add-button": "Add", "collection.edit.template.add-button": "Lisää", @@ -1150,12 +1528,18 @@ // "collection.edit.template.edit-button": "Edit", "collection.edit.template.edit-button": "Muokkaa", + // "collection.edit.template.error": "An error occurred retrieving the template item", + "collection.edit.template.error": "Virhe noudettaessa mallitietuetta", + // "collection.edit.template.head": "Edit Template Item for Collection \"{{ collection }}\"", "collection.edit.template.head": "Muokkaa kokoelman \"{{ collection }}\" mallitietuetta", // "collection.edit.template.label": "Template item", "collection.edit.template.label": "Mallitietue", + // "collection.edit.template.loading": "Loading template item...", + "collection.edit.template.loading": "Ladataan mallitietuetta...", + // "collection.edit.template.notifications.delete.error": "Failed to delete the item template", "collection.edit.template.notifications.delete.error": "Tietueen mallipohjan poisto epäonnistui", @@ -1165,8 +1549,6 @@ // "collection.edit.template.title": "Edit Template Item", "collection.edit.template.title": "Muokkaa mallitietuetta", - - // "collection.form.abstract": "Short Description", "collection.form.abstract": "Lyhyt kuvaus", @@ -1191,13 +1573,12 @@ // "collection.form.title": "Name", "collection.form.title": "Nimi", - + // "collection.form.entityType": "Entity Type", + "collection.form.entityType": "Entiteettityyppi", // "collection.listelement.badge": "Collection", "collection.listelement.badge": "Kokoelma", - - // "collection.page.browse.recent.head": "Recent Submissions", "collection.page.browse.recent.head": "Viimeksi lisätyt", @@ -1216,8 +1597,6 @@ // "collection.page.news": "News", "collection.page.news": "Uutiset", - - // "collection.select.confirm": "Confirm selected", "collection.select.confirm": "Vahvista valinta", @@ -1227,7 +1606,74 @@ // "collection.select.table.title": "Title", "collection.select.table.title": "Nimeke", + // "collection.source.controls.head": "Harvest Controls", + "collection.source.controls.head": "Harvointikontrollit", + // "collection.source.controls.test.submit.error": "Something went wrong with initiating the testing of the settings", + "collection.source.controls.test.submit.error": "Virhe asetusten testaamisen valmistelussa", + + // "collection.source.controls.test.failed": "The script to test the settings has failed", + "collection.source.controls.test.failed": "Asetusten testausskripti epäonnistui", + + // "collection.source.controls.test.completed": "The script to test the settings has successfully finished", + "collection.source.controls.test.completed": "Asetusten testausskripti suoritettu", + + // "collection.source.controls.test.submit": "Test configuration", + "collection.source.controls.test.submit": "Testikonfiguraatio", + + // "collection.source.controls.test.running": "Testing configuration...", + "collection.source.controls.test.running": "Testataan konfiguraatiota...", + + // "collection.source.controls.import.submit.success": "The import has been successfully initiated", + "collection.source.controls.import.submit.success": "Importointi valmisteltu", + + // "collection.source.controls.import.submit.error": "Something went wrong with initiating the import", + "collection.source.controls.import.submit.error": "Virhe importoinnin valmistelussa", + + // "collection.source.controls.import.submit": "Import now", + "collection.source.controls.import.submit": "Importoi nyt", + + // "collection.source.controls.import.running": "Importing...", + "collection.source.controls.import.running": "Importoidaan...", + + // "collection.source.controls.import.failed": "An error occurred during the import", + "collection.source.controls.import.failed": "Virhe importoinnissa", + + // "collection.source.controls.import.completed": "The import completed", + "collection.source.controls.import.completed": "Importointi valmis", + + // "collection.source.controls.reset.submit.success": "The reset and reimport has been successfully initiated", + "collection.source.controls.reset.submit.success": "Nollaus ja uudelleenimportointi valmisteltu", + + // "collection.source.controls.reset.submit.error": "Something went wrong with initiating the reset and reimport", + "collection.source.controls.reset.submit.error": "Virhe nollauksen ja uudelleenimportoinnin valmistelussa", + + // "collection.source.controls.reset.failed": "An error occurred during the reset and reimport", + "collection.source.controls.reset.failed": "Virhe nollauksessa ja uudelleenimportoinnissa", + + // "collection.source.controls.reset.completed": "The reset and reimport completed", + "collection.source.controls.reset.completed": "Nollaus ja uudelleenimportointi valmis", + + // "collection.source.controls.reset.submit": "Reset and reimport", + "collection.source.controls.reset.submit": "Nollaus ja uudelleenimportointi", + + // "collection.source.controls.reset.running": "Resetting and reimporting...", + "collection.source.controls.reset.running": "Nollataan ja uudelleenimportoidaan...", + + // "collection.source.controls.harvest.status": "Harvest status:", + "collection.source.controls.harvest.status": "Harvestoinnin tila:", + + // "collection.source.controls.harvest.start": "Harvest start time:", + "collection.source.controls.harvest.start": "Harvestoinnin aloitusaika:", + + // "collection.source.controls.harvest.last": "Last time harvested:", + "collection.source.controls.harvest.last": "Harvestoitu viimeksi::", + + // "collection.source.controls.harvest.message": "Harvest info:", + "collection.source.controls.harvest.message": "Harvestointitiedot:", + + // "collection.source.controls.harvest.no-information": "N/A", + "collection.source.controls.harvest.no-information": "Ei saatavilla", // "collection.source.update.notifications.error.content": "The provided settings have been tested and didn't work.", "collection.source.update.notifications.error.content": "Annetut asetukset on testattu. Ne eivät toimi.", @@ -1235,10 +1681,11 @@ // "collection.source.update.notifications.error.title": "Server Error", "collection.source.update.notifications.error.title": "Palvelinvirhe", + // "communityList.breadcrumbs": "Community List", + "communityList.breadcrumbs": "Yhteisöluettelo", - - // "communityList.tabTitle": "DSpace - Community List", - "communityList.tabTitle": "DSpace - Yhteisöluettelo", + // "communityList.tabTitle": "Community List", + "communityList.tabTitle": "Yhteisöluettelo", // "communityList.title": "List of Communities", "communityList.title": "Luettelo yhteisöistä", @@ -1246,8 +1693,6 @@ // "communityList.showMore": "Show More", "communityList.showMore": "Näytä lisää", - - // "community.create.head": "Create a Community", "community.create.head": "Luo yhteisö", @@ -1266,6 +1711,9 @@ // "community.delete.confirm": "Confirm", "community.delete.confirm": "Vahvista", + // "community.delete.processing": "Deleting...", + "community.delete.processing": "Poistetaan...", + // "community.delete.head": "Delete Community", "community.delete.head": "Poista yhteisö", @@ -1287,6 +1735,11 @@ // "community.edit.breadcrumbs": "Edit Community", "community.edit.breadcrumbs": "Muokkaa yhteisöä", + // "community.edit.logo.delete.title": "Delete logo", + "community.edit.logo.delete.title": "Poista logo", + + // "community.edit.logo.delete-undo.title": "Undo delete", + "community.edit.logo.delete-undo.title": "Kumoa poisto", // "community.edit.logo.label": "Community logo", "community.edit.logo.label": "Yhteisön logo", @@ -1309,8 +1762,6 @@ // "community.edit.logo.upload": "Drop a Community Logo to upload", "community.edit.logo.upload": "Pudota yhteisön logo ladattavaksi", - - // "community.edit.notifications.success": "Successfully edited the Community", "community.edit.notifications.success": "Yhteisön muokkaus onnistui", @@ -1320,10 +1771,8 @@ // "community.edit.notifications.error": "An error occured while editing the Community", "community.edit.notifications.error": "Virhe muokattaessa yhteisöä", - // "community.edit.return": "Return", - "community.edit.return": "Palaa", - - + // "community.edit.return": "Back", + "community.edit.return": "Paluu", // "community.edit.tabs.curate.head": "Curate", "community.edit.tabs.curate.head": "Kuratoi", @@ -1349,25 +1798,26 @@ // "community.edit.tabs.authorizations.title": "Community Edit - Authorizations", "community.edit.tabs.authorizations.title": "Yhteisön muokkaus - Käyttöoikeudet", - - // "community.listelement.badge": "Community", "community.listelement.badge": "Yhteisö", - - // "comcol-role.edit.no-group": "None", "comcol-role.edit.no-group": "Ei mitään", // "comcol-role.edit.create": "Create", "comcol-role.edit.create": "Luo", + // "comcol-role.edit.create.error.title": "Failed to create a group for the '{{ role }}' role", + "comcol-role.edit.create.error.title": "Ryhmän luonti '{{ role }}'-roolille epäonnistui", + // "comcol-role.edit.restrict": "Restrict", "comcol-role.edit.restrict": "Rajoita", // "comcol-role.edit.delete": "Delete", "comcol-role.edit.delete": "Poista", + // "comcol-role.edit.delete.error.title": "Failed to delete the '{{ role }}' role's group", + "comcol-role.edit.delete.error.title": "'{{ role }}'-roolin ryhmän poisto epäonnistui", // "comcol-role.edit.community-admin.name": "Administrators", "comcol-role.edit.community-admin.name": "Ylläpitäjät", @@ -1375,21 +1825,18 @@ // "comcol-role.edit.collection-admin.name": "Administrators", "comcol-role.edit.collection-admin.name": "Ylläpitäjät", - // "comcol-role.edit.community-admin.description": "Community administrators can create sub-communities or collections, and manage or assign management for those sub-communities or collections. In addition, they decide who can submit items to any sub-collections, edit item metadata (after submission), and add (map) existing items from other collections (subject to authorization).", "comcol-role.edit.community-admin.description": "Yhteisön ylläpitäjät voivat luoda alayhteisöjä tai kokoelmia ja hallita niitä sekä myöntää niihin hallintaoikeuksia. He päättävät, kuka saa tallentaa tietueita alakokoelmiin, muokata metadataa (tallennuksen jälkeen) ja lisätä (liittää) olemassa olevia tietueita muista kokoelmista (käyttöoikeuksien puitteissa).", // "comcol-role.edit.collection-admin.description": "Collection administrators decide who can submit items to the collection, edit item metadata (after submission), and add (map) existing items from other collections to this collection (subject to authorization for that collection).", "comcol-role.edit.collection-admin.description": "Kokoelman ylläpitäjät päättävät, kuka saa tallentaa tietueita alakokoelmiin, muokata metadataa (tallennuksen jälkeen) ja lisätä (liittää) olemassa olevia tietueita muista kokoelmista (k.o. kokoelman käyttöoikeuksien puitteissa).", - // "comcol-role.edit.submitters.name": "Submitters", "comcol-role.edit.submitters.name": "Tallentajat", // "comcol-role.edit.submitters.description": "The E-People and Groups that have permission to submit new items to this collection.", "comcol-role.edit.submitters.description": "Käyttäjät ja ryhmät, joilla on oikeus tallentaa uusia tietueita tähän kokoelmaan", - // "comcol-role.edit.item_read.name": "Default item read access", "comcol-role.edit.item_read.name": "Tietueen oletuslukuoikeus", @@ -1399,7 +1846,6 @@ // "comcol-role.edit.item_read.anonymous-group": "Default read for incoming items is currently set to Anonymous.", "comcol-role.edit.item_read.anonymous-group": "Uusien tietuiden oletuslukuoikeus on tällä hetkellä Anonymous.", - // "comcol-role.edit.bitstream_read.name": "Default bitstream read access", "comcol-role.edit.bitstream_read.name": "Tiedostojen oletuslukuoikeus", @@ -1409,28 +1855,29 @@ // "comcol-role.edit.bitstream_read.anonymous-group": "Default read for incoming bitstreams is currently set to Anonymous.", "comcol-role.edit.bitstream_read.anonymous-group": "Uusien tiedostojen oletuslukuoikeus on tällä hetkellä Anonymous.", - // "comcol-role.edit.editor.name": "Editors", "comcol-role.edit.editor.name": "Muokkaajat", // "comcol-role.edit.editor.description": "Editors are able to edit the metadata of incoming submissions, and then accept or reject them.", "comcol-role.edit.editor.description": "Muokkaajat voivat muokata uusien tallennusten metadataa sekä hyväksyä tai hylätä tallennukset.", - // "comcol-role.edit.finaleditor.name": "Final editors", "comcol-role.edit.finaleditor.name": "Loppumuokkaajat", // "comcol-role.edit.finaleditor.description": "Final editors are able to edit the metadata of incoming submissions, but will not be able to reject them.", "comcol-role.edit.finaleditor.description": "Loppumuokkaajat voivat muokata uusien tallennusten metadataa. He eivät voi hylätä tallennuksia.", - // "comcol-role.edit.reviewer.name": "Reviewers", "comcol-role.edit.reviewer.name": "Tarkastajat", // "comcol-role.edit.reviewer.description": "Reviewers are able to accept or reject incoming submissions. However, they are not able to edit the submission's metadata.", "comcol-role.edit.reviewer.description": "Tarkastajat voivat hyväksyä tai hylätä uudet tallennukset. He eivät voi muokata tallennusten metadataa.", + // "comcol-role.edit.scorereviewers.name": "Score Reviewers", + "comcol-role.edit.scorereviewers.name": "Arvosanatarkastajat", + // "comcol-role.edit.scorereviewers.description": "Reviewers are able to give a score to incoming submissions, this will define whether the submission will be rejected or not.", + "comcol-role.edit.scorereviewers.description": "Tarkastajat voivat antaa tallennettaville julkaisuille arvosanan, joka määrittää, hylätäänkö vai hyväksytäänkö tallennus.", // "community.form.abstract": "Short Description", "community.form.abstract": "Lyhyt kuvaus", @@ -1471,8 +1918,6 @@ // "community.sub-community-list.head": "Communities of this Community", "community.sub-community-list.head": "Yhteisön alayhteisöt", - - // "cookies.consent.accept-all": "Accept all", "cookies.consent.accept-all": "Hyväksy kaikki", @@ -1494,6 +1939,12 @@ // "cookies.consent.app.required.title": "(always required)", "cookies.consent.app.required.title": "(aina pakollinen)", + // "cookies.consent.app.disable-all.description": "Use this switch to enable or disable all services.", + "cookies.consent.app.disable-all.description": "Tästä kytkimestä voit ottaa kaikki palvelut käyttöön tai poistaa ne käytöstä", + + // "cookies.consent.app.disable-all.title": "Enable or disable all services", + "cookies.consent.app.disable-all.title": "Ota käyttöön tai poista käytöstä kaikki palvelut", + // "cookies.consent.update": "There were changes since your last visit, please update your consent.", "cookies.consent.update": "Viime käyntisi jälkeen on tehty muutoksia. Ole hyvä ja päivitä suostumuksesi.", @@ -1503,9 +1954,21 @@ // "cookies.consent.decline": "Decline", "cookies.consent.decline": "Kieltäydy", + // "cookies.consent.ok": "That's ok", + "cookies.consent.ok": "OK", + + // "cookies.consent.save": "Save", + "cookies.consent.save": "Tallenna", + + // "cookies.consent.content-notice.title": "Cookie Consent", + "cookies.consent.content-notice.title": "Evästeiden hyväksyntä", + // "cookies.consent.content-notice.description": "We collect and process your personal information for the following purposes: Authentication, Preferences, Acknowledgement and Statistics.
To learn more, please read our {privacyPolicy}.", "cookies.consent.content-notice.description": "Keräämme ja käsittelemme tietojasi seuraaviin tarkoituksiin: todentaminen, asetukset, kuittaus ja tilastot.
Lisätietoa saat lukemalla tämän: {privacyPolicy}.", + // "cookies.consent.content-notice.description.no-privacy": "We collect and process your personal information for the following purposes: Authentication, Preferences, Acknowledgement and Statistics.", + "cookies.consent.content-notice.description.no-privacy": "Keräämme ja käsittelemme tietojasi seuraaviin tarkoituksiin: todentaminen, asetukset, kuittaus ja tilastot.", + // "cookies.consent.content-notice.learnMore": "Customize", "cookies.consent.content-notice.learnMore": "Räätälöi", @@ -1521,7 +1984,11 @@ // "cookies.consent.content-modal.title": "Information that we collect", "cookies.consent.content-modal.title": "Keräämämme tieto", + // "cookies.consent.content-modal.services": "services", + "cookies.consent.content-modal.services": "palvelut", + // "cookies.consent.content-modal.service": "service", + "cookies.consent.content-modal.service": "palvelu", // "cookies.consent.app.title.authentication": "Authentication", "cookies.consent.app.title.authentication": "Todentaminen", @@ -1529,30 +1996,29 @@ // "cookies.consent.app.description.authentication": "Required for signing you in", "cookies.consent.app.description.authentication": "Vaadittu kirjautumista varten", - // "cookies.consent.app.title.preferences": "Preferences", "cookies.consent.app.title.preferences": "Asetukset", // "cookies.consent.app.description.preferences": "Required for saving your preferences", "cookies.consent.app.description.preferences": "Vaadittu asetustesi tallentamista varten", - - // "cookies.consent.app.title.acknowledgement": "Acknowledgement", "cookies.consent.app.title.acknowledgement": "Kuittaus", // "cookies.consent.app.description.acknowledgement": "Required for saving your acknowledgements and consents", "cookies.consent.app.description.acknowledgement": "Vaadittu kuittaustesi ja hyväksyntäsi tallentamista varten", - - // "cookies.consent.app.title.google-analytics": "Google Analytics", "cookies.consent.app.title.google-analytics": "Google Analytics", // "cookies.consent.app.description.google-analytics": "Allows us to track statistical data", "cookies.consent.app.description.google-analytics": "Sallii tilastollisen datan seurannan", + // "cookies.consent.app.title.google-recaptcha": "Google reCaptcha", + "cookies.consent.app.title.google-recaptcha": "Google reCaptcha", + // "cookies.consent.app.description.google-recaptcha": "We use google reCAPTCHA service during registration and password recovery", + "cookies.consent.app.description.google-recaptcha": "Käytämme Googlen reCAPTCHA-palvelua rekisteröinnin ja salasanan palauttamisen yhteydessä.", // "cookies.consent.purpose.functional": "Functional", "cookies.consent.purpose.functional": "Toiminnallinen", @@ -1560,8 +2026,16 @@ // "cookies.consent.purpose.statistical": "Statistical", "cookies.consent.purpose.statistical": "Tilastollinen", + // "cookies.consent.purpose.registration-password-recovery": "Registration and Password recovery", + "cookies.consent.purpose.registration-password-recovery": "Rekisteröinti ja salasanan palauttaminen", - // "curation-task.task.checklinks.label": "Check Links in Metadata", + // "cookies.consent.purpose.sharing": "Sharing", + "cookies.consent.purpose.sharing": "Jakaminen", + + // "curation-task.task.citationpage.label": "Generate Citation Page", + "curation-task.task.citationpage.label": "Luo viittaussivu", + + // "curation-task.task.checklinks.label": "Check Links in Metadata", "curation-task.task.checklinks.label": "Tarkista metadatan linkit", // "curation-task.task.noop.label": "NOOP", @@ -1579,7 +2053,8 @@ // "curation-task.task.vscan.label": "Virus Scan", "curation-task.task.vscan.label": "Virusskannaus", - + // "curation-task.task.register-doi.label": "Register DOI", + "curation-task.task.register-doi.label": "Rekisteröi DOI", // "curation.form.task-select.label": "Task:", "curation.form.task-select.label": "Tehtävä:", @@ -1599,13 +2074,38 @@ // "curation.form.submit.error.content": "An error occured when trying to start the curation task.", "curation.form.submit.error.content": "Virhe kuratointitehtävää aloitettaessa.", + // "curation.form.submit.error.invalid-handle": "Couldn't determine the handle for this object", + "curation.form.submit.error.invalid-handle": "Kohteen handlea ei voitu määrittää", + // "curation.form.handle.label": "Handle:", "curation.form.handle.label": "Handle:", // "curation.form.handle.hint": "Hint: Enter [your-handle-prefix]/0 to run a task across entire site (not all tasks may support this capability)", "curation.form.handle.hint": "Vinkki: Syötä [oma-handle-prefix]/0 suorittaaksesi tehtävän koko sivustolla (kaikki tehtävät eivät tue tätä toimintoa)", + // "deny-request-copy.email.message": "Dear {{ recipientName }},\nIn response to your request I regret to inform you that it's not possible to send you a copy of the file(s) you have requested, concerning the document: \"{{ itemUrl }}\" ({{ itemName }}), of which I am an author.\n\nBest regards,\n{{ authorName }} <{{ authorEmail }}>", + "deny-request-copy.email.message": "Hyvä {{ recipientName }},\nValitettavasti emme voi lähettää kopiota pyytämistänne tiedostoista (dokumentti \"{{ itemUrl }}\" ({{ itemName }})), joiden tekijä olen. Ystävällisin terveisin \n{{ authorName }} <{{ authorEmail }}>", + // "deny-request-copy.email.subject": "Request copy of document", + "deny-request-copy.email.subject": "Dokumenttikopion pyyntö", + + // "deny-request-copy.error": "An error occurred", + "deny-request-copy.error": "Tapahtui virhe", + + // "deny-request-copy.header": "Deny document copy request", + "deny-request-copy.header": "Epää dokumenttikopion pyyntö", + + // "deny-request-copy.intro": "This message will be sent to the applicant of the request", + "deny-request-copy.intro": "Tämä viesti lähetetään pyynnön esittäjälle", + + // "deny-request-copy.success": "Successfully denied item request", + "deny-request-copy.success": "Tietuepyyntö evätty", + + // "dso.name.untitled": "Untitled", + "dso.name.untitled": "Nimetön", + + // "dso.name.unnamed": "Unnamed", + "dso.name.unnamed": "Nimeämätön", // "dso-selector.create.collection.head": "New collection", "dso-selector.create.collection.head": "Uusi kokoelma", @@ -1616,6 +2116,9 @@ // "dso-selector.create.community.head": "New community", "zxzcommunity.head": "Uusi yhteisö", + // "dso-selector.create.community.or-divider": "or", + "dso-selector.create.community.or-divider": "tai", + // "dso-selector.create.community.sub-level": "Create a new community in", "dso-selector.create.community.sub-level": "Luo uusi yhteisö tänne: ", @@ -1640,16 +2143,92 @@ // "dso-selector.edit.item.head": "Edit item", "dso-selector.edit.item.head": "Muokkaa tietuetta", + // "dso-selector.error.title": "An error occurred searching for a {{ type }}", + "dso-selector.error.title": "Virhe etsittäessä tyyppiä {{ type }}", + // "dso-selector.export-metadata.dspaceobject.head": "Export metadata from", "dso-selector.export-metadata.dspaceobject.head": "Eksportoi metadata täältä: ", + // "dso-selector.export-batch.dspaceobject.head": "Export Batch (ZIP) from", + "dso-selector.export-batch.dspaceobject.head": "Eksportoi erä (ZIP): ", + + // "dso-selector.import-batch.dspaceobject.head": "Import batch from", + "dso-selector.import-batch.dspaceobject.head": "Importoi erä: ", + // "dso-selector.no-results": "No {{ type }} found", "dso-selector.no-results": "Ei {{ type }}-tyyppiä.", // "dso-selector.placeholder": "Search for a {{ type }}", "dso-selector.placeholder": "Hae {{ type }}-tyyppiä", + // "dso-selector.select.collection.head": "Select a collection", + "dso-selector.select.collection.head": "Valitse kokoelma", + // "dso-selector.set-scope.community.head": "Select a search scope", + "dso-selector.set-scope.community.head": "Valitse hakualue", + + // "dso-selector.set-scope.community.button": "Search all of DSpace", + "dso-selector.set-scope.community.button": "Hae koko julkaisuarkistosta", + + // "dso-selector.set-scope.community.or-divider": "or", + "dso-selector.set-scope.community.or-divider": "tai", + + // "dso-selector.set-scope.community.input-header": "Search for a community or collection", + "dso-selector.set-scope.community.input-header": "Hae yhteisöä tai kokoelmaa", + + // "dso-selector.claim.item.head": "Profile tips", + "dso-selector.claim.item.head": "Profiilivinkkejä", + + // "dso-selector.claim.item.body": "These are existing profiles that may be related to you. If you recognize yourself in one of these profiles, select it and on the detail page, among the options, choose to claim it. Otherwise you can create a new profile from scratch using the button below.", + "dso-selector.claim.item.body": "Nämä ovat olemassa olevia profiileja, jotka saattavat liittyä sinuun. Jos tunnistat jonkin näistä profiileista omaksesi, valitse se ja valitse tarkentavan sivun vaihtoehdoista, että otat sen itsellesi. Muussa tapauksessa voit luoda uuden profiilin käyttämällä alla olevaa painiketta.", + + // "dso-selector.claim.item.not-mine-label": "None of these are mine", + "dso-selector.claim.item.not-mine-label": "Mikään näistä ei ole minun", + + // "dso-selector.claim.item.create-from-scratch": "Create a new one", + "dso-selector.claim.item.create-from-scratch": "Luo uusi", + + // "dso-selector.results-could-not-be-retrieved": "Something went wrong, please refresh again ↻", + "dso-selector.results-could-not-be-retrieved": "Tapahtui virhe, päivitä uudelleen ↻", + + // "supervision-group-selector.header": "Supervision Group Selector", + "supervision-group-selector.header": "Ohjausryhmän valitsin", + + // "supervision-group-selector.select.type-of-order.label": "Select a type of Order", + "supervision-group-selector.select.type-of-order.label": "Valitse tilauksen tyyppi", + + // "supervision-group-selector.select.type-of-order.option.none": "NONE", + "supervision-group-selector.select.type-of-order.option.none": "EI MITÄÄN", + + // "supervision-group-selector.select.type-of-order.option.editor": "EDITOR", + "supervision-group-selector.select.type-of-order.option.editor": "MUOKKAAJA", + + // "supervision-group-selector.select.type-of-order.option.observer": "OBSERVER", + "supervision-group-selector.select.type-of-order.option.observer": "KATSELIJA", + + // "supervision-group-selector.select.group.label": "Select a Group", + "supervision-group-selector.select.group.label": "Valitse ryhmä", + + // "supervision-group-selector.button.cancel": "Cancel", + "supervision-group-selector.button.cancel": "Peruuta", + + // "supervision-group-selector.button.save": "Save", + "supervision-group-selector.button.save": "Tallenna", + + // "supervision-group-selector.select.type-of-order.error": "Please select a type of order", + "supervision-group-selector.select.type-of-order.error": "Valitse tilauksen tyyppi", + + // "supervision-group-selector.select.group.error": "Please select a group", + "supervision-group-selector.select.group.error": "Valitse ryhmä", + + // "supervision-group-selector.notification.create.success.title": "Successfully created supervision order for group {{ name }}", + "supervision-group-selector.notification.create.success.title": "Ohjausmääräys luotu {{ name }}-ryhmälle", + + // "supervision-group-selector.notification.create.failure.title": "Error", + "supervision-group-selector.notification.create.failure.title": "Virhe", + + // "supervision-group-selector.notification.create.already-existing": "A supervision order already exists on this item for selected group", + "supervision-group-selector.notification.create.already-existing": "Tietueelle on jo ohjausmääräys valitulle ryhmälle", // "confirmation-modal.export-metadata.header": "Export metadata for {{ dsoName }}", "confirmation-modal.export-metadata.header": "Eksportoi {{ dsoName }}:n metadata", @@ -1663,11 +2242,23 @@ // "confirmation-modal.export-metadata.confirm": "Export", "confirmation-modal.export-metadata.confirm": "Eksportoi", + // "confirmation-modal.export-batch.header": "Export batch (ZIP) for {{ dsoName }}", + "confirmation-modal.export-batch.header": "Exportoi erä (ZIP) {{ dsoName }}", + + // "confirmation-modal.export-batch.info": "Are you sure you want to export batch (ZIP) for {{ dsoName }}", + "confirmation-modal.export-batch.info": "Haluatko varmasti eksportoida erän (ZIP) {{ dsoName }}?", + + // "confirmation-modal.export-batch.cancel": "Cancel", + "confirmation-modal.export-batch.cancel": "Peruuta", + + // "confirmation-modal.export-batch.confirm": "Export", + "confirmation-modal.export-batch.confirm": "Eksportoi", + // "confirmation-modal.delete-eperson.header": "Delete EPerson \"{{ dsoName }}\"", "confirmation-modal.delete-eperson.header": "Poista käyttäjä \"{{ dsoName }}\"", // "confirmation-modal.delete-eperson.info": "Are you sure you want to delete EPerson \"{{ dsoName }}\"", - "confirmation-modal.delete-eperson.info": "Haluatko varmasti poistaa käyttäjän \"{{ dsoName }}\"", + "confirmation-modal.delete-eperson.info": "Haluatko varmasti poistaa käyttäjän \"{{ dsoName }}\"?", // "confirmation-modal.delete-eperson.cancel": "Cancel", "confirmation-modal.delete-eperson.cancel": "Peruuta", @@ -1675,6 +2266,29 @@ // "confirmation-modal.delete-eperson.confirm": "Delete", "confirmation-modal.delete-eperson.confirm": "Poista", + // "confirmation-modal.delete-profile.header": "Delete Profile", + "confirmation-modal.delete-profile.header": "Poista profiili", + + // "confirmation-modal.delete-profile.info": "Are you sure you want to delete your profile", + "confirmation-modal.delete-profile.info": "Haluatko varmasti poistaa profiilisi?", + + // "confirmation-modal.delete-profile.cancel": "Cancel", + "confirmation-modal.delete-profile.cancel": "Peruuta", + + // "confirmation-modal.delete-profile.confirm": "Delete", + "confirmation-modal.delete-profile.confirm": "Poista", + + // "confirmation-modal.delete-subscription.header": "Delete Subscription", + "confirmation-modal.delete-subscription.header": "Poista tilaus", + + // "confirmation-modal.delete-subscription.info": "Are you sure you want to delete subscription for \"{{ dsoName }}\"", + "confirmation-modal.delete-subscription.info": "Haluatko varmasti poistaa tilauksen: \"{{ dsoName }}\"", + + // "confirmation-modal.delete-subscription.cancel": "Cancel", + "confirmation-modal.delete-subscription.cancel": "Peruuta", + + // "confirmation-modal.delete-subscription.confirm": "Delete", + "confirmation-modal.delete-subscription.confirm": "Poista", // "error.bitstream": "Error fetching bitstream", "error.bitstream": "Virhe tiedostoa noudettaessa", @@ -1712,6 +2326,9 @@ // "error.search-results": "Error fetching search results", "error.search-results": "Virhe hakutuloksia noudettaessa", + // "error.invalid-search-query": "Search query is not valid. Please check Solr query syntax best practices for further information about this error.", + "error.invalid-search-query": "Hakulauseke on virheellinen. Tarkista Solr-kyselysyntaksi ja sieltä parhaat käytännöt saadaksesi lisätietoja.", + // "error.sub-collections": "Error fetching sub-collections", "error.sub-collections": "Virhe alakokoelmia noudettaessa", @@ -1733,13 +2350,45 @@ // "error.validation.filerequired": "The file upload is mandatory", "error.validation.filerequired": "Tiedoston lataus on pakollinen", + // "error.validation.required": "This field is required", + "error.validation.required": "Kenttä on pakollinen", + // "error.validation.NotValidEmail": "This E-mail is not a valid email", + "error.validation.NotValidEmail": "Sähköpostiosoite ei ole toimiva sähköpostiosoite.", + + // "error.validation.emailTaken": "This E-mail is already taken", + "error.validation.emailTaken": "Sähköpostiosoite on jo käytössä", + + // "error.validation.groupExists": "This group already exists", + "error.validation.groupExists": "Ryhmä on jo olemassa", + + // "error.validation.metadata.name.invalid-pattern": "This field cannot contain dots, commas or spaces. Please use the Element & Qualifier fields instead", + "error.validation.metadata.name.invalid-pattern": "Kenttään ei voi syöttää pisteitä, pilkkuja tai välilyöntejä. Käytä tämän kentän sijasta Elementti- ja Tarkenne-kenttiä.", + + // "error.validation.metadata.name.max-length": "This field may not contain more than 32 characters", + "error.validation.metadata.name.max-length": "Kenttään voi laittaa vain 32 merkkiä", + + // "error.validation.metadata.namespace.max-length": "This field may not contain more than 256 characters", + "error.validation.metadata.namespace.max-length": "Kenttään voi laittaa vain 256 merkkiä", + + // "error.validation.metadata.element.invalid-pattern": "This field cannot contain dots, commas or spaces. Please use the Qualifier field instead", + "error.validation.metadata.element.invalid-pattern": "Kenttään ei voi syöttää pisteitä, pilkkuja tai välilyöntejä. Käytä tämän kentän sijasta Elementti- ja Tarkenne-kenttiä.", + + // "error.validation.metadata.element.max-length": "This field may not contain more than 64 characters", + "error.validation.metadata.element.max-length": "Kenttään voi laittaa vain 64 merkkiä", + + // "error.validation.metadata.qualifier.invalid-pattern": "This field cannot contain dots, commas or spaces", + "error.validation.metadata.qualifier.invalid-pattern": "Kenttään ei voi syöttää pisteitä, pilkkuja tai välilyöntejä", + + // "error.validation.metadata.qualifier.max-length": "This field may not contain more than 64 characters", + "error.validation.metadata.qualifier.max-length": "Kenttään voi laittaa vain 64 merkkiä", + + // "feed.description": "Syndication feed", + "feed.description": "Jakelusyöte", // "file-section.error.header": "Error obtaining files for this item", "file-section.error.header": "Virhe tietueen tiedostoja noudettaessa", - - // "footer.copyright": "copyright © 2002-{{ year }}", "footer.copyright": "tekijänoikeus © 2002-{{ year }}", @@ -1755,16 +2404,17 @@ // "footer.link.privacy-policy": "Privacy policy", "footer.link.privacy-policy": "Yksilönsuoja", - // "footer.link.end-user-agreement":"End User Agreement", - "footer.link.end-user-agreement": "Käyttöehdot", - + // "footer.link.end-user-agreement": "End User Agreement", + "footer.link.end-user-agreement": "Käyttöoikeussopimus", + // "footer.link.feedback": "Send Feedback", + "footer.link.feedback": "Lähetä palautetta", // "forgot-email.form.header": "Forgot Password", "forgot-email.form.header": "Unohtunut salasana", - // "forgot-email.form.info": "Enter Register an account to subscribe to collections for email updates, and submit new items to DSpace.", - "forgot-email.form.info": "Rekisteröi käyttäjätili voidaksesi tilata sähköposti-ilmoituksia kokoelmien päivityksistä ja lisätä uusia tietueita julkaisuarkistoon.", + // "forgot-email.form.info": "Enter the email address associated with the account.", + "forgot-email.form.info": "Syötä tiliin liittyvä sähköpostiosoite.", // "forgot-email.form.email": "Email Address *", "forgot-email.form.email": "Sähköpostiosoite *", @@ -1772,28 +2422,26 @@ // "forgot-email.form.email.error.required": "Please fill in an email address", "forgot-email.form.email.error.required": "Anna sähköpostiosoite", - // "forgot-email.form.email.error.pattern": "Please fill in a valid email address", - "forgot-email.form.email.error.pattern": "Anna oikea sähköpostiosoite", + // "forgot-email.form.email.error.not-email-form": "Please fill in a valid email address", + "forgot-email.form.email.error.not-email-form": "Anna toimiva sähköpostiosoite", - // "forgot-email.form.email.hint": "This address will be verified and used as your login name.", - "forgot-email.form.email.hint": "Osoite varmistetaan, ja se toimii käyttäjätunnuksenasi kirjautumisessa.", + // "forgot-email.form.email.hint": "An email will be sent to this address with a further instructions.", + "forgot-email.form.email.hint": "Sähköpostiosoitteeseen lähetetään viesti, jossa on lisäohjeita.", - // "forgot-email.form.submit": "Submit", - "forgot-email.form.submit": "Lähetä", + // "forgot-email.form.submit": "Reset password", + "forgot-email.form.submit": "Nollaa salasana", - // "forgot-email.form.success.head": "Verification email sent", - "forgot-email.form.success.head": "Varmistusviesti lähetetty", + // "forgot-email.form.success.head": "Password reset email sent", + "forgot-email.form.success.head": "Salasanan nollausviesti lähetetty", // "forgot-email.form.success.content": "An email has been sent to {{ email }} containing a special URL and further instructions.", "forgot-email.form.success.content": "Viesti on lähetetty osoitteeseen {{ email }}. Viestissä on URL-osoite ja lisäohjeita.", - // "forgot-email.form.error.head": "Error when trying to register email", - "forgot-email.form.error.head": "Virhe sähköpostiosoitetta rekisteröitäessä", - - // "forgot-email.form.error.content": "An error occured when registering the following email address: {{ email }}", - "forgot-email.form.error.content": "Virhe rekisteröitäessä tätä sähköpostiosoitetta: {{ email }}", - + // "forgot-email.form.error.head": "Error when trying to reset password", + "forgot-email.form.error.head": "Virhe salasanaa nollattaessa", + // "forgot-email.form.error.content": "An error occured when attempting to reset the password for the account associated with the following email address: {{ email }}", + "forgot-email.form.error.content": "Virhe nollattaessa tähän sähköpostiosoitteeseen liittyvän tilin salasanaa {{ email }}", // "forgot-password.title": "Forgot Password", "forgot-password.title": "Unohtunut salasana", @@ -1801,8 +2449,8 @@ // "forgot-password.form.head": "Forgot Password", "forgot-password.form.head": "Unohtunut salasana", - // "forgot-password.form.info": "Enter a new password in the box below, and confirm it by typing it again into the second box. It should be at least six characters long.", - "forgot-password.form.info": "Syötä uusi salasana alla olevaan kenttään ja vahvista se kirjoittamalla salasana uudelleen seuraavaan kenttään. Salasanan on oltava vähintään kuusi merkkiä pitkä.", + // "forgot-password.form.info": "Enter a new password in the box below, and confirm it by typing it again into the second box.", + "forgot-password.form.info": "Syötä uusi salasana alla olevaan kenttään ja vahvista se kirjoittamalla salasana uudelleen seuraavaan kenttään.", // "forgot-password.form.card.security": "Security", "forgot-password.form.card.security": "Turvallisuus", @@ -1825,9 +2473,6 @@ // "forgot-password.form.error.matching-passwords": "The passwords do not match.", "forgot-password.form.error.matching-passwords": "Salasanat eivät täsmää.", - // "forgot-password.form.error.password-length": "The password should be at least 6 characters long.", - "forgot-password.form.error.password-length": "Salasanan on oltava vähintään 6 merkkiä pitkä.", - // "forgot-password.form.notification.error.title": "Error when trying to submit new password", "forgot-password.form.notification.error.title": "Virhe uutta salasanaa lähetettäessä", @@ -1840,10 +2485,8 @@ // "forgot-password.form.submit": "Submit password", "forgot-password.form.submit": "Lähetä salasana", - - - // "form.add": "Add", - "form.add": "Lisää", + // "form.add": "Add more", + "form.add": "Lisää vielä", // "form.add-help": "Click here to add the current entry and to add another one", "form.add-help": "Valitse lisätäksesi nykyisen kohteen ja toisen kohteen", @@ -1855,13 +2498,19 @@ "form.clear": "Tyhjennä", // "form.clear-help": "Click here to remove the selected value", - "form.clear-help": "Napauta tästä poistaaksesi valitun arvon", + "form.clear-help": "Napsauta tästä poistaaksesi valitun arvon", + + // "form.discard": "Discard", + "form.discard": "Hylkää", + + // "form.drag": "Drag", + "form.drag": "Raahaa", // "form.edit": "Edit", "form.edit": "Muokkaa", // "form.edit-help": "Click here to edit the selected value", - "form.edit-help": "Napauta tästä muokataksesi valittua arvoa", + "form.edit-help": "Napsauta tästä muokataksesi valittua arvoa", // "form.first-name": "First name", "form.first-name": "Etunimi", @@ -1896,6 +2545,24 @@ // "form.no-value": "No value entered", "form.no-value": "Ei syötettyä arvoa", + // "form.other-information.email": "Email", + "form.other-information.email": "Sähköpostiosoite", + + // "form.other-information.first-name": "First Name", + "form.other-information.first-name": "Etunimi", + + // "form.other-information.insolr": "In Solr Index", + "form.other-information.insolr": "Solr-indeksissä", + + // "form.other-information.institution": "Institution", + "form.other-information.institution": "Instituutio", + + // "form.other-information.last-name": "Last Name", + "form.other-information.last-name": "Sukunimi", + + // "form.other-information.orcid": "ORCID", + "form.other-information.orcid": "ORCID-tunniste", + // "form.remove": "Remove", "form.remove": "Poista", @@ -1911,10 +2578,134 @@ // "form.search-help": "Click here to look for an existing correspondence", "form.search-help": "Valitse etsiäksesi olemassa olevaa vastaavuutta", - // "form.submit": "Submit", - "form.submit": "Lähetä", + // "form.submit": "Save", + "form.submit": "Tallenna", + // "form.create": "Create", + "form.create": "Luo", + // "form.repeatable.sort.tip": "Drop the item in the new position", + "form.repeatable.sort.tip": "Pudota tietue uuteen paikkaan", + + // "grant-deny-request-copy.deny": "Don't send copy", + "grant-deny-request-copy.deny": "Älä lähetä kopiota", + + // "grant-deny-request-copy.email.back": "Back", + "grant-deny-request-copy.email.back": "Paluu", + + // "grant-deny-request-copy.email.message": "Optional additional message", + "grant-deny-request-copy.email.message": "Valinnainen lisäviesti", + + // "grant-deny-request-copy.email.message.empty": "Please enter a message", + "grant-deny-request-copy.email.message.empty": "Kirjoita viesti", + + // "grant-deny-request-copy.email.permissions.info": "You may use this occasion to reconsider the access restrictions on the document, to avoid having to respond to these requests. If you’d like to ask the repository administrators to remove these restrictions, please check the box below.", + "grant-deny-request-copy.email.permissions.info": "Voit harkita uudelleen dokumentin pääsyrajoituksia, jotta sinun ei tarvitse vastata näihin pyyntöihin. Rastita alla oleva ruutu pyytääksesi julkaisuarkiston ylläpitäjää poistamaan rajoitukset.", + + // "grant-deny-request-copy.email.permissions.label": "Change to open access", + "grant-deny-request-copy.email.permissions.label": "Valitse Open Access", + + // "grant-deny-request-copy.email.send": "Send", + "grant-deny-request-copy.email.send": "Lähetä", + + // "grant-deny-request-copy.email.subject": "Subject", + "grant-deny-request-copy.email.subject": "Asiasana", + + // "grant-deny-request-copy.email.subject.empty": "Please enter a subject", + "grant-deny-request-copy.email.subject.empty": "Syötä asiasana", + + // "grant-deny-request-copy.grant": "Send copy", + "grant-deny-request-copy.grant": "Lähetä kopio", + + // "grant-deny-request-copy.header": "Document copy request", + "grant-deny-request-copy.header": "Dokumenttikopion pyyntö", + + // "grant-deny-request-copy.home-page": "Take me to the home page", + "grant-deny-request-copy.home-page": "Palaa etusivulle", + + // "grant-deny-request-copy.intro1": "If you are one of the authors of the document {{ name }}, then please use one of the options below to respond to the user's request.", + "grant-deny-request-copy.intro1": "Jos olet dokumentin {{ name }} tekijä, vastaa käyttäjän pyyntöön jollakin alla olevista vaihtoehdoista.", + + // "grant-deny-request-copy.intro2": "After choosing an option, you will be presented with a suggested email reply which you may edit.", + "grant-deny-request-copy.intro2": "Valittuasi vaihtoehdon näet sähköpostiviestiehdotuksen. Voit muokata ehdotusta halutessasi.", + + // "grant-deny-request-copy.processed": "This request has already been processed. You can use the button below to get back to the home page.", + "grant-deny-request-copy.processed": "Pyyntö on käsitelty. Voit käyttää alla olevaa painiketta palataksesi etusivulle.", + + // "grant-request-copy.email.subject": "Request copy of document", + "grant-request-copy.email.subject": "Pyydä kopiota dokumentista", + + // "grant-request-copy.error": "An error occurred", + "grant-request-copy.error": "Tapahtui virhe", + + // "grant-request-copy.header": "Grant document copy request", + "grant-request-copy.header": "Hyväksy dokumenttikopion pyyntö", + + // "grant-request-copy.intro": "A message will be sent to the applicant of the request. The requested document(s) will be attached.", + "grant-request-copy.intro": "Viesti lähetetään pyynnön esittäjälle. Pyydetyt dokumentit liitetään viestiin.", + + // "grant-request-copy.success": "Successfully granted item request", + "grant-request-copy.success": "Tietuepyyntö hyväksytty", + + // "health.breadcrumbs": "Health", + "health.breadcrumbs": "Järjestelmän kunto", + + // "health-page.heading": "Health", + "health-page.heading": "Järjestelmän kunto", + + // "health-page.info-tab": "Info", + "health-page.info-tab": "Tiedot", + + // "health-page.status-tab": "Status", + "health-page.status-tab": "Tila", + + // "health-page.error.msg": "The health check service is temporarily unavailable", + "health-page.error.msg": "Järjestelmän kunnon tarkistus on väliaikaisesti poissa käytöstä", + + // "health-page.property.status": "Status code", + "health-page.property.status": "Tilakoodi", + + // "health-page.section.db.title": "Database", + "health-page.section.db.title": "Tietokanta", + + // "health-page.section.geoIp.title": "GeoIp", + "health-page.section.geoIp.title": "GeoIp", + + // "health-page.section.solrAuthorityCore.title": "Solr: authority core", + "health-page.section.solrAuthorityCore.title": "Solr: auktoriteettiydin", + + // "health-page.section.solrOaiCore.title": "Solr: oai core", + "health-page.section.solrOaiCore.title": "Solr: OAI-ydin", + + // "health-page.section.solrSearchCore.title": "Solr: search core", + "health-page.section.solrSearchCore.title": "Solr: hakuydin", + + // "health-page.section.solrStatisticsCore.title": "Solr: statistics core", + "health-page.section.solrStatisticsCore.title": "Solr: tilastoydin", + + // "health-page.section-info.app.title": "Application Backend", + "health-page.section-info.app.title": "Taustasovellus", + + // "health-page.section-info.java.title": "Java", + "health-page.section-info.java.title": "Java", + + // "health-page.status": "Status", + "health-page.status": "Tila", + + // "health-page.status.ok.info": "Operational", + "health-page.status.ok.info": "Toiminnassa", + + // "health-page.status.error.info": "Problems detected", + "health-page.status.error.info": "Ongelmia havaittu", + + // "health-page.status.warning.info": "Possible issues detected", + "health-page.status.warning.info": "Mahdollisia ongelmia havaittu", + + // "health-page.title": "Health", + "health-page.title": "Järjestelmän kunto", + + // "health-page.section.no-issues": "No issues detected", + "health-page.section.no-issues": "Ei havaittuja ongelmia", // "home.description": "", "home.description": "", @@ -1922,11 +2713,11 @@ // "home.breadcrumbs": "Home", "home.breadcrumbs": "Etusivu", - // "home.search-form.placeholder": "Search the repository ...", + // "home.search-form.placeholder": "Search the repository ...", "home.search-form.placeholder": "Hae julkaisuarkistosta ...", - // "home.title": "DSpace Angular :: Home", - "home.title": "DSpace Angular :: Etusivu", + // "home.title": "Home", + "home.title": "Etusivu", // "home.top-level-communities.head": "Communities in DSpace", "home.top-level-communities.head": "Julkaisuarkiston yhteisöt", @@ -1934,19 +2725,17 @@ // "home.top-level-communities.help": "Select a community to browse its collections.", "home.top-level-communities.help": "Valitse yhteisö, jonka kokoelmia haluat selata.", - - // "info.end-user-agreement.accept": "I have read and I agree to the End User Agreement", - "info.end-user-agreement.accept": "Olen lukenut ja hyväksyn käyttöehdot", + "info.end-user-agreement.accept": "Olen lukenut ja hyväksyn käyttöoikeussopimuksen", // "info.end-user-agreement.accept.error": "An error occurred accepting the End User Agreement", - "info.end-user-agreement.accept.error": "Virhe hyväksyttäessä käyttöehtoja", + "info.end-user-agreement.accept.error": "Virhe hyväksyttäessä käyttöoikeussopimusta", // "info.end-user-agreement.accept.success": "Successfully updated the End User Agreement", - "info.end-user-agreement.accept.success": "Käyttöehdot päivitetty", + "info.end-user-agreement.accept.success": "Käyttöoikeussopimus päivitetty", // "info.end-user-agreement.breadcrumbs": "End User Agreement", - "info.end-user-agreement.breadcrumbs": "Käyttöehdot", + "info.end-user-agreement.breadcrumbs": "Käyttöoikeussopimus", // "info.end-user-agreement.buttons.cancel": "Cancel", "info.end-user-agreement.buttons.cancel": "Peruuta", @@ -1955,10 +2744,13 @@ "info.end-user-agreement.buttons.save": "Tallenna", // "info.end-user-agreement.head": "End User Agreement", - "info.end-user-agreement.head": "Käyttöehdot", + "info.end-user-agreement.head": "Käyttöoikeussopimus", // "info.end-user-agreement.title": "End User Agreement", - "info.end-user-agreement.title": "Käyttöehdot", + "info.end-user-agreement.title": "Käyttöoikeussopimus", + + // "info.end-user-agreement.hosting-country": "the United States", + "info.end-user-agreement.hosting-country": "Suomi", // "info.privacy.breadcrumbs": "Privacy Statement", "info.privacy.breadcrumbs": "Tietosuojalauseke", @@ -1969,39 +2761,68 @@ // "info.privacy.title": "Privacy Statement", "info.privacy.title": "Tietosuojalauseke", + // "info.feedback.breadcrumbs": "Feedback", + "info.feedback.breadcrumbs": "Palaute", + // "info.feedback.head": "Feedback", + "info.feedback.head": "Palaute", - // "item.alerts.private": "This item is private", + // "info.feedback.title": "Feedback", + "info.feedback.title": "Palaute", + + // "info.feedback.info": "Thanks for sharing your feedback about the DSpace system. Your comments are appreciated!", + "info.feedback.info": "Kiitos antamastasi palautteesta. Havaintosi ovat arvokkaita!", + + // "info.feedback.email_help": "This address will be used to follow up on your feedback.", + "info.feedback.email_help": "Tätä osoitetta käytetään palautteesi käsittelyssä.", + + // "info.feedback.send": "Send Feedback", + "info.feedback.send": "Lähetä palautetta", + + // "info.feedback.comments": "Comments", + "info.feedback.comments": "Kommentit", + + // "info.feedback.email-label": "Your Email", + "info.feedback.email-label": "Sähköpostiosoitteesi", + + // "info.feedback.create.success": "Feedback Sent Successfully!", + "info.feedback.create.success": "Palaute lähetetty!", + + // "info.feedback.error.email.required": "A valid email address is required", + "info.feedback.error.email.required": "Toimiva sähköpostiosoite on pakollinen", + + // "info.feedback.error.message.required": "A comment is required", + "info.feedback.error.message.required": "Kommentti on pakollinen", + + // "info.feedback.page-label": "Page", + "info.feedback.page-label": "Sivu", + + // "info.feedback.page_help": "Tha page related to your feedback", + "info.feedback.page_help": "Sivu, johon palautteesi kohdistuu", + + // "item.alerts.private": "This item is non-discoverable", "item.alerts.private": "Tietue on yksityinen", // "item.alerts.withdrawn": "This item has been withdrawn", "item.alerts.withdrawn": "Tietue on poistettu käytöstä", - - // "item.edit.authorizations.heading": "With this editor you can view and alter the policies of an item, plus alter policies of individual item components: bundles and bitstreams. Briefly, an item is a container of bundles, and bundles are containers of bitstreams. Containers usually have ADD/REMOVE/READ/WRITE policies, while bitstreams only have READ/WRITE policies.", "item.edit.authorizations.heading": "Tässä voit tarkastella ja muokata tietuekäytäntöjä sekä tietueen yksittäisten komponenttien eli nippujen ja tiedostojen käytäntöjä. Tietue on nippujen säiliö ja niput ovat tiedostojen säiliöitä. Säiliöillä on yleensä LISÄYS/POISTO/LUKU/KIRJOITUS-käytännöt, mutta tiedostoihin sovelletaan vain LUKU/KIRJOITUS-käytäntöjä.", - - // "item.edit.authorizations.title": "Edit item's Policies", "item.edit.authorizations.title": "Muokkaa tietuekäytäntöjä", - - - // "item.badge.private": "Private", + // "item.badge.private": "Non-discoverable", "item.badge.private": "Yksityinen", // "item.badge.withdrawn": "Withdrawn", "item.badge.withdrawn": "Poistettu käytöstä", - - // "item.bitstreams.upload.bundle": "Bundle", "item.bitstreams.upload.bundle": "Nippu", - // "item.bitstreams.upload.bundle.placeholder": "Select a bundle", - "item.bitstreams.upload.bundle.placeholder": "Valitse nippu", + // "item.bitstreams.upload.bundle.placeholder": "Select a bundle or input new bundle name", + "item.bitstreams.upload.bundle.placeholder": "Valitse nippu tai syötä uuden nipun nimi", // "item.bitstreams.upload.bundle.new": "Create bundle", "item.bitstreams.upload.bundle.new": "Luo nippu", @@ -2030,8 +2851,6 @@ // "item.bitstreams.upload.title": "Upload bitstream", "item.bitstreams.upload.title": "Lataa tiedosto", - - // "item.edit.bitstreams.bundle.edit.buttons.upload": "Upload", "item.edit.bitstreams.bundle.edit.buttons.upload": "Lataus", @@ -2063,7 +2882,7 @@ "item.edit.bitstreams.edit.buttons.remove": "Poista", // "item.edit.bitstreams.edit.buttons.undo": "Undo changes", - "item.edit.bitstreams.edit.buttons.undo": "Peruuta muutokset", + "item.edit.bitstreams.edit.buttons.undo": "Kumoa muutokset", // "item.edit.bitstreams.empty": "This item doesn't contain any bitstreams. Click the upload button to create one.", "item.edit.bitstreams.empty": "Tietueeseen ei liity tiedostoja. Valitse latauspainike luodaksesi tiedoston.", @@ -2122,8 +2941,6 @@ // "item.edit.bitstreams.upload-button": "Upload", "item.edit.bitstreams.upload-button": "Lataa", - - // "item.edit.delete.cancel": "Cancel", "item.edit.delete.cancel": "Peruuta", @@ -2148,6 +2965,8 @@ // "item.edit.breadcrumbs": "Edit Item", "item.edit.breadcrumbs": "Muokkaa tietuetta", + // "item.edit.tabs.disabled.tooltip": "You're not authorized to access this tab", + "item.edit.tabs.disabled.tooltip": "Sinulla ei ole valtuuksia tähän välilehteen", // "item.edit.tabs.mapper.head": "Collection Mapper", "item.edit.tabs.mapper.head": "Kokoelmaliitosväline", @@ -2155,6 +2974,69 @@ // "item.edit.tabs.item-mapper.title": "Item Edit - Collection Mapper", "item.edit.tabs.item-mapper.title": "Tietueen muokkaus - Kokoelmaliitosväline", + // "item.edit.identifiers.doi.status.UNKNOWN": "Unknown", + "item.edit.identifiers.doi.status.UNKNOWN": "Tuntematon", + + // "item.edit.identifiers.doi.status.TO_BE_REGISTERED": "Queued for registration", + "item.edit.identifiers.doi.status.TO_BE_REGISTERED": "Rekisteröintijonossa", + + // "item.edit.identifiers.doi.status.TO_BE_RESERVED": "Queued for reservation", + "item.edit.identifiers.doi.status.TO_BE_RESERVED": "Varausjonossa", + + // "item.edit.identifiers.doi.status.IS_REGISTERED": "Registered", + "item.edit.identifiers.doi.status.IS_REGISTERED": "Rekisteröity", + + // "item.edit.identifiers.doi.status.IS_RESERVED": "Reserved", + "item.edit.identifiers.doi.status.IS_RESERVED": "Varattu", + + // "item.edit.identifiers.doi.status.UPDATE_RESERVED": "Reserved (update queued)", + "item.edit.identifiers.doi.status.UPDATE_RESERVED": "Varattu (päivitysjonossa)", + + // "item.edit.identifiers.doi.status.UPDATE_REGISTERED": "Registered (update queued)", + "item.edit.identifiers.doi.status.UPDATE_REGISTERED": "Rekisteröity (päivitysjonossa)", + + // "item.edit.identifiers.doi.status.UPDATE_BEFORE_REGISTRATION": "Queued for update and registration", + "item.edit.identifiers.doi.status.UPDATE_BEFORE_REGISTRATION": "Päivitys- ja rekisteröintijonossa", + + // "item.edit.identifiers.doi.status.TO_BE_DELETED": "Queued for deletion", + "item.edit.identifiers.doi.status.TO_BE_DELETED": "Poistojonossa", + + // "item.edit.identifiers.doi.status.DELETED": "Deleted", + "item.edit.identifiers.doi.status.DELETED": "Poistettu", + + // "item.edit.identifiers.doi.status.PENDING": "Pending (not registered)", + "item.edit.identifiers.doi.status.PENDING": "Vireillä (ei rekisteröity)", + + // "item.edit.identifiers.doi.status.MINTED": "Minted (not registered)", + "item.edit.identifiers.doi.status.MINTED": "Luotu (ei rekisteröity)", + + // "item.edit.tabs.status.buttons.register-doi.label": "Register a new or pending DOI", + "item.edit.tabs.status.buttons.register-doi.label": "Rekisteröi uusi tai vireillä oleva DOI", + + // "item.edit.tabs.status.buttons.register-doi.button": "Register DOI...", + "item.edit.tabs.status.buttons.register-doi.button": "Rekisteröi DOI...", + + // "item.edit.register-doi.header": "Register a new or pending DOI", + "item.edit.register-doi.header": "Rekisteröi uusi tai vireillä oleva DOI", + + // "item.edit.register-doi.description": "Review any pending identifiers and item metadata below and click Confirm to proceed with DOI registration, or Cancel to back out", + "item.edit.register-doi.description": "Tarkasta vireillä olevat tunnisteet ja tietueitten metadata alapuolella. Napsauta Vahvista jatkaaksesi DOI-tunnuksen rekisteröintiä tai Peruuta peruuttaaksesi.", + + // "item.edit.register-doi.confirm": "Confirm", + "item.edit.register-doi.confirm": "Vahvista", + + // "item.edit.register-doi.cancel": "Cancel", + "item.edit.register-doi.cancel": "Peruuta", + + // "item.edit.register-doi.success": "DOI queued for registration successfully.", + "item.edit.register-doi.success": "DOI lisätty rekisteröintijonoon.", + + // "item.edit.register-doi.error": "Error registering DOI", + "item.edit.register-doi.error": "Virhe rekisteröitäessä DOI-tunnusta", + + // "item.edit.register-doi.to-update": "The following DOI has already been minted and will be queued for registration online", + "item.edit.register-doi.to-update": "DOI on jo luotu ja lisätään rekisteröintijonoon verkossa", + // "item.edit.item-mapper.buttons.add": "Map item to selected collections", "item.edit.item-mapper.buttons.add": "Liitä tietue valittuihin kokoelmiin", @@ -2200,20 +3082,27 @@ // "item.edit.item-mapper.notifications.remove.success.head": "Removal of mapping completed", "item.edit.item-mapper.notifications.remove.success.head": "Liitos poistettu", + // "item.edit.item-mapper.search-form.placeholder": "Search collections...", + "item.edit.item-mapper.search-form.placeholder": "Hae kokoelmia...", + // "item.edit.item-mapper.tabs.browse": "Browse mapped collections", "item.edit.item-mapper.tabs.browse": "Selaa liitettyjä kokoelmia", // "item.edit.item-mapper.tabs.map": "Map new collections", "item.edit.item-mapper.tabs.map": "Liitä uusia kokoelmia", - - // "item.edit.metadata.add-button": "Add", "item.edit.metadata.add-button": "Lisää", // "item.edit.metadata.discard-button": "Discard", "item.edit.metadata.discard-button": "Hylkää", + // "item.edit.metadata.edit.buttons.confirm": "Confirm", + "item.edit.metadata.edit.buttons.confirm": "Vahvista", + + // "item.edit.metadata.edit.buttons.drag": "Drag to reorder", + "item.edit.metadata.edit.buttons.drag": "Raahaa uudelleenjärjestääksesi", + // "item.edit.metadata.edit.buttons.edit": "Edit", "item.edit.metadata.edit.buttons.edit": "Muokkaa", @@ -2226,6 +3115,9 @@ // "item.edit.metadata.edit.buttons.unedit": "Stop editing", "item.edit.metadata.edit.buttons.unedit": "Lopeta muokkaus", + // "item.edit.metadata.edit.buttons.virtual": "This is a virtual metadata value, i.e. a value inherited from a related entity. It can’t be modified directly. Add or remove the corresponding relationship in the \"Relationships\" tab", + "item.edit.metadata.edit.buttons.virtual": "Tämä on virtuaalinen metadata-arvo eli arvo, joka on peritty liittyvältä entiteetiltä. Sitä ei voi muokata suoraan. Lisää tai poista yhteys \"Suhteet\"-välilehdellä,", + // "item.edit.metadata.empty": "The item currently doesn't contain any metadata. Click Add to start adding a metadata value.", "item.edit.metadata.empty": "Tietueessa ei ole metadataa. Valitse Lisää lisätäksesi metadataa.", @@ -2241,13 +3133,16 @@ // "item.edit.metadata.headers.value": "Value", "item.edit.metadata.headers.value": "Arvo", + // "item.edit.metadata.metadatafield.error": "An error occurred validating the metadata field", + "item.edit.metadata.metadatafield.error": "Virhe validoitaessa metadatakenttää", + // "item.edit.metadata.metadatafield.invalid": "Please choose a valid metadata field", "item.edit.metadata.metadatafield.invalid": "Valitse oikea metadatakenttä", // "item.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", "item.edit.metadata.notifications.discarded.content": "Muutokset hylätty. Valitse 'Kumoa' palauttaaksesi muutokset", - // "item.edit.metadata.notifications.discarded.title": "Changed discarded", + // "item.edit.metadata.notifications.discarded.title": "Changes discarded", "item.edit.metadata.notifications.discarded.title": "Muutokset hylätty", // "item.edit.metadata.notifications.error.title": "An error occurred", @@ -2262,7 +3157,7 @@ // "item.edit.metadata.notifications.outdated.content": "The item you're currently working on has been changed by another user. Your current changes are discarded to prevent conflicts", "item.edit.metadata.notifications.outdated.content": "Toinen käyttäjä on muuttanut parhaillaan muokkaamaasi tietuetta. Tekemäsi muutokset on hylätty ristiriitojen estämiseksi", - // "item.edit.metadata.notifications.outdated.title": "Changed outdated", + // "item.edit.metadata.notifications.outdated.title": "Changes outdated", "item.edit.metadata.notifications.outdated.title": "Muutokset vanhentuneet", // "item.edit.metadata.notifications.saved.content": "Your changes to this item's metadata were saved.", @@ -2272,13 +3167,14 @@ "item.edit.metadata.notifications.saved.title": "Metadata tallennettu", // "item.edit.metadata.reinstate-button": "Undo", - "item.edit.metadata.reinstate-button": "Peruuta", + "item.edit.metadata.reinstate-button": "Kumoa", + + // "item.edit.metadata.reset-order-button": "Undo reorder", + "item.edit.metadata.reset-order-button": "Kumoa uudelleenjärjestäminen", // "item.edit.metadata.save-button": "Save", "item.edit.metadata.save-button": "Tallenna", - - // "item.edit.modify.overview.field": "Field", "item.edit.modify.overview.field": "Kenttä", @@ -2288,10 +3184,14 @@ // "item.edit.modify.overview.value": "Value", "item.edit.modify.overview.value": "Arvo", + // "item.edit.move.cancel": "Back", + "item.edit.move.cancel": "Paluu", + // "item.edit.move.save-button": "Save", + "item.edit.move.save-button": "Tallenna", - // "item.edit.move.cancel": "Cancel", - "item.edit.move.cancel": "Peruuta", + // "item.edit.move.discard-button": "Discard", + "item.edit.move.discard-button": "Hylkää", // "item.edit.move.description": "Select the collection you wish to move this item to. To narrow down the list of displayed collections, you can enter a search query in the box.", "item.edit.move.description": "Valitse kokoelma, johon haluat siirtää tietueen. Voit antaa hakulausekkeen kokoelmien määrän pienentämiseksi.", @@ -2323,48 +3223,42 @@ // "item.edit.move.title": "Move item", "item.edit.move.title": "Siirrä tietue", - - // "item.edit.private.cancel": "Cancel", "item.edit.private.cancel": "Peruuta", - // "item.edit.private.confirm": "Make it Private", + // "item.edit.private.confirm": "Make it non-discoverable", "item.edit.private.confirm": "Muuta yksityiseksi", - // "item.edit.private.description": "Are you sure this item should be made private in the archive?", - "item.edit.private.description": "Haluatko varmasti muuttaa tietueen yksityiseksi?", + // "item.edit.private.description": "Are you sure this item should be made non-discoverable in the archive?", + "item.edit.private.description": "Haluatko varmasti muuttaa tietueen yksityiseksi? Yksityinen tietue ei löydy haettaessa.", - // "item.edit.private.error": "An error occurred while making the item private", + // "item.edit.private.error": "An error occurred while making the item non-discoverable", "item.edit.private.error": "Virhe muutettaessa tietuetta yksityiseksi", - // "item.edit.private.header": "Make item private: {{ id }}", - "item.edit.private.header": "Muuta yksityiseksi tietue: {{ id }}", + // "item.edit.private.header": "Make item non-discoverable: {{ id }}", + "item.edit.private.header": "Muuta tietue yksityiseksi: {{ id }}", - // "item.edit.private.success": "The item is now private", + // "item.edit.private.success": "The item is now non-discoverable", "item.edit.private.success": "Tietue on yksityinen", - - // "item.edit.public.cancel": "Cancel", "item.edit.public.cancel": "Peruuta", - // "item.edit.public.confirm": "Make it Public", + // "item.edit.public.confirm": "Make it discoverable", "item.edit.public.confirm": "Muuta julkiseksi", - // "item.edit.public.description": "Are you sure this item should be made public in the archive?", - "item.edit.public.description": "Haluatko varmasti muuttaa tietueen julkiseksi?", + // "item.edit.public.description": "Are you sure this item should be made discoverable in the archive?", + "item.edit.public.description": "Haluatko varmasti muuttaa tietueen julkiseksi? Julkinen tietue löytyy haettaessa.", - // "item.edit.public.error": "An error occurred while making the item public", + // "item.edit.public.error": "An error occurred while making the item discoverable", "item.edit.public.error": "Virhe muutettaessa tietuetta julkiseksi", - // "item.edit.public.header": "Make item public: {{ id }}", - "item.edit.public.header": "Muuta julkiseksi tietue: {{ id }}", + // "item.edit.public.header": "Make item discoverable: {{ id }}", + "item.edit.public.header": "Muuta tietue julkiseksi: {{ id }}", - // "item.edit.public.success": "The item is now public", + // "item.edit.public.success": "The item is now discoverable", "item.edit.public.success": "Tietue on julkinen", - - // "item.edit.reinstate.cancel": "Cancel", "item.edit.reinstate.cancel": "Peruuta", @@ -2383,8 +3277,6 @@ // "item.edit.reinstate.success": "The item was reinstated successfully", "item.edit.reinstate.success": "Tietue palautettu käyttöön", - - // "item.edit.relationships.discard-button": "Discard", "item.edit.relationships.discard-button": "Hylkää", @@ -2395,13 +3287,13 @@ "item.edit.relationships.edit.buttons.remove": "Poista", // "item.edit.relationships.edit.buttons.undo": "Undo changes", - "item.edit.relationships.edit.buttons.undo": "Peruuta muutokset", + "item.edit.relationships.edit.buttons.undo": "Kumoa muutokset", // "item.edit.relationships.no-relationships": "No relationships", "item.edit.relationships.no-relationships": "Ei yhteyksiä", // "item.edit.relationships.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", - "item.edit.relationships.notifications.discarded.content": "Muutoksesi hylättiin. Valitse 'Peruuta' palauttaaksesi ne.", + "item.edit.relationships.notifications.discarded.content": "Muutoksesi hylättiin. Valitse 'Kumoa' palauttaaksesi ne.", // "item.edit.relationships.notifications.discarded.title": "Changes discarded", "item.edit.relationships.notifications.discarded.title": "Muutokset hylätty", @@ -2422,7 +3314,7 @@ "item.edit.relationships.notifications.saved.title": "Yhteydet tallennettu", // "item.edit.relationships.reinstate-button": "Undo", - "item.edit.relationships.reinstate-button": "Peruuta", + "item.edit.relationships.reinstate-button": "Kumoa", // "item.edit.relationships.save-button": "Save", "item.edit.relationships.save-button": "Tallenna", @@ -2430,6 +3322,9 @@ // "item.edit.relationships.no-entity-type": "Add 'dspace.entity.type' metadata to enable relationships for this item", "item.edit.relationships.no-entity-type": "Lisää 'dspace.entity.type' -metadataa aktivoidaksesi yhteydet tietueessa", + // "item.edit.return": "Back", + "item.edit.return": "Paluu", + // "item.edit.tabs.bitstreams.head": "Bitstreams", "item.edit.tabs.bitstreams.head": "Tietueen tiedostot", @@ -2442,6 +3337,9 @@ // "item.edit.tabs.curate.title": "Item Edit - Curate", "item.edit.tabs.curate.title": "Tietueen muokkaus - Kuratointi", + // "item.edit.curate.title": "Curate Item: {{item}}", + "item.edit.curate.title": "Kuratoi tietuetta: {{item}}", + // "item.edit.tabs.metadata.head": "Metadata", "item.edit.tabs.metadata.head": "Tietueen metadata", @@ -2478,23 +3376,26 @@ // "item.edit.tabs.status.buttons.move.label": "Move item to another collection", "item.edit.tabs.status.buttons.move.label": "Siirrä tietue toiseen kokoelmaan", - // "item.edit.tabs.status.buttons.private.button": "Make it private...", + // "item.edit.tabs.status.buttons.private.button": "Make it non-discoverable...", "item.edit.tabs.status.buttons.private.button": "Muuta yksityiseksi...", - // "item.edit.tabs.status.buttons.private.label": "Make item private", + // "item.edit.tabs.status.buttons.private.label": "Make item non-discoverable", "item.edit.tabs.status.buttons.private.label": "Muuta tietue yksityiseksi", - // "item.edit.tabs.status.buttons.public.button": "Make it public...", + // "item.edit.tabs.status.buttons.public.button": "Make it discoverable...", "item.edit.tabs.status.buttons.public.button": "Muuta julkiseksi...", - // "item.edit.tabs.status.buttons.public.label": "Make item public", + // "item.edit.tabs.status.buttons.public.label": "Make item discoverable", "item.edit.tabs.status.buttons.public.label": "Muuta tietue julkiseksi", // "item.edit.tabs.status.buttons.reinstate.button": "Reinstate...", "item.edit.tabs.status.buttons.reinstate.button": "Palauta käyttöön...", // "item.edit.tabs.status.buttons.reinstate.label": "Reinstate item into the repository", - "item.edit.tabs.status.buttons.reinstate.label": "Palauta tietue arkistoon", + "item.edit.tabs.status.buttons.reinstate.label": "Palauta tietue julkaisuarkistoon", + + // "item.edit.tabs.status.buttons.unauthorized": "You're not authorized to perform this action", + "item.edit.tabs.status.buttons.unauthorized": "Sinulla ei ole valtuuksia suorittaa tätä toimintoa", // "item.edit.tabs.status.buttons.withdraw.button": "Withdraw this item", "item.edit.tabs.status.buttons.withdraw.button": "Poista tämä kohde", @@ -2509,7 +3410,7 @@ "item.edit.tabs.status.head": "Tietueen tila", // "item.edit.tabs.status.labels.handle": "Handle", - "item.edit.tabs.status.labels.handle": "Handle-tunnus", + "item.edit.tabs.status.labels.handle": "Handle", // "item.edit.tabs.status.labels.id": "Item Internal ID", "item.edit.tabs.status.labels.id": "Tietueen sisäinen ID", @@ -2538,8 +3439,6 @@ // "item.edit.tabs.view.title": "Item Edit - View", "item.edit.tabs.view.title": "Tietueen muokkaus - Näytä", - - // "item.edit.withdraw.cancel": "Cancel", "item.edit.withdraw.cancel": "Peruuta", @@ -2558,7 +3457,8 @@ // "item.edit.withdraw.success": "The item was withdrawn successfully", "item.edit.withdraw.success": "Tietue poistettu käytöstä", - + // "item.orcid.return": "Back", + "item.orcid.return": "Paluu", // "item.listelement.badge": "Item", "item.listelement.badge": "Tietue", @@ -2584,10 +3484,38 @@ // "item.search.results.head": "Item Search Results", "item.search.results.head": "Tietuehaun tulokset", - // "item.search.title": "DSpace Angular :: Item Search", - "item.search.title": "DSpace Angular :: Tietuehaku", + // "item.search.title": "Item Search", + "item.search.title": "Tietuehaku", + // "item.truncatable-part.show-more": "Show more", + "item.truncatable-part.show-more": "Näytä lisää", + // "item.truncatable-part.show-less": "Collapse", + "item.truncatable-part.show-less": "Sulje", + + // "workflow-item.search.result.delete-supervision.modal.header": "Delete Supervision Order", + "workflow-item.search.result.delete-supervision.modal.header": "Poista ohjausmääräys", + + // "workflow-item.search.result.delete-supervision.modal.info": "Are you sure you want to delete Supervision Order", + "workflow-item.search.result.delete-supervision.modal.info": "Haluatko varmasti poistaa ohjausmääräyksen?", + + // "workflow-item.search.result.delete-supervision.modal.cancel": "Cancel", + "workflow-item.search.result.delete-supervision.modal.cancel": "Peruuta", + + // "workflow-item.search.result.delete-supervision.modal.confirm": "Delete", + "workflow-item.search.result.delete-supervision.modal.confirm": "Poista", + + // "workflow-item.search.result.notification.deleted.success": "Successfully deleted supervision order \"{{name}}\"", + "workflow-item.search.result.notification.deleted.success": "Ohjausmääräys poistettu \"{{name}}\"", + + // "workflow-item.search.result.notification.deleted.failure": "Failed to delete supervision order \"{{name}}\"", + "workflow-item.search.result.notification.deleted.failure": "Ohjausmääräyksen poisto epäonnistui \"{{name}}\"", + + // "workflow-item.search.result.list.element.supervised-by": "Supervised by:", + "workflow-item.search.result.list.element.supervised-by": "Ohjaajana:", + + // "workflow-item.search.result.list.element.supervised.remove-tooltip": "Remove supervision group", + "workflow-item.search.result.list.element.supervised.remove-tooltip": "Poista ohjausryhmä", // "item.page.abstract": "Abstract", "item.page.abstract": "Tiivistelmä", @@ -2601,6 +3529,12 @@ // "item.page.collections": "Collections", "item.page.collections": "Kokoelmat", + // "item.page.collections.loading": "Loading...", + "item.page.collections.loading": "Ladataan...", + + // "item.page.collections.load-more": "Load more", + "item.page.collections.load-more": "Lataa lisää", + // "item.page.date": "Date", "item.page.date": "Päivämäärä", @@ -2634,6 +3568,12 @@ // "item.page.link.simple": "Simple item page", "item.page.link.simple": "Tietueen suppeat tiedot", + // "item.page.orcid.title": "ORCID", + "item.page.orcid.title": "ORCID-tunniste", + + // "item.page.orcid.tooltip": "Open ORCID setting page", + "item.page.orcid.tooltip": "Avaa ORCID-asetusten sivu", + // "item.page.person.search.title": "Articles by this author", "item.page.person.search.title": "Tekijän artikkelit", @@ -2667,12 +3607,27 @@ // "item.page.bitstreams.collapse": "Collapse", "item.page.bitstreams.collapse": "Sulje", - // "item.page.filesection.original.bundle" : "Original bundle", + // "item.page.filesection.original.bundle": "Original bundle", "item.page.filesection.original.bundle": "Alkuperäinen nippu", - // "item.page.filesection.license.bundle" : "License bundle", + // "item.page.filesection.license.bundle": "License bundle", "item.page.filesection.license.bundle": "Lisenssinippu", + // "item.page.return": "Back", + "item.page.return": "Paluu", + + // "item.page.version.create": "Create new version", + "item.page.version.create": "Luo uusi versio", + + // "item.page.version.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", + "item.page.version.hasDraft": "Uutta versiota ei voida luoda, koska versiohistoriassa on kesken oleva tallennus.", + + // "item.page.claim.button": "Claim", + "item.page.claim.button": "Ota itsellesi", + + // "item.page.claim.tooltip": "Claim this item as profile", + "item.page.claim.tooltip": "Ota tämä kohde profiiliksi", + // "item.preview.dc.identifier.uri": "Identifier:", "item.preview.dc.identifier.uri": "Tunnus:", @@ -2680,7 +3635,7 @@ "item.preview.dc.contributor.author": "Tekijät:", // "item.preview.dc.date.issued": "Published date:", - "item.preview.dc.date.issued": "Julkaisuajankohta:", + "item.preview.dc.date.issued": "Julkaisuaika:", // "item.preview.dc.description.abstract": "Abstract:", "item.preview.dc.description.abstract": "Tiivistelmä:", @@ -2697,6 +3652,33 @@ // "item.preview.dc.title": "Title:", "item.preview.dc.title": "Nimeke:", + // "item.preview.dc.type": "Type:", + "item.preview.dc.type": "Tyyppi:", + + // "item.preview.oaire.citation.issue": "Issue", + "item.preview.oaire.citation.issue": "Numero", + + // "item.preview.oaire.citation.volume": "Volume", + "item.preview.oaire.citation.volume": "Vuosikerta", + + // "item.preview.dc.relation.issn": "ISSN", + "item.preview.dc.relation.issn": "ISSN-tunnus", + + // "item.preview.dc.identifier.isbn": "ISBN", + "item.preview.dc.identifier.isbn": "ISBN", + + // "item.preview.dc.identifier": "Identifier:", + "item.preview.dc.identifier": "Tunnisteet:", + + // "item.preview.dc.relation.ispartof": "Journal or Serie", + "item.preview.dc.relation.ispartof": "Kausijulkaisu tai sarja", + + // "item.preview.dc.identifier.doi": "DOI", + "item.preview.dc.identifier.doi": "DOI", + + // "item.preview.dc.publisher": "Publisher:", + "item.preview.dc.publisher": "Julkaisija:", + // "item.preview.person.familyName": "Surname:", "item.preview.person.familyName": "Sukunimi:", @@ -2706,6 +3688,23 @@ // "item.preview.person.identifier.orcid": "ORCID:", "item.preview.person.identifier.orcid": "ORCID-tunniste:", + // "item.preview.project.funder.name": "Funder:", + "item.preview.project.funder.name": "Rahoittaja:", + + // "item.preview.project.funder.identifier": "Funder Identifier:", + "item.preview.project.funder.identifier": "Rahoittajan tunniste:", + + // "item.preview.oaire.awardNumber": "Funding ID:", + "item.preview.oaire.awardNumber": "Rahoitustunnus:", + + // "item.preview.dc.title.alternative": "Acronym:", + "item.preview.dc.title.alternative": "Kirjainlyhemme:", + + // "item.preview.dc.coverage.spatial": "Jurisdiction:", + "item.preview.dc.coverage.spatial": "Toimivalta:", + + // "item.preview.oaire.fundingStream": "Funding Stream:", + "item.preview.oaire.fundingStream": "Rahoituslähde:", // "item.select.confirm": "Confirm selected", "item.select.confirm": "Vahvista valinta", @@ -2722,19 +3721,21 @@ // "item.select.table.title": "Title", "item.select.table.title": "Nimeke", - // "item.version.history.empty": "There are no other versions for this item yet.", "item.version.history.empty": "Tietueesta ei ole muita versioita.", // "item.version.history.head": "Version History", "item.version.history.head": "Versiohistoria", - // "item.version.history.return": "Return", - "item.version.history.return": "Palaa", + // "item.version.history.return": "Back", + "item.version.history.return": "Paluu", // "item.version.history.selected": "Selected version", "item.version.history.selected": "Valittu versio", + // "item.version.history.selected.alert": "You are currently viewing version {{version}} of the item.", + "item.version.history.selected.alert": "Tarkastelet tietueen versiota {{version}}.", + // "item.version.history.table.version": "Version", "item.version.history.table.version": "Versio", @@ -2750,12 +3751,191 @@ // "item.version.history.table.summary": "Summary", "item.version.history.table.summary": "Yhteenveto", + // "item.version.history.table.workspaceItem": "Workspace item", + "item.version.history.table.workspaceItem": "Työtilan tietue", + // "item.version.history.table.workflowItem": "Workflow item", + "item.version.history.table.workflowItem": "Työtilan tietue", + + // "item.version.history.table.actions": "Action", + "item.version.history.table.actions": "Toiminto", + + // "item.version.history.table.action.editWorkspaceItem": "Edit workspace item", + "item.version.history.table.action.editWorkspaceItem": "Muokkaa työtilan tietuetta", + + // "item.version.history.table.action.editSummary": "Edit summary", + "item.version.history.table.action.editSummary": "Muokkaa yhteenvetoa", + + // "item.version.history.table.action.saveSummary": "Save summary edits", + "item.version.history.table.action.saveSummary": "Tallenna yhteenvedon muokkaukset", + + // "item.version.history.table.action.discardSummary": "Discard summary edits", + "item.version.history.table.action.discardSummary": "Hylkää yhteenvedon muokkaukset", + + // "item.version.history.table.action.newVersion": "Create new version from this one", + "item.version.history.table.action.newVersion": "Luo tästä uusi versio", + + // "item.version.history.table.action.deleteVersion": "Delete version", + "item.version.history.table.action.deleteVersion": "Poista versio", + + // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", + "item.version.history.table.action.hasDraft": "Uutta versiota ei voida luoda, koska versiohistoriassa on kesken oleva tallennus.", // "item.version.notice": "This is not the latest version of this item. The latest version can be found here.", "item.version.notice": "Tämä ei ole tietueen uusin versio. Uusin versio löytyy täältä.", + // "item.version.create.modal.header": "New version", + "item.version.create.modal.header": "uusi versio", + // "item.version.create.modal.text": "Create a new version for this item", + "item.version.create.modal.text": "Luodaan tietueesta uusi versio", + + // "item.version.create.modal.text.startingFrom": "starting from version {{version}}", + "item.version.create.modal.text.startingFrom": "alkaen versiosta {{version}}", + + // "item.version.create.modal.button.confirm": "Create", + "item.version.create.modal.button.confirm": "Luo", + + // "item.version.create.modal.button.confirm.tooltip": "Create new version", + "item.version.create.modal.button.confirm.tooltip": "Luo uusi versio", + + // "item.version.create.modal.button.cancel": "Cancel", + "item.version.create.modal.button.cancel": "Peruuta", + + // "item.version.create.modal.button.cancel.tooltip": "Do not create new version", + "item.version.create.modal.button.cancel.tooltip": "Älä luo uutta versiota", + + // "item.version.create.modal.form.summary.label": "Summary", + "item.version.create.modal.form.summary.label": "Yhteenveto", + + // "item.version.create.modal.form.summary.placeholder": "Insert the summary for the new version", + "item.version.create.modal.form.summary.placeholder": "Syötä uuden version yhteenveto", + + // "item.version.create.modal.submitted.header": "Creating new version...", + "item.version.create.modal.submitted.header": "Luodaan uutta versiota...", + + // "item.version.create.modal.submitted.text": "The new version is being created. This may take some time if the item has a lot of relationships.", + "item.version.create.modal.submitted.text": "Uutta versiota luodaan. Luonti voi kestää, jos tietueella on paljon yhteyksiä.", + + // "item.version.create.notification.success": "New version has been created with version number {{version}}", + "item.version.create.notification.success": "Uusi versio on luotu, sen versionumero on {{version}}", + + // "item.version.create.notification.failure": "New version has not been created", + "item.version.create.notification.failure": "Uutta versiota ei luotu", + + // "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", + "item.version.create.notification.inProgress": "Uutta versiota ei voida luoda, koska versiohistoriassa on kesken oleva tallennus.", + + // "item.version.delete.modal.header": "Delete version", + "item.version.delete.modal.header": "Poista versio", + + // "item.version.delete.modal.text": "Do you want to delete version {{version}}?", + "item.version.delete.modal.text": "Haluatko poistaa version {{version}}?", + + // "item.version.delete.modal.button.confirm": "Delete", + "item.version.delete.modal.button.confirm": "Poista", + + // "item.version.delete.modal.button.confirm.tooltip": "Delete this version", + "item.version.delete.modal.button.confirm.tooltip": "Poista tämä versio", + + // "item.version.delete.modal.button.cancel": "Cancel", + "item.version.delete.modal.button.cancel": "Peruuta", + + // "item.version.delete.modal.button.cancel.tooltip": "Do not delete this version", + "item.version.delete.modal.button.cancel.tooltip": "Älä poista tätä versiota", + + // "item.version.delete.notification.success": "Version number {{version}} has been deleted", + "item.version.delete.notification.success": "Versio versionumerolla {{version}} poistettu", + + // "item.version.delete.notification.failure": "Version number {{version}} has not been deleted", + "item.version.delete.notification.failure": "Versiota versionumerolla {{version}} ei poistettu", + + // "item.version.edit.notification.success": "The summary of version number {{version}} has been changed", + "item.version.edit.notification.success": "Version versionumerolla {{version}} yhteenveto on muuttunut", + + // "item.version.edit.notification.failure": "The summary of version number {{version}} has not been changed", + "item.version.edit.notification.failure": "Version versionumerolla {{version}} yhteenvetoa ei ole muutettu", + + // "itemtemplate.edit.metadata.add-button": "Add", + "itemtemplate.edit.metadata.add-button": "Lisää", + + // "itemtemplate.edit.metadata.discard-button": "Discard", + "itemtemplate.edit.metadata.discard-button": "Hylkää", + + // "itemtemplate.edit.metadata.edit.buttons.confirm": "Confirm", + "itemtemplate.edit.metadata.edit.buttons.confirm": "Vahvista", + + // "itemtemplate.edit.metadata.edit.buttons.drag": "Drag to reorder", + "itemtemplate.edit.metadata.edit.buttons.drag": "Raahaa uudelleenjärjestääksesi", + + // "itemtemplate.edit.metadata.edit.buttons.edit": "Edit", + "itemtemplate.edit.metadata.edit.buttons.edit": "Muokkaa", + + // "itemtemplate.edit.metadata.edit.buttons.remove": "Remove", + "itemtemplate.edit.metadata.edit.buttons.remove": "Poista", + + // "itemtemplate.edit.metadata.edit.buttons.undo": "Undo changes", + "itemtemplate.edit.metadata.edit.buttons.undo": "Kumoa muutokset", + + // "itemtemplate.edit.metadata.edit.buttons.unedit": "Stop editing", + "itemtemplate.edit.metadata.edit.buttons.unedit": "Lopeta muokkaus", + + // "itemtemplate.edit.metadata.empty": "The item template currently doesn't contain any metadata. Click Add to start adding a metadata value.", + "itemtemplate.edit.metadata.empty": "Mallipohjassa ei ole metadataa. Napsauta Lisää lisätäksesi metadata-arvoja.", + + // "itemtemplate.edit.metadata.headers.edit": "Edit", + "itemtemplate.edit.metadata.headers.edit": "Muokkaa", + + // "itemtemplate.edit.metadata.headers.field": "Field", + "itemtemplate.edit.metadata.headers.field": "Kenttä", + + // "itemtemplate.edit.metadata.headers.language": "Lang", + "itemtemplate.edit.metadata.headers.language": "Kieli", + + // "itemtemplate.edit.metadata.headers.value": "Value", + "itemtemplate.edit.metadata.headers.value": "Arvo", + + // "itemtemplate.edit.metadata.metadatafield.error": "An error occurred validating the metadata field", + "itemtemplate.edit.metadata.metadatafield.error": "Virhe metadatakenttää validoitaessa", + + // "itemtemplate.edit.metadata.metadatafield.invalid": "Please choose a valid metadata field", + "itemtemplate.edit.metadata.metadatafield.invalid": "Valitse kelvollinen metadatakenttä ", + + // "itemtemplate.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", + "itemtemplate.edit.metadata.notifications.discarded.content": "Muutoksesi hylättiin. Palauta muutokset napsauttamalla Kumoa-painiketta", + + // "itemtemplate.edit.metadata.notifications.discarded.title": "Changes discarded", + "itemtemplate.edit.metadata.notifications.discarded.title": "Muutokset peruttu", + + // "itemtemplate.edit.metadata.notifications.error.title": "An error occurred", + "itemtemplate.edit.metadata.notifications.error.title": "Tapahtui virhe", + + // "itemtemplate.edit.metadata.notifications.invalid.content": "Your changes were not saved. Please make sure all fields are valid before you save.", + "itemtemplate.edit.metadata.notifications.invalid.content": "Muutoksia ei tallennettu. Tarkista kaikkien kenttien oikeellisuus ennen tallennusta.", + + // "itemtemplate.edit.metadata.notifications.invalid.title": "Metadata invalid", + "itemtemplate.edit.metadata.notifications.invalid.title": "Virheellinen metadata", + + // "itemtemplate.edit.metadata.notifications.outdated.content": "The item template you're currently working on has been changed by another user. Your current changes are discarded to prevent conflicts", + "itemtemplate.edit.metadata.notifications.outdated.content": "Toinen käyttäjä on muokannut käsittelemääsi mallipohjaa. Muutoksesi on hylätty konfliktien välttämiseksi.", + + // "itemtemplate.edit.metadata.notifications.outdated.title": "Changes outdated", + "itemtemplate.edit.metadata.notifications.outdated.title": "Muutokset vanhentuneet", + + // "itemtemplate.edit.metadata.notifications.saved.content": "Your changes to this item template's metadata were saved.", + "itemtemplate.edit.metadata.notifications.saved.content": "Muutokset mallipohjan metadataan on tallennettu.", + + // "itemtemplate.edit.metadata.notifications.saved.title": "Metadata saved", + "itemtemplate.edit.metadata.notifications.saved.title": "Metadata tallennettu", + + // "itemtemplate.edit.metadata.reinstate-button": "Undo", + "itemtemplate.edit.metadata.reinstate-button": "Kumoa", + + // "itemtemplate.edit.metadata.reset-order-button": "Undo reorder", + "itemtemplate.edit.metadata.reset-order-button": "Kumoa uudelleenjärjestäminen", + + // "itemtemplate.edit.metadata.save-button": "Save", + "itemtemplate.edit.metadata.save-button": "Tallenna", // "journal.listelement.badge": "Journal", "journal.listelement.badge": "Kausijulkaisu", @@ -2781,10 +3961,11 @@ // "journal.search.results.head": "Journal Search Results", "journal.search.results.head": "Kausijulkaisuhaun tulokset", - // "journal.search.title": "DSpace Angular :: Journal Search", - "journal.search.title": "DSpace Angular :: Kausijulkaisuhaku", - + // "journal-relationships.search.results.head": "Journal Search Results", + "journal-relationships.search.results.head": "Kausijulkaisuhaun tulokset", + // "journal.search.title": "Journal Search", + "journal.search.title": "Kausijulkaisuhaku", // "journalissue.listelement.badge": "Journal Issue", "journalissue.listelement.badge": "Kausijulkaisun numero", @@ -2813,8 +3994,6 @@ // "journalissue.page.titleprefix": "Journal Issue: ", "journalissue.page.titleprefix": "Kausijulkaisun numero: ", - - // "journalvolume.listelement.badge": "Journal Volume", "journalvolume.listelement.badge": "Kausijulkaisun vuosikerta", @@ -2833,7 +4012,38 @@ // "journalvolume.page.volume": "Volume", "journalvolume.page.volume": "Vuosikerta", + // "iiifsearchable.listelement.badge": "Document Media", + "iiifsearchable.listelement.badge": "Dokumenttimedia", + // "iiifsearchable.page.titleprefix": "Document: ", + "iiifsearchable.page.titleprefix": "Dokumentti: ", + + // "iiifsearchable.page.doi": "Permanent Link: ", + "iiifsearchable.page.doi": "Pysyvä linkki: ", + + // "iiifsearchable.page.issue": "Issue: ", + "iiifsearchable.page.issue": "Numero: ", + + // "iiifsearchable.page.description": "Description: ", + "iiifsearchable.page.description": "Kuvaus: ", + + // "iiifviewer.fullscreen.notice": "Use full screen for better viewing.", + "iiifviewer.fullscreen.notice": "Käytä koko näytön tilaa nähdäksesi paremmin", + + // "iiif.listelement.badge": "Image Media", + "iiif.listelement.badge": "Kuvamedia", + + // "iiif.page.titleprefix": "Image: ", + "iiif.page.titleprefix": "Kuva: ", + + // "iiif.page.doi": "Permanent Link: ", + "iiif.page.doi": "Pysyvä linkki: ", + + // "iiif.page.issue": "Issue: ", + "iiif.page.issue": "Numero: ", + + // "iiif.page.description": "Description: ", + "iiif.page.description": "Kuvaus: ", // "loading.bitstream": "Loading bitstream...", "loading.bitstream": "Ladataan tiedostoa...", @@ -2889,8 +4099,6 @@ // "loading.top-level-communities": "Loading top-level communities...", "loading.top-level-communities": "Ladataan ylätason yhteisöjä...", - - // "login.form.email": "Email address", "login.form.email": "Sähköpostiosoite", @@ -2906,6 +4114,12 @@ // "login.form.or-divider": "or", "login.form.or-divider": "tai", + // "login.form.oidc": "Log in with OIDC", + "login.form.oidc": "Kirjaudu OIDC-tunnuksella", + + // "login.form.orcid": "Log in with ORCID", + "login.form.orcid": "Kirjaudu ORCID-tunnuksella", + // "login.form.password": "Password", "login.form.password": "Salasana", @@ -2921,8 +4135,6 @@ // "login.breadcrumbs": "Login", "login.breadcrumbs": "Sisäänkirjautuminen", - - // "logout.form.header": "Log out from DSpace", "logout.form.header": "Kirjaudu ulos", @@ -2932,15 +4144,14 @@ // "logout.title": "Logout", "logout.title": "Uloskirjautuminen", - - - // "menu.header.admin": "Admin", - "menu.header.admin": "Ylläpitäjä", + // "menu.header.admin": "Management", + "menu.header.admin": "Hallinto", // "menu.header.image.logo": "Repository logo", "menu.header.image.logo": "Arkiston logo", - + // "menu.header.admin.description": "Management menu", + "menu.header.admin.description": "Hallintovalikko", // "menu.section.access_control": "Access Control", "menu.section.access_control": "Pääsyoikeudet", @@ -2954,13 +4165,9 @@ // "menu.section.access_control_people": "People", "menu.section.access_control_people": "Käyttäjät", - - // "menu.section.admin_search": "Admin Search", "menu.section.admin_search": "Ylläpitäjän haku", - - // "menu.section.browse_community": "This Community", "menu.section.browse_community": "Tämä yhteisö", @@ -2968,7 +4175,7 @@ "menu.section.browse_community_by_author": "Tekijän mukaan", // "menu.section.browse_community_by_issue_date": "By Issue Date", - "menu.section.browse_community_by_issue_date": "Julkaisuajankohdan mukaan", + "menu.section.browse_community_by_issue_date": "Julkaisuajan mukaan", // "menu.section.browse_community_by_title": "By Title", "menu.section.browse_community_by_title": "Nimekkeen mukaan", @@ -2980,27 +4187,26 @@ "menu.section.browse_global_by_author": "Tekijän mukaan", // "menu.section.browse_global_by_dateissued": "By Issue Date", - "menu.section.browse_global_by_dateissued": "Julkaisuajankohdan mukaan", + "menu.section.browse_global_by_dateissued": "Julkaisuajan mukaan", // "menu.section.browse_global_by_subject": "By Subject", "menu.section.browse_global_by_subject": "Asiasanan mukaan", + // "menu.section.browse_global_by_srsc": "By Subject Category", + "menu.section.browse_global_by_srsc": "Aihekategorian mukaan", + // "menu.section.browse_global_by_title": "By Title", "menu.section.browse_global_by_title": "Nimekkeen mukaan", // "menu.section.browse_global_communities_and_collections": "Communities & Collections", "menu.section.browse_global_communities_and_collections": "Yhteisöt & kokoelmat", - - // "menu.section.control_panel": "Control Panel", "menu.section.control_panel": "Hallintapaneeli", // "menu.section.curation_task": "Curation Task", "menu.section.curation_task": "Kuratointitehtävä", - - // "menu.section.edit": "Edit", "menu.section.edit": "Muokkaa", @@ -3013,8 +4219,6 @@ // "menu.section.edit_item": "Item", "menu.section.edit_item": "Tietue", - - // "menu.section.export": "Export", "menu.section.export": "Eksportoi", @@ -3030,7 +4234,8 @@ // "menu.section.export_metadata": "Metadata", "menu.section.export_metadata": "Metadata", - + // "menu.section.export_batch": "Batch Export (ZIP)", + "menu.section.export_batch": "Erän eksportointi(ZIP)", // "menu.section.icon.access_control": "Access Control menu section", "menu.section.icon.access_control": "Pääsyoikeudet", @@ -3041,8 +4246,8 @@ // "menu.section.icon.control_panel": "Control Panel menu section", "menu.section.icon.control_panel": "Hallintapaneeli", - // "menu.section.icon.curation_task": "Curation Task menu section", - "menu.section.icon.curation_task": "Kuratointi", + // "menu.section.icon.curation_tasks": "Curation Task menu section", + "menu.section.icon.curation_tasks": "Kuratointitehtävä", // "menu.section.icon.edit": "Edit menu section", "menu.section.icon.edit": "Muokkaus", @@ -3053,6 +4258,9 @@ // "menu.section.icon.find": "Find menu section", "menu.section.icon.find": "Haku", + // "menu.section.icon.health": "Health check menu section", + "menu.section.icon.health": "Järjestelmän kunnon tarkistus", + // "menu.section.icon.import": "Import menu section", "menu.section.icon.import": "Importointi", @@ -3062,8 +4270,8 @@ // "menu.section.icon.pin": "Pin sidebar", "menu.section.icon.pin": "Kiinnitä sivupalkki", - // "menu.section.icon.processes": "Processes menu section", - "menu.section.icon.processes": "Prosessit", + // "menu.section.icon.processes": "Processes Health", + "menu.section.icon.processes": "Prosessien kunto", // "menu.section.icon.registries": "Registries menu section", "menu.section.icon.registries": "Rekisterit", @@ -3071,11 +4279,12 @@ // "menu.section.icon.statistics_task": "Statistics Task menu section", "menu.section.icon.statistics_task": "Tilastot", + // "menu.section.icon.workflow": "Administer workflow menu section", + "menu.section.icon.workflow": "Työnkulku hallinta", + // "menu.section.icon.unpin": "Unpin sidebar", "menu.section.icon.unpin": "Vapauta sivupalkki", - - // "menu.section.import": "Import", "menu.section.import": "Importoi", @@ -3085,8 +4294,6 @@ // "menu.section.import_metadata": "Metadata", "menu.section.import_metadata": "Metadata", - - // "menu.section.new": "New", "menu.section.new": "Uusi", @@ -3105,20 +4312,17 @@ // "menu.section.new_process": "Process", "menu.section.new_process": "Prosessi", - - // "menu.section.pin": "Pin sidebar", "menu.section.pin": "Kiinnitä sivupalkki", // "menu.section.unpin": "Unpin sidebar", "menu.section.unpin": "Vapauta sivupalkki", - - // "menu.section.processes": "Processes", "menu.section.processes": "Prosessit", - + // "menu.section.health": "Health", + "menu.section.health": "Järjestelmän kunto", // "menu.section.registries": "Registries", "menu.section.registries": "Rekisterit", @@ -3129,57 +4333,60 @@ // "menu.section.registries_metadata": "Metadata", "menu.section.registries_metadata": "Metadata", - - // "menu.section.statistics": "Statistics", "menu.section.statistics": "Tilastot", // "menu.section.statistics_task": "Statistics Task", "menu.section.statistics_task": "Tilastointitehtävä", - - // "menu.section.toggle.access_control": "Toggle Access Control section", - "menu.section.toggle.access_control": "Vaihda Pääsyoikeudet-osion tilaa", + "menu.section.toggle.access_control": "Näytä/piilota Pääsyoikeudet-osio", // "menu.section.toggle.control_panel": "Toggle Control Panel section", - "menu.section.toggle.control_panel": "Vaihda Hallintapaneeli-osion tilaa", + "menu.section.toggle.control_panel": "Näytä/piilota Hallintapaneeli-osio", // "menu.section.toggle.curation_task": "Toggle Curation Task section", - "menu.section.toggle.curation_task": "Vaihda Kuratointitehtävä-osion tilaa", + "menu.section.toggle.curation_task": "Näytä/piilota Kuratointitehtävä-osio", // "menu.section.toggle.edit": "Toggle Edit section", - "menu.section.toggle.edit": "Vaihda Muokkaus-osion tilaa", + "menu.section.toggle.edit": "Näytä/piilota Muokkaus-osio", // "menu.section.toggle.export": "Toggle Export section", - "menu.section.toggle.export": "Vaihda Eksportointi-osion tilaa", + "menu.section.toggle.export": "Näytä/piilota Eksportointi-osio", // "menu.section.toggle.find": "Toggle Find section", - "menu.section.toggle.find": "Vaihda Haku-osion tilaa", + "menu.section.toggle.find": "Näytä/piilota Haku-osio", // "menu.section.toggle.import": "Toggle Import section", - "menu.section.toggle.import": "Vaihda Importointi-osion tilaa", + "menu.section.toggle.import": "Näytä/piilota Importointi-osio", // "menu.section.toggle.new": "Toggle New section", - "menu.section.toggle.new": "Vaihda Uusi-osion tilaa", + "menu.section.toggle.new": "Näytä/piilota Uusi-osio", // "menu.section.toggle.registries": "Toggle Registries section", - "menu.section.toggle.registries": "Vaihda Rekisterit-osion tilaa", + "menu.section.toggle.registries": "Näytä/piilota Rekisterit-osio", // "menu.section.toggle.statistics_task": "Toggle Statistics Task section", - "menu.section.toggle.statistics_task": "Vaihda Tilastointitehtävä-osion tilaa", - + "menu.section.toggle.statistics_task": "Näytä/piilota Tilastointitehtävä-osio", // "menu.section.workflow": "Administer Workflow", "menu.section.workflow": "Hallinnoi työnkulkua", + // "metadata-export-search.tooltip": "Export search results as CSV", + "metadata-export-search.tooltip": "Eksportoi Hakutulokset CSV-tiedostona", + + // "metadata-export-search.submit.success": "The export was started successfully", + "metadata-export-search.submit.success": "Eksportointi aloitettu", + + // "metadata-export-search.submit.error": "Starting the export has failed", + "metadata-export-search.submit.error": "Eksportoinnin aloittaminen epäonnistui", + + // "mydspace.breadcrumbs": "MyDSpace", + "mydspace.breadcrumbs": "Oma DSpace", // "mydspace.description": "", "mydspace.description": "", - // "mydspace.general.text-here": "here", - "mydspace.general.text-here": "tässä", - // "mydspace.messages.controller-help": "Select this option to send a message to item's submitter.", "mydspace.messages.controller-help": "Valitse tämä, jos haluat lähettää viestin tietueen tallentajalle.", @@ -3255,26 +4462,32 @@ // "mydspace.results.no-uri": "No Uri", "mydspace.results.no-uri": "Ei URL-osoitetta", - // "mydspace.show.workflow": "All tasks", - "mydspace.show.workflow": "Kaikki tehtävät", + // "mydspace.search-form.placeholder": "Search in mydspace...", + "mydspace.search-form.placeholder": "Hae omasta DSpacesta...", + + // "mydspace.show.workflow": "Workflow tasks", + "mydspace.show.workflow": "Työnkulun tehtävät", // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Tallennuksesi", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Arkistoitu", + // "mydspace.show.supervisedWorkspace": "Supervised items", + "mydspace.show.supervisedWorkspace": "Valvotut tietueet", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Tarkastaminen", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Arkistoitu", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Odotetaan tarkastajaa", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validointi", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Työnkulku", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Odottaa tarkastajaa", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Työtila", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Työnkulku", + + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Työtila", // "mydspace.title": "MyDSpace", "mydspace.title": "Oma DSpace", @@ -3291,31 +4504,35 @@ // "mydspace.upload.upload-multiple-successful": "{{qty}} new workspace items created.", "mydspace.upload.upload-multiple-successful": "{{qty}} uutta työtilaa luotu.", - // "mydspace.upload.upload-successful": "New workspace item created. Click {{here}} for edit it.", - "mydspace.upload.upload-successful": "Uusi työtila luotu. Napauta tästä muokataksesi sitä.", - // "mydspace.view-btn": "View", "mydspace.view-btn": "Näytä", - - // "nav.browse.header": "All of DSpace", "nav.browse.header": "Koko julkaisuarkisto", // "nav.community-browse.header": "By Community", "nav.community-browse.header": "Yhteisön mukaan", + // "nav.context-help-toggle": "Toggle context help", + "nav.context-help-toggle": "Näytä/piilota tilannekohtainen ohje", + // "nav.language": "Language switch", "nav.language": "Kielivalinta", // "nav.login": "Log In", "nav.login": "Kirjaudu sisään", + // "nav.user-profile-menu-and-logout": "User profile menu and Log Out", + "nav.user-profile-menu-and-logout": "Käyttäjäprofiilivalikko ja uloskirjautuminen", + // "nav.logout": "Log Out", "nav.logout": "Kirjaudu ulos", + // "nav.main.description": "Main navigation bar", + "nav.main.description": "Päänavigointipalkki", + // "nav.mydspace": "MyDSpace", - "nav.mydspace": "Omat tiedot", + "nav.mydspace": "Oma DSpace", // "nav.profile": "Profile", "nav.profile": "Profiili", @@ -3323,17 +4540,33 @@ // "nav.search": "Search", "nav.search": "Hae", + // "nav.search.button": "Submit search", + "nav.search.button": "Lähetä haku", + // "nav.statistics.header": "Statistics", "nav.statistics.header": "Tilastot", // "nav.stop-impersonating": "Stop impersonating EPerson", "nav.stop-impersonating": "Lopeta käyttäjänä esiintyminen", + // "nav.subscriptions": "Subscriptions", + "nav.subscriptions": "Tilaukset", + // "nav.toggle": "Toggle navigation", + "nav.toggle": "Näytä/piilota navigointi", + + // "nav.user.description": "User profile bar", + "nav.user.description": "Käyttäjäprofiilipalkki", + + // "none.listelement.badge": "Item", + "none.listelement.badge": "Tietue", // "orgunit.listelement.badge": "Organizational Unit", "orgunit.listelement.badge": "Organisaatioyksikkö", + // "orgunit.listelement.no-title": "Untitled", + "orgunit.listelement.no-title": "Nimetön", + // "orgunit.page.city": "City", "orgunit.page.city": "Kaupunki", @@ -3355,7 +4588,8 @@ // "orgunit.page.titleprefix": "Organizational Unit: ", "orgunit.page.titleprefix": "Organisaatioyksikkö: ", - + // "pagination.options.description": "Pagination options", + "pagination.options.description": "Sivutusvaihtoehdot", // "pagination.results-per-page": "Results Per Page", "pagination.results-per-page": "Tuloksia sivulla", @@ -3369,8 +4603,6 @@ // "pagination.sort-direction": "Sort Options", "pagination.sort-direction": "Lajitteluvalinnat", - - // "person.listelement.badge": "Person", "person.listelement.badge": "Käyttäjä", @@ -3395,6 +4627,9 @@ // "person.page.lastname": "Last Name", "person.page.lastname": "Sukunimi", + // "person.page.name": "Name", + "person.page.name": "Nimi", + // "person.page.link.full": "Show all metadata", "person.page.link.full": "Näytä kaikki metadata", @@ -3408,12 +4643,13 @@ "person.page.titleprefix": "Käyttäjä: ", // "person.search.results.head": "Person Search Results", - "person.search.results.head": "Käyttäjähaun tulokset", - - // "person.search.title": "DSpace Angular :: Person Search", - "person.search.title": "DSpace Angular :: Käyttäjähaku", + "person.search.results.head": "Henkilöhaun tulokset", + // "person-relationships.search.results.head": "Person Search Results", + "person-relationships.search.results.head": "Henkilöhaun tulokset", + // "person.search.title": "Person Search", + "person.search.title": "Henkilöhaku", // "process.new.select-parameters": "Parameters", "process.new.select-parameters": "Parametrit", @@ -3421,8 +4657,8 @@ // "process.new.cancel": "Cancel", "process.new.cancel": "Peruuta", - // "process.new.submit": "Submit", - "process.new.submit": "Lähetä", + // "process.new.submit": "Save", + "process.new.submit": "Tallenna", // "process.new.select-script": "Script", "process.new.select-script": "Skripti", @@ -3463,6 +4699,9 @@ // "process.new.notification.error.content": "An error occurred while creating this process", "process.new.notification.error.content": "Virhe prosessia luotaessa", + // "process.new.notification.error.max-upload.content": "The file exceeds the maximum upload size", + "process.new.notification.error.max-upload.content": "Tiedoston koko ylittää latauksen maksimikoon", + // "process.new.header": "Create a new process", "process.new.header": "Luo uusi prosessi", @@ -3472,18 +4711,16 @@ // "process.new.breadcrumbs": "Create a new process", "process.new.breadcrumbs": "Luo uusi prosessi", + // "process.detail.arguments": "Arguments", + "process.detail.arguments": "Perustelut", + // "process.detail.arguments.empty": "This process doesn't contain any arguments", + "process.detail.arguments.empty": "Prosessiin ei liity perusteluja", - // "process.detail.arguments" : "Arguments", - "process.detail.arguments": "Muuttujat", - - // "process.detail.arguments.empty" : "This process doesn't contain any arguments", - "process.detail.arguments.empty": "Prosessiin ei liity muuttujia", - - // "process.detail.back" : "Back", + // "process.detail.back": "Back", "process.detail.back": "Paluu", - // "process.detail.output" : "Process Output", + // "process.detail.output": "Process Output", "process.detail.output": "Prosessin tulos", // "process.detail.logs.button": "Retrieve process output", @@ -3495,48 +4732,70 @@ // "process.detail.logs.none": "This process has no output", "process.detail.logs.none": "Prosessilla ei tulosta", - // "process.detail.output-files" : "Output Files", + // "process.detail.output-files": "Output Files", "process.detail.output-files": "Tulostiedostot", - // "process.detail.output-files.empty" : "This process doesn't contain any output files", + // "process.detail.output-files.empty": "This process doesn't contain any output files", "process.detail.output-files.empty": "Prosessilla ei ole tulostiedostoja", - // "process.detail.script" : "Script", + // "process.detail.script": "Script", "process.detail.script": "Skripti", - // "process.detail.title" : "Process: {{ id }} - {{ name }}", + // "process.detail.title": "Process: {{ id }} - {{ name }}", "process.detail.title": "Prosessi: {{ id }} - {{ name }}", - // "process.detail.start-time" : "Start time", + // "process.detail.start-time": "Start time", "process.detail.start-time": "Aloitusaika", - // "process.detail.end-time" : "Finish time", + // "process.detail.end-time": "Finish time", "process.detail.end-time": "Lopetusaika", - // "process.detail.status" : "Status", + // "process.detail.status": "Status", "process.detail.status": "Tila", - // "process.detail.create" : "Create similar process", + // "process.detail.create": "Create similar process", "process.detail.create": "Luo vastaava prosessi", + // "process.detail.actions": "Actions", + "process.detail.actions": "Toiminnot", + // "process.detail.delete.button": "Delete process", + "process.detail.delete.button": "Poista prosessi", - // "process.overview.table.finish" : "Finish time", - "process.overview.table.finish": "Lopetusaika", + // "process.detail.delete.header": "Delete process", + "process.detail.delete.header": "Poista prosessi", - // "process.overview.table.id" : "Process ID", + // "process.detail.delete.body": "Are you sure you want to delete the current process?", + "process.detail.delete.body": "Haluatko varmasti poistaa nykyisen prosessin?", + + // "process.detail.delete.cancel": "Cancel", + "process.detail.delete.cancel": "Peruuta", + + // "process.detail.delete.confirm": "Delete process", + "process.detail.delete.confirm": "Poista prosessi", + + // "process.detail.delete.success": "The process was successfully deleted.", + "process.detail.delete.success": "Prosessi on poistettu.", + + // "process.detail.delete.error": "Something went wrong when deleting the process", + "process.detail.delete.error": "Virhe prosessia poistettaessa", + + // "process.overview.table.finish": "Finish time (UTC)", + "process.overview.table.finish": "Lopetusaika (UTC)", + + // "process.overview.table.id": "Process ID", "process.overview.table.id": "Prosessin ID", - // "process.overview.table.name" : "Name", + // "process.overview.table.name": "Name", "process.overview.table.name": "Nimi", - // "process.overview.table.start" : "Start time", - "process.overview.table.start": "Aloitusaika", + // "process.overview.table.start": "Start time (UTC)", + "process.overview.table.start": "Aloitusaika (UTC)", - // "process.overview.table.status" : "Status", + // "process.overview.table.status": "Status", "process.overview.table.status": "Tila", - // "process.overview.table.user" : "User", + // "process.overview.table.user": "User", "process.overview.table.user": "Käyttäjä", // "process.overview.title": "Processes Overview", @@ -3548,6 +4807,32 @@ // "process.overview.new": "New", "process.overview.new": "Uusi", + // "process.overview.table.actions": "Actions", + "process.overview.table.actions": "Toiminnot", + + // "process.overview.delete": "Delete {{count}} processes", + "process.overview.delete": "Poista {{count}} prosessi(a)", + + // "process.overview.delete.clear": "Clear delete selection", + "process.overview.delete.clear": "Tyhjennä poistettavien valinta", + + // "process.overview.delete.processing": "{{count}} process(es) are being deleted. Please wait for the deletion to fully complete. Note that this can take a while.", + "process.overview.delete.processing": "{{count}} prosessi(a) poistetaan. Odota poiston päättymistä. Poisto saattaa kestää hetken.", + + // "process.overview.delete.body": "Are you sure you want to delete {{count}} process(es)?", + "process.overview.delete.body": "Haluatko varmasti poistaa {{count}} prosessin/prosessia?", + + // "process.overview.delete.header": "Delete processes", + "process.overview.delete.header": "Poista prosessi", + + // "process.bulk.delete.error.head": "Error on deleteing process", + "process.bulk.delete.error.head": "Virhe poistettaessa prosessia", + + // "process.bulk.delete.error.body": "The process with ID {{processId}} could not be deleted. The remaining processes will continue being deleted. ", + "process.bulk.delete.error.body": "Prosessia, jonka ID on {{processId}}, ei voitu poistaa. Muiden prosessien poistamista jatketaan.", + + // "process.bulk.delete.success": "{{count}} process(es) have been succesfully deleted", + "process.bulk.delete.success": "{{count}} prosessi(a) poistettu", // "profile.breadcrumbs": "Update Profile", "profile.breadcrumbs": "Päivitä profiili", @@ -3558,11 +4843,14 @@ // "profile.card.security": "Security", "profile.card.security": "Suojaus", - // "profile.form.submit": "Update Profile", - "profile.form.submit": "Päivitä profiili", + // "profile.form.submit": "Save", + "profile.form.submit": "Tallenna", // "profile.groups.head": "Authorization groups you belong to", - "profile.groups.head": "Ryhmät, joihin kuulut", + "profile.groups.head": "Käyttöoikeusryhmät, joihin kuulut", + + // "profile.special.groups.head": "Authorization special groups you belong to", + "profile.special.groups.head": "Erityiset käyttöoikeusryhmät, joihin kuulut", // "profile.head": "Update Profile", "profile.head": "Päivitä profiili", @@ -3603,11 +4891,8 @@ // "profile.security.form.error.matching-passwords": "The passwords do not match.", "profile.security.form.error.matching-passwords": "Salasanat eivät täsmää.", - // "profile.security.form.error.password-length": "The password should be at least 6 characters long.", - "profile.security.form.error.password-length": "Salasanan on oltava vähintään 6 merkkiä pitkä.", - - // "profile.security.form.info": "Optionally, you can enter a new password in the box below, and confirm it by typing it again into the second box. It should be at least six characters long.", - "profile.security.form.info": "Voit kirjoittaa uuden salasanan alla olevaan kenttään ja varmentaa sen kirjoittamalla sen uudelleen seuraavaan kenttään. Salasanan pituus on vähintään kuusi merkkiä.", + // "profile.security.form.info": "Optionally, you can enter a new password in the box below, and confirm it by typing it again into the second box.", + "profile.security.form.info": "Voit kirjoittaa uuden salasanan alla olevaan kenttään ja varmentaa sen kirjoittamalla sen uudelleen seuraavaan kenttään.", // "profile.security.form.label.password": "Password", "profile.security.form.label.password": "Salasana", @@ -3615,6 +4900,9 @@ // "profile.security.form.label.passwordrepeat": "Retype to confirm", "profile.security.form.label.passwordrepeat": "Kirjoita uudelleen", + // "profile.security.form.label.current-password": "Current password", + "profile.security.form.label.current-password": "Nykyinen salasana", + // "profile.security.form.notifications.success.content": "Your changes to the password were saved.", "profile.security.form.notifications.success.content": "Muuttunut salasana on tallennettu.", @@ -3624,16 +4912,20 @@ // "profile.security.form.notifications.error.title": "Error changing passwords", "profile.security.form.notifications.error.title": "Virhe salasanaa muutettaessa", - // "profile.security.form.notifications.error.not-long-enough": "The password has to be at least 6 characters long.", - "profile.security.form.notifications.error.not-long-enough": "Salasanan on oltava vähintään 6 merkkiä pitkä.", + // "profile.security.form.notifications.error.change-failed": "An error occurred while trying to change the password. Please check if the current password is correct.", + "profile.security.form.notifications.error.change-failed": "Tapahtui virhe salasanaa muutettaessa. Tarkista, että nykyinen salasana on oikea.", // "profile.security.form.notifications.error.not-same": "The provided passwords are not the same.", "profile.security.form.notifications.error.not-same": "Annetut salasanat eivät täsmää.", + // "profile.security.form.notifications.error.general": "Please fill required fields of security form.", + "profile.security.form.notifications.error.general": "Täytä suojauslomakkeen vaaditut kentät.", + // "profile.title": "Update Profile", "profile.title": "Päivitä profiili", - + // "profile.card.researcher": "Researcher Profile", + "profile.card.researcher": "Tutkijaprofiili", // "project.listelement.badge": "Research Project", "project.listelement.badge": "Tutkimusprojekti", @@ -3668,7 +4960,8 @@ // "project.search.results.head": "Project Search Results", "project.search.results.head": "Projektihaun tulokset", - + // "project-relationships.search.results.head": "Project Search Results", + "project-relationships.search.results.head": "Projektihaun tulokset", // "publication.listelement.badge": "Publication", "publication.listelement.badge": "Julkaisu", @@ -3697,9 +4990,20 @@ // "publication.search.results.head": "Publication Search Results", "publication.search.results.head": "Aineistohaun tulokset", - // "publication.search.title": "DSpace Angular :: Publication Search", - "publication.search.title": "DSpace Angular :: Aineistohaku", + // "publication-relationships.search.results.head": "Publication Search Results", + "publication-relationships.search.results.head": "Aineistohaun tulokset", + // "publication.search.title": "Publication Search", + "publication.search.title": "Aineistohaku", + + // "media-viewer.next": "Next", + "media-viewer.next": "Seuraava", + + // "media-viewer.previous": "Previous", + "media-viewer.previous": "Edellinen", + + // "media-viewer.playlist": "Playlist", + "media-viewer.playlist": "Soittolista", // "register-email.title": "New user registration", "register-email.title": "Uuden käyttäjän rekisteröinti", @@ -3734,8 +5038,8 @@ // "register-page.create-profile.security.header": "Security", "register-page.create-profile.security.header": "Suojaus", - // "register-page.create-profile.security.info": "Please enter a password in the box below, and confirm it by typing it again into the second box. It should be at least six characters long.", - "register-page.create-profile.security.info": "Syötä salasana alla olevaan kenttään ja vahvista se kirjoittamalla salasana uudelleen seuraavaan kenttään. Salasanan on oltava vähintään kuusi merkkiä pitkä.", + // "register-page.create-profile.security.info": "Please enter a password in the box below, and confirm it by typing it again into the second box.", + "register-page.create-profile.security.info": "Syötä salasana alla olevaan kenttään ja vahvista se kirjoittamalla salasana uudelleen seuraavaan kenttään.", // "register-page.create-profile.security.label.password": "Password *", "register-page.create-profile.security.label.password": "Salasana *", @@ -3749,14 +5053,11 @@ // "register-page.create-profile.security.error.matching-passwords": "The passwords do not match.", "register-page.create-profile.security.error.matching-passwords": "Salasanat eivät täsmää.", - // "register-page.create-profile.security.error.password-length": "The password should be at least 6 characters long.", - "register-page.create-profile.security.error.password-length": "Salasanan on oltava vähintään 6 merkkiä pitkä.", - // "register-page.create-profile.submit": "Complete Registration", "register-page.create-profile.submit": "Viimeistele rekisteröinti", // "register-page.create-profile.submit.error.content": "Something went wrong while registering a new user.", - "register-page.create-profile.submit.error.content": "Tapahtui virhe uuden käyttäjän rekisteröinnissä.", + "register-page.create-profile.submit.error.content": "Virhe uuden käyttäjän rekisteröinnissä.", // "register-page.create-profile.submit.error.head": "Registration failed", "register-page.create-profile.submit.error.head": "Rekisteröinti epäonnistui", @@ -3767,7 +5068,6 @@ // "register-page.create-profile.submit.success.head": "Registration completed", "register-page.create-profile.submit.success.head": "Rekisteröinti valmis", - // "register-page.registration.header": "New user registration", "register-page.registration.header": "Uuden käyttäjän rekisteröinti", @@ -3780,8 +5080,11 @@ // "register-page.registration.email.error.required": "Please fill in an email address", "register-page.registration.email.error.required": "Anna sähköpostiosoite", - // "register-page.registration.email.error.pattern": "Please fill in a valid email address", - "register-page.registration.email.error.pattern": "Anna toimiva sähköpostiosoite, ole hyvä", + // "register-page.registration.email.error.not-email-form": "Please fill in a valid email address.", + "register-page.registration.email.error.not-email-form": "Anna toimiva sähköpostiosoite", + + // "register-page.registration.email.error.not-valid-domain": "Use email with allowed domains: {{ domains }}", + "register-page.registration.email.error.not-valid-domain": "Käytä sähköpostiosoitetta näillä verkkoalueilla: {{ domains }}", // "register-page.registration.email.hint": "This address will be verified and used as your login name.", "register-page.registration.email.hint": "Osoite varmistetaan, ja se toimii käyttäjätunnuksenasi kirjautumisessa.", @@ -3801,7 +5104,29 @@ // "register-page.registration.error.content": "An error occured when registering the following email address: {{ email }}", "register-page.registration.error.content": "Virhe rekisteröitäessä tätä sähköpostiosoitetta: {{ email }}", + // "register-page.registration.error.recaptcha": "Error when trying to authenticate with recaptcha", + "register-page.registration.error.recaptcha": "Virhe autentikoitaessa recaptcha-toiminnolla", + // "register-page.registration.google-recaptcha.must-accept-cookies": "In order to register you must accept the Registration and Password recovery (Google reCaptcha) cookies.", + "register-page.registration.google-recaptcha.must-accept-cookies": "Rekisteröityäksesi sinun on hyväksyttävä Rekisteröinnin ja salasanan palauttamisen (Google reCaptcha) evästeet.", + + // "register-page.registration.error.maildomain": "This email address is not on the list of domains who can register. Allowed domains are {{ domains }}", + "register-page.registration.error.maildomain": "Annettu sähköpostiosoite ei ole rekisteröinnille sallittujen verkkoalueiden joukossa. Sallitut verkkoalueet ovat {{ domains }}", + + // "register-page.registration.google-recaptcha.open-cookie-settings": "Open cookie settings", + "register-page.registration.google-recaptcha.open-cookie-settings": "Avaa evästeasetukset", + + // "register-page.registration.google-recaptcha.notification.title": "Google reCaptcha", + "register-page.registration.google-recaptcha.notification.title": "Google reCaptcha", + + // "register-page.registration.google-recaptcha.notification.message.error": "An error occurred during reCaptcha verification", + "register-page.registration.google-recaptcha.notification.message.error": "Virhe reCaptcha-todennuksessa", + + // "register-page.registration.google-recaptcha.notification.message.expired": "Verification expired. Please verify again.", + "register-page.registration.google-recaptcha.notification.message.expired": "Todentaminen vanhentunut. Todenna uudelleen.", + + // "register-page.registration.info.maildomain": "Accounts can be registered for mail addresses of the domains", + "register-page.registration.info.maildomain": "Tili voidaan rekisteröidä näiden verkkoalueiden sähköpostiosoitteille", // "relationships.add.error.relationship-type.content": "No suitable match could be found for relationship type {{ type }} between the two items", "relationships.add.error.relationship-type.content": "Ei {{ type }}-tyyppistä yhteysvastaavuutta kahden tietueen välillä", @@ -3857,7 +5182,23 @@ // "relationships.isContributorOf": "Contributors", "relationships.isContributorOf": "Muut tekijät", + // "relationships.isContributorOf.OrgUnit": "Contributor (Organizational Unit)", + "relationships.isContributorOf.OrgUnit": "Osallistuja (Organisaatioyksikkö)", + // "relationships.isContributorOf.Person": "Contributor", + "relationships.isContributorOf.Person": "Osallistuja", + + // "relationships.isFundingAgencyOf.OrgUnit": "Funder", + "relationships.isFundingAgencyOf.OrgUnit": "Rahoittaja", + + // "repository.image.logo": "Repository logo", + "repository.image.logo": "Julkaisuarkiston logo", + + // "repository.title": "DSpace Repository", + "repository.title": "Julkaisuarkisto", + + // "repository.title.prefix": "DSpace Repository :: ", + "repository.title.prefix": "Julkaisuarkisto :: ", // "resource-policies.add.button": "Add", "resource-policies.add.button": "Lisää", @@ -3910,6 +5251,12 @@ // "resource-policies.edit.page.failure.content": "An error occurred while editing the resource policy.", "resource-policies.edit.page.failure.content": "Virhe muokattaessa resurssikäytäntöä.", + // "resource-policies.edit.page.target-failure.content": "An error occurred while editing the target (ePerson or group) of the resource policy.", + "resource-policies.edit.page.target-failure.content": "Tapahtui virhe muokattaessa resurssikäytännön kohdetta (käyttäjä tai ryhmä).", + + // "resource-policies.edit.page.other-failure.content": "An error occurred while editing the resource policy. The target (ePerson or group) has been successfully updated.", + "resource-policies.edit.page.other-failure.content": "Tapahtui virhe resurssikäytäntöä muokattaessa. Kohde (käyttäjä tai ryhmä) on päivitetty onnistuneesti.", + // "resource-policies.edit.page.success.content": "Operation successful", "resource-policies.edit.page.success.content": "Toiminto onnistui", @@ -3943,10 +5290,25 @@ // "resource-policies.form.eperson-group-list.table.headers.name": "Name", "resource-policies.form.eperson-group-list.table.headers.name": "Nimi", + // "resource-policies.form.eperson-group-list.modal.header": "Cannot change type", + "resource-policies.form.eperson-group-list.modal.header": "Tyypin muuttaminen ei onnistu", + + // "resource-policies.form.eperson-group-list.modal.text1.toGroup": "It is not possible to replace an ePerson with a group.", + "resource-policies.form.eperson-group-list.modal.text1.toGroup": "Käyttäjän korvaaminen ryhmällä ei ole mahdollista.", + + // "resource-policies.form.eperson-group-list.modal.text1.toEPerson": "It is not possible to replace a group with an ePerson.", + "resource-policies.form.eperson-group-list.modal.text1.toEPerson": "Ryhmän korvaaminen käyttäjällä ei ole mahdollista.", + + // "resource-policies.form.eperson-group-list.modal.text2": "Delete the current resource policy and create a new one with the desired type.", + "resource-policies.form.eperson-group-list.modal.text2": "Poista nykyinen resurssikäytäntö ja luo uusi halutulla tyypillä.", + + // "resource-policies.form.eperson-group-list.modal.close": "Ok", + "resource-policies.form.eperson-group-list.modal.close": "Ok", + // "resource-policies.form.date.end.label": "End Date", "resource-policies.form.date.end.label": "Loppupäivämäärä", - // "resource-policies.form.date.start.label": "Start Date + // "resource-policies.form.date.start.label": "Start Date", "resource-policies.form.date.start.label": "Alkupäivämäärä", // "resource-policies.form.description.label": "Description", @@ -4009,21 +5371,19 @@ // "resource-policies.table.headers.title.for.collection": "Policies for Collection", "resource-policies.table.headers.title.for.collection": "Kokoelmakäytännöt", - - // "search.description": "", "search.description": "", // "search.switch-configuration.title": "Show", "search.switch-configuration.title": "Näytä", - // "search.title": "DSpace Angular :: Search", - "search.title": "DSpace Angular :: Hae", + // "search.title": "Search", + "search.title": "Hae", // "search.breadcrumbs": "Search", "search.breadcrumbs": "Hae", - // "search.search-form.placeholder": "Search the repository ...", + // "search.search-form.placeholder": "Search the repository ...", "search.search-form.placeholder": "Hae julkaisuarkistosta ...", // "search.filters.applied.f.author": "Author", @@ -4038,7 +5398,7 @@ // "search.filters.applied.f.dateSubmitted": "Date submitted", "search.filters.applied.f.dateSubmitted": "Tallennusajankohta", - // "search.filters.applied.f.discoverable": "Private", + // "search.filters.applied.f.discoverable": "Non-discoverable", "search.filters.applied.f.discoverable": "Yksityinen", // "search.filters.applied.f.entityType": "Item Type", @@ -4068,28 +5428,41 @@ // "search.filters.applied.f.birthDate.min": "Start birth date", "search.filters.applied.f.birthDate.min": "Varhaisin syntymäaika", + // "search.filters.applied.f.supervisedBy": "Supervised by", + "search.filters.applied.f.supervisedBy": "Ohjaajana:", + // "search.filters.applied.f.withdrawn": "Withdrawn", "search.filters.applied.f.withdrawn": "Poistettu käytöstä", - - // "search.filters.filter.author.head": "Author", "search.filters.filter.author.head": "Tekijä", // "search.filters.filter.author.placeholder": "Author name", "search.filters.filter.author.placeholder": "Tekijän nimi", + // "search.filters.filter.author.label": "Search author name", + "search.filters.filter.author.label": "Hae tekijän nimellä", + // "search.filters.filter.birthDate.head": "Birth Date", "search.filters.filter.birthDate.head": "Syntymäaika", // "search.filters.filter.birthDate.placeholder": "Birth Date", "search.filters.filter.birthDate.placeholder": "Syntymäaika", + // "search.filters.filter.birthDate.label": "Search birth date", + "search.filters.filter.birthDate.label": "Hae syntymäajalla", + + // "search.filters.filter.collapse": "Collapse filter", + "search.filters.filter.collapse": "Sulje suodatin", + // "search.filters.filter.creativeDatePublished.head": "Date Published", - "search.filters.filter.creativeDatePublished.head": "Julkaisuajankohta", + "search.filters.filter.creativeDatePublished.head": "Julkaisuaika", // "search.filters.filter.creativeDatePublished.placeholder": "Date Published", - "search.filters.filter.creativeDatePublished.placeholder": "Julkaisuajankohta", + "search.filters.filter.creativeDatePublished.placeholder": "Julkaisuaika", + + // "search.filters.filter.creativeDatePublished.label": "Search date published", + "search.filters.filter.creativeDatePublished.label": "Hae julkaisuaikaa", // "search.filters.filter.creativeWorkEditor.head": "Editor", "search.filters.filter.creativeWorkEditor.head": "Toimittaja", @@ -4097,26 +5470,41 @@ // "search.filters.filter.creativeWorkEditor.placeholder": "Editor", "search.filters.filter.creativeWorkEditor.placeholder": "Toimittaja", + // "search.filters.filter.creativeWorkEditor.label": "Search editor", + "search.filters.filter.creativeWorkEditor.label": "Hae toimittajaa", + // "search.filters.filter.creativeWorkKeywords.head": "Subject", "search.filters.filter.creativeWorkKeywords.head": "Asiasana", // "search.filters.filter.creativeWorkKeywords.placeholder": "Subject", "search.filters.filter.creativeWorkKeywords.placeholder": "Asiasana", + // "search.filters.filter.creativeWorkKeywords.label": "Search subject", + "search.filters.filter.creativeWorkKeywords.label": "Hae asiasanaa", + // "search.filters.filter.creativeWorkPublisher.head": "Publisher", "search.filters.filter.creativeWorkPublisher.head": "Julkaisija", // "search.filters.filter.creativeWorkPublisher.placeholder": "Publisher", "search.filters.filter.creativeWorkPublisher.placeholder": "Julkaisija", + // "search.filters.filter.creativeWorkPublisher.label": "Search publisher", + "search.filters.filter.creativeWorkPublisher.label": "Hae julkaisijaa", + // "search.filters.filter.dateIssued.head": "Date", "search.filters.filter.dateIssued.head": "Päivämäärä", - // "search.filters.filter.dateIssued.max.placeholder": "Minimum Date", - "search.filters.filter.dateIssued.max.placeholder": "Alkupäivämäärä", + // "search.filters.filter.dateIssued.max.placeholder": "Maximum Date", + "search.filters.filter.dateIssued.max.placeholder": "Suurin päivämäärä", - // "search.filters.filter.dateIssued.min.placeholder": "Maximum Date", - "search.filters.filter.dateIssued.min.placeholder": "Loppupäivämäärä", + // "search.filters.filter.dateIssued.max.label": "End", + "search.filters.filter.dateIssued.max.label": "Loppu", + + // "search.filters.filter.dateIssued.min.placeholder": "Minimum Date", + "search.filters.filter.dateIssued.min.placeholder": "Pienin päivämäärä", + + // "search.filters.filter.dateIssued.min.label": "Start", + "search.filters.filter.dateIssued.min.label": "Alku", // "search.filters.filter.dateSubmitted.head": "Date submitted", "search.filters.filter.dateSubmitted.head": "Tallennusajankohta", @@ -4124,7 +5512,10 @@ // "search.filters.filter.dateSubmitted.placeholder": "Date submitted", "search.filters.filter.dateSubmitted.placeholder": "Tallennnusajankohta", - // "search.filters.filter.discoverable.head": "Private", + // "search.filters.filter.dateSubmitted.label": "Search date submitted", + "search.filters.filter.dateSubmitted.label": "Hakupäivä lähetetty", + + // "search.filters.filter.discoverable.head": "Non-discoverable", "search.filters.filter.discoverable.head": "Yksityinen", // "search.filters.filter.withdrawn.head": "Withdrawn", @@ -4136,6 +5527,12 @@ // "search.filters.filter.entityType.placeholder": "Item Type", "search.filters.filter.entityType.placeholder": "Tietueen tyyppi", + // "search.filters.filter.entityType.label": "Search item type", + "search.filters.filter.entityType.label": "Hae tietueen tyyppiä", + + // "search.filters.filter.expand": "Expand filter", + "search.filters.filter.expand": "Laajenna suodinta", + // "search.filters.filter.has_content_in_original_bundle.head": "Has files", "search.filters.filter.has_content_in_original_bundle.head": "On tiedostoja", @@ -4145,53 +5542,80 @@ // "search.filters.filter.itemtype.placeholder": "Type", "search.filters.filter.itemtype.placeholder": "Tyyppi", + // "search.filters.filter.itemtype.label": "Search type", + "search.filters.filter.itemtype.label": "Hakutyyppi", + // "search.filters.filter.jobTitle.head": "Job Title", "search.filters.filter.jobTitle.head": "Tehtävänimike", // "search.filters.filter.jobTitle.placeholder": "Job Title", "search.filters.filter.jobTitle.placeholder": "Tehtävänimike", + // "search.filters.filter.jobTitle.label": "Search job title", + "search.filters.filter.jobTitle.label": "Hae tehtävänimikettä", + // "search.filters.filter.knowsLanguage.head": "Known language", "search.filters.filter.knowsLanguage.head": "Tunnettu kieli", // "search.filters.filter.knowsLanguage.placeholder": "Known language", "search.filters.filter.knowsLanguage.placeholder": "Tunnettu kieli", + // "search.filters.filter.knowsLanguage.label": "Search known language", + "search.filters.filter.knowsLanguage.label": "Hae tunnettua kieltä", + // "search.filters.filter.namedresourcetype.head": "Status", "search.filters.filter.namedresourcetype.head": "Tila", // "search.filters.filter.namedresourcetype.placeholder": "Status", "search.filters.filter.namedresourcetype.placeholder": "Tila", + // "search.filters.filter.namedresourcetype.label": "Search status", + "search.filters.filter.namedresourcetype.label": "Haun tila", + // "search.filters.filter.objectpeople.head": "People", "search.filters.filter.objectpeople.head": "Käyttäjät", // "search.filters.filter.objectpeople.placeholder": "People", "search.filters.filter.objectpeople.placeholder": "Käyttäjät", + // "search.filters.filter.objectpeople.label": "Search people", + "search.filters.filter.objectpeople.label": "Hae ihmisiä", + // "search.filters.filter.organizationAddressCountry.head": "Country", "search.filters.filter.organizationAddressCountry.head": "Maa", // "search.filters.filter.organizationAddressCountry.placeholder": "Country", "search.filters.filter.organizationAddressCountry.placeholder": "Maa", + // "search.filters.filter.organizationAddressCountry.label": "Search country", + "search.filters.filter.organizationAddressCountry.label": "Hae maata", + // "search.filters.filter.organizationAddressLocality.head": "City", "search.filters.filter.organizationAddressLocality.head": "Kaupunki", // "search.filters.filter.organizationAddressLocality.placeholder": "City", "search.filters.filter.organizationAddressLocality.placeholder": "Kaupunki", + // "search.filters.filter.organizationAddressLocality.label": "Search city", + "search.filters.filter.organizationAddressLocality.label": "Hae kaupunkia", + // "search.filters.filter.organizationFoundingDate.head": "Date Founded", "search.filters.filter.organizationFoundingDate.head": "Perustamispäivämäärä", // "search.filters.filter.organizationFoundingDate.placeholder": "Date Founded", "search.filters.filter.organizationFoundingDate.placeholder": "Perustamispäivämäärä", + // "search.filters.filter.organizationFoundingDate.label": "Search date founded", + "search.filters.filter.organizationFoundingDate.label": "Hae perustamispäivämäärää", + // "search.filters.filter.scope.head": "Scope", "search.filters.filter.scope.head": "Rajaus", // "search.filters.filter.scope.placeholder": "Scope filter", - "search.filters.filter.scope.placeholder": "Haun tarkennus", + "search.filters.filter.scope.placeholder": "Hakusuodattimet", + + // "search.filters.filter.scope.label": "Search scope filter", + "search.filters.filter.scope.label": "Hae hakusuodatinta", // "search.filters.filter.show-less": "Collapse", "search.filters.filter.show-less": "Sulje", @@ -4205,13 +5629,29 @@ // "search.filters.filter.subject.placeholder": "Subject", "search.filters.filter.subject.placeholder": "Asiasana", + // "search.filters.filter.subject.label": "Search subject", + "search.filters.filter.subject.label": "Hae asiasanaa", + // "search.filters.filter.submitter.head": "Submitter", "search.filters.filter.submitter.head": "Tallentaja", // "search.filters.filter.submitter.placeholder": "Submitter", "search.filters.filter.submitter.placeholder": "Tallentaja", + // "search.filters.filter.submitter.label": "Search submitter", + "search.filters.filter.submitter.label": "Hae tallentajaa", + // "search.filters.filter.show-tree": "Browse {{ name }} tree", + "search.filters.filter.show-tree": "Selaa {{ name }}-puuta", + + // "search.filters.filter.supervisedBy.head": "Supervised By", + "search.filters.filter.supervisedBy.head": "Ohjaajana:", + + // "search.filters.filter.supervisedBy.placeholder": "Supervised By", + "search.filters.filter.supervisedBy.placeholder": "Ohjaajana:", + + // "search.filters.filter.supervisedBy.label": "Search Supervised By", + "search.filters.filter.supervisedBy.label": "Hae ohjaajan mukaan", // "search.filters.entityType.JournalIssue": "Journal Issue", "search.filters.entityType.JournalIssue": "Kausijulkaisun numero", @@ -4240,25 +5680,23 @@ // "search.filters.withdrawn.false": "No", "search.filters.withdrawn.false": "Ei", - // "search.filters.head": "Filters", "search.filters.head": "Suodattimet", // "search.filters.reset": "Reset filters", "search.filters.reset": "Tyhjennä suodattimet", - + // "search.filters.search.submit": "Submit", + "search.filters.search.submit": "Lähetä", // "search.form.search": "Search", "search.form.search": "Hae", - // "search.form.search_dspace": "Search DSpace", - "search.form.search_dspace": "Hae arkistosta", - - // "search.form.search_mydspace": "Search MyDSpace", - "search.form.search_mydspace": "Hae omista tiedoista", - + // "search.form.search_dspace": "All repository", + "search.form.search_dspace": "Koko julkaisuarkisto", + // "search.form.scope.all": "All of DSpace", + "search.form.scope.all": "Koko julkaisuarkisto", // "search.results.head": "Search Results", "search.results.head": "Hakutulokset", @@ -4272,7 +5710,17 @@ // "search.results.empty": "Your search returned no results.", "search.results.empty": "Ei hakutuloksia.", + // "search.results.view-result": "View", + "search.results.view-result": "Näytä", + // "search.results.response.500": "An error occurred during query execution, please try again later", + "search.results.response.500": "Virhe hakua suoritettaessa, yritä myöhemmin uudelleen", + + // "default.search.results.head": "Search Results", + "default.search.results.head": "Hakutulokset", + + // "default-relationships.search.results.head": "Search Results", + "default-relationships.search.results.head": "Hakutulokset", // "search.sidebar.close": "Back to results", "search.sidebar.close": "Paluu tuloksiin", @@ -4295,8 +5743,6 @@ // "search.sidebar.settings.title": "Settings", "search.sidebar.settings.title": "Asetukset", - - // "search.view-switch.show-detail": "Show detail", "search.view-switch.show-detail": "Näytä lisätiedot", @@ -4306,8 +5752,6 @@ // "search.view-switch.show-list": "Show as list", "search.view-switch.show-list": "Näytä luettelona", - - // "sorting.ASC": "Ascending", "sorting.ASC": "Laskeva", @@ -4320,10 +5764,29 @@ // "sorting.dc.title.DESC": "Title Descending", "sorting.dc.title.DESC": "Nimeke (Ö-A)", - // "sorting.score.DESC": "Relevance", - "sorting.score.DESC": "Relevanssi", + // "sorting.score.ASC": "Least Relevant", + "sorting.score.ASC": "Vähiten relevantti", + // "sorting.score.DESC": "Most Relevant", + "sorting.score.DESC": "Relevantein", + // "sorting.dc.date.issued.ASC": "Date Issued Ascending", + "sorting.dc.date.issued.ASC": "Julkaisuaika nouseva", + + // "sorting.dc.date.issued.DESC": "Date Issued Descending", + "sorting.dc.date.issued.DESC": "Julkaisuaika laskeva", + + // "sorting.dc.date.accessioned.ASC": "Accessioned Date Ascending", + "sorting.dc.date.accessioned.ASC": "Hyväksymispäivä nouseva", + + // "sorting.dc.date.accessioned.DESC": "Accessioned Date Descending", + "sorting.dc.date.accessioned.DESC": "Hyväksymispäivä laskeva", + + // "sorting.lastModified.ASC": "Last modified Ascending", + "sorting.lastModified.ASC": "Viimeksi muokattu nouseva", + + // "sorting.lastModified.DESC": "Last modified Descending", + "sorting.lastModified.DESC": "Viimeksi muokattu laskeva", // "statistics.title": "Statistics", "statistics.title": "Tilastot", @@ -4358,12 +5821,19 @@ // "statistics.table.header.views": "Views", "statistics.table.header.views": "Katseluita", + // "statistics.table.no-name": "(object name could not be loaded)", + "statistics.table.no-name": "(kohteen nimeä ei voitu ladata)", + // "submission.edit.breadcrumbs": "Edit Submission", + "submission.edit.breadcrumbs": "Muokkaa tallennusta", // "submission.edit.title": "Edit Submission", "submission.edit.title": "Muokkaa tallennusta", - // "submission.general.cannot_submit": "You have not the privilege to make a new submission.", + // "submission.general.cancel": "Cancel", + "submission.general.cancel": "Peruuta", + + // "submission.general.cannot_submit": "You don't have permission to make a new submission.", "submission.general.cannot_submit": "Sinulla ei ole oikeuksia aineiston tallentamiseen.", // "submission.general.deposit": "Deposit", @@ -4384,21 +5854,50 @@ // "submission.general.discard.submit": "Discard", "submission.general.discard.submit": "Hylkää", + // "submission.general.info.saved": "Saved", + "submission.general.info.saved": "Tallennettu", + + // "submission.general.info.pending-changes": "Unsaved changes", + "submission.general.info.pending-changes": "Tallentamattomat muutokset", + // "submission.general.save": "Save", "submission.general.save": "Tallenna", // "submission.general.save-later": "Save for later", "submission.general.save-later": "Tallenna myöhemmäksi", - // "submission.import-external.page.title": "Import metadata from an external source", "submission.import-external.page.title": "Importoi metadata ulkoisesta lähteestä", // "submission.import-external.title": "Import metadata from an external source", "submission.import-external.title": "Importoi metadata ulkoisesta lähteestä", + // "submission.import-external.title.Journal": "Import a journal from an external source", + "submission.import-external.title.Journal": "Importoi Muokkaa kausijulkaisu ulkoisesta lähteestä", + + // "submission.import-external.title.JournalIssue": "Import a journal issue from an external source", + "submission.import-external.title.JournalIssue": "Importoi kausijulkaisun numero ulkoisesta lähteestä", + + // "submission.import-external.title.JournalVolume": "Import a journal volume from an external source", + "submission.import-external.title.JournalVolume": "Importoi kausijulkaisun vuosikerta ulkoisesta lähteestä", + + // "submission.import-external.title.OrgUnit": "Import a publisher from an external source", + "submission.import-external.title.OrgUnit": "Importoi julkaisija ulkoisesta lähteestä", + + // "submission.import-external.title.Person": "Import a person from an external source", + "submission.import-external.title.Person": "Importoi käyttäjä ulkoisesta lähteestä", + + // "submission.import-external.title.Project": "Import a project from an external source", + "submission.import-external.title.Project": "Importoi projekti ulkoisesta lähteestä", + + // "submission.import-external.title.Publication": "Import a publication from an external source", + "submission.import-external.title.Publication": "Importoi julkaisu ulkoisesta lähteestä", + + // "submission.import-external.title.none": "Import metadata from an external source", + "submission.import-external.title.none": "Importoi metadata ulkoisesta lähteestä", + // "submission.import-external.page.hint": "Enter a query above to find items from the web to import in to DSpace.", - "submission.import-external.page.hint": "Anna hakulauseke etsiäksesi verkosta arkistoon importoitavia tietueita.", + "submission.import-external.page.hint": "Anna hakulauseke etsiäksesi verkosta julkaisuarkistoon importoitavia tietueita.", // "submission.import-external.back-to-my-dspace": "Back to MyDSpace", "submission.import-external.back-to-my-dspace": "Paluu omiin tietoihin", @@ -4418,27 +5917,84 @@ // "submission.import-external.source.arxiv": "arXiv", "submission.import-external.source.arxiv": "arXiv", + // "submission.import-external.source.ads": "NASA/ADS", + "submission.import-external.source.ads": "NASA/ADS", + + // "submission.import-external.source.cinii": "CiNii", + "submission.import-external.source.cinii": "CiNii", + + // "submission.import-external.source.crossref": "CrossRef", + "submission.import-external.source.crossref": "CrossRef", + + // "submission.import-external.source.datacite": "DataCite", + "submission.import-external.source.datacite": "DataCite", + + // "submission.import-external.source.scielo": "SciELO", + "submission.import-external.source.scielo": "SciELO", + + // "submission.import-external.source.scopus": "Scopus", + "submission.import-external.source.scopus": "Scopus", + + // "submission.import-external.source.vufind": "VuFind", + "submission.import-external.source.vufind": "VuFind", + + // "submission.import-external.source.wos": "Web Of Science", + "submission.import-external.source.wos": "Web Of Science", + + // "submission.import-external.source.orcidWorks": "ORCID", + "submission.import-external.source.orcidWorks": "ORCID", + + // "submission.import-external.source.epo": "European Patent Office (EPO)", + "submission.import-external.source.epo": "Euroopan patenttivirasto (EPO)", + // "submission.import-external.source.loading": "Loading ...", "submission.import-external.source.loading": "Ladataan ...", // "submission.import-external.source.sherpaJournal": "SHERPA Journals", "submission.import-external.source.sherpaJournal": "SHERPA-kausijulkaisut", + // "submission.import-external.source.sherpaJournalIssn": "SHERPA Journals by ISSN", + "submission.import-external.source.sherpaJournalIssn": "SHERPA-kausijulkaisut ISSN-tunnuksen mukaan", + // "submission.import-external.source.sherpaPublisher": "SHERPA Publishers", "submission.import-external.source.sherpaPublisher": "SHERPA-kustantajat", + // "submission.import-external.source.openAIREFunding": "Funding OpenAIRE API", + "submission.import-external.source.openAIREFunding": "OpenAIRE API-rahoitus", + // "submission.import-external.source.orcid": "ORCID", "submission.import-external.source.orcid": "ORCID-tunniste", // "submission.import-external.source.pubmed": "Pubmed", "submission.import-external.source.pubmed": "Pubmed", + // "submission.import-external.source.pubmedeu": "Pubmed Europe", + "submission.import-external.source.pubmedeu": "Euroopan Pubmed", + // "submission.import-external.source.lcname": "Library of Congress Names", "submission.import-external.source.lcname": "Library of Congress -nimet", // "submission.import-external.preview.title": "Item Preview", "submission.import-external.preview.title": "Tietueen esikatselu", + // "submission.import-external.preview.title.Publication": "Publication Preview", + "submission.import-external.preview.title.Publication": "Julkaisun esikatselu", + + // "submission.import-external.preview.title.none": "Item Preview", + "submission.import-external.preview.title.none": "Tietueen esikatselu", + + // "submission.import-external.preview.title.Journal": "Journal Preview", + "submission.import-external.preview.title.Journal": "Kausijulkaisun esikatselu", + + // "submission.import-external.preview.title.OrgUnit": "Organizational Unit Preview", + "submission.import-external.preview.title.OrgUnit": "Organisaatioyksikön esikatselu", + + // "submission.import-external.preview.title.Person": "Person Preview", + "submission.import-external.preview.title.Person": "Käyttäjän esikatselu", + + // "submission.import-external.preview.title.Project": "Project Preview", + "submission.import-external.preview.title.Project": "Projektin esikatselu", + // "submission.import-external.preview.subtitle": "The metadata below was imported from an external source. It will be pre-filled when you start the submission.", "submission.import-external.preview.subtitle": "Alla oleva metadata importoitiin ulkoisesta lähteestä. Sillä esitäytetään metadata, kun aloitat tallennuksen.", @@ -4469,6 +6025,48 @@ // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Volume": "Import remote journal volume", "submission.sections.describe.relationship-lookup.external-source.import-button-title.Journal Volume": "Importoi kausijulkaisun vuosikerta ulkoisesta lähteestä", + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.isProjectOfPublication": "Project", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.isProjectOfPublication": "Projekti", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.none": "Import remote item", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.none": "Importoi tietue ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Event": "Import remote event", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Event": "Importoi tapahtuma ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Product": "Import remote product", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Product": "Importoi tuote ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Equipment": "Import remote equipment", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Equipment": "Importoi laite ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.OrgUnit": "Import remote organizational unit", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.OrgUnit": "Importoi organisaatioyksikkö ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Funding": "Import remote fund", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Funding": "Importoi rahoitus ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Person": "Import remote person", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Person": "Importoi käyttäjä ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Patent": "Import remote patent", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Patent": "Importoi patentti ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Project": "Import remote project", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Project": "Importoi projekti ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-button-title.Publication": "Import remote publication", + "submission.sections.describe.relationship-lookup.external-source.import-button-title.Publication": "Importoi julkaisu ulkoisesta lähteestä", + + // "submission.sections.describe.relationship-lookup.external-source.import-modal.isProjectOfPublication.added.new-entity": "New Entity Added!", + "submission.sections.describe.relationship-lookup.external-source.import-modal.isProjectOfPublication.added.new-entity": "Uusi entiteetti lisätty", + + // "submission.sections.describe.relationship-lookup.external-source.import-modal.isProjectOfPublication.title": "Project", + "submission.sections.describe.relationship-lookup.external-source.import-modal.isProjectOfPublication.title": "Projekti", + + // "submission.sections.describe.relationship-lookup.external-source.import-modal.head.openAIREFunding": "Funding OpenAIRE API", + "submission.sections.describe.relationship-lookup.external-source.import-modal.head.openAIREFunding": "Funding OpenAIRE API-rahoitus", + // "submission.sections.describe.relationship-lookup.external-source.import-modal.isAuthorOfPublication.title": "Import Remote Author", "submission.sections.describe.relationship-lookup.external-source.import-modal.isAuthorOfPublication.title": "Importoi tekijä ulkoisesta lähteestä", @@ -4562,6 +6160,9 @@ // "submission.sections.describe.relationship-lookup.search-tab.search": "Go", "submission.sections.describe.relationship-lookup.search-tab.search": "Ok", + // "submission.sections.describe.relationship-lookup.search-tab.search-form.placeholder": "Search...", + "submission.sections.describe.relationship-lookup.search-tab.search-form.placeholder": "Haetaan...", + // "submission.sections.describe.relationship-lookup.search-tab.select-all": "Select all", "submission.sections.describe.relationship-lookup.search-tab.select-all": "Valitse kaikki", @@ -4637,13 +6238,39 @@ // "submission.sections.describe.relationship-lookup.search-tab.tab-title.isChildOrgUnitOf": "Search for Organizational Units", "submission.sections.describe.relationship-lookup.search-tab.tab-title.isChildOrgUnitOf": "Hae organisaatioyksiköitä", + // "submission.sections.describe.relationship-lookup.search-tab.tab-title.openAIREFunding": "Funding OpenAIRE API", + "submission.sections.describe.relationship-lookup.search-tab.tab-title.openAIREFunding": "OpenAIRE API -rahoitus", + + // "submission.sections.describe.relationship-lookup.search-tab.tab-title.isProjectOfPublication": "Projects", + "submission.sections.describe.relationship-lookup.search-tab.tab-title.isProjectOfPublication": "Projektit", + + // "submission.sections.describe.relationship-lookup.search-tab.tab-title.isFundingAgencyOfProject": "Funder of the Project", + "submission.sections.describe.relationship-lookup.search-tab.tab-title.isFundingAgencyOfProject": "Projektin rahoittaja", + + // "submission.sections.describe.relationship-lookup.search-tab.tab-title.isPublicationOfAuthor": "Publication of the Author", + "submission.sections.describe.relationship-lookup.search-tab.tab-title.isPublicationOfAuthor": "Tekijän julkaisu", + + // "submission.sections.describe.relationship-lookup.selection-tab.title.openAIREFunding": "Funding OpenAIRE API", + "submission.sections.describe.relationship-lookup.selection-tab.title.openAIREFunding": "OpenAIRE API API-rahoitus", + + // "submission.sections.describe.relationship-lookup.selection-tab.title.isProjectOfPublication": "Project", + "submission.sections.describe.relationship-lookup.selection-tab.title.isProjectOfPublication": "Projekti", + + // "submission.sections.describe.relationship-lookup.title.isProjectOfPublication": "Projects", + "submission.sections.describe.relationship-lookup.title.isProjectOfPublication": "Projektit", + + // "submission.sections.describe.relationship-lookup.title.isFundingAgencyOfProject": "Funder of the Project", + "submission.sections.describe.relationship-lookup.title.isFundingAgencyOfProject": "Projektin rahoittaja", + + // "submission.sections.describe.relationship-lookup.selection-tab.search-form.placeholder": "Search...", + "submission.sections.describe.relationship-lookup.selection-tab.search-form.placeholder": "Haetaan...", + // "submission.sections.describe.relationship-lookup.selection-tab.tab-title": "Current Selection ({{ count }})", "submission.sections.describe.relationship-lookup.selection-tab.tab-title": "Nykyinen valinta ({{ count }})", // "submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Journal Issues", "submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Kausijulkaisun numerot", - // "submission.sections.describe.relationship-lookup.title.JournalIssue": "Journal Issues", "submission.sections.describe.relationship-lookup.title.JournalIssue": "Kausijulkaisun numerot", @@ -4689,8 +6316,11 @@ // "submission.sections.describe.relationship-lookup.title.isChildOrgUnitOf": "Parent Organizational Unit", "submission.sections.describe.relationship-lookup.title.isChildOrgUnitOf": "Ylempi organisaatioyksikkö", + // "submission.sections.describe.relationship-lookup.title.isPublicationOfAuthor": "Publication", + "submission.sections.describe.relationship-lookup.title.isPublicationOfAuthor": "Julkaisu", + // "submission.sections.describe.relationship-lookup.search-tab.toggle-dropdown": "Toggle dropdown", - "submission.sections.describe.relationship-lookup.search-tab.toggle-dropdown": "Vaihda valikon tilaa", + "submission.sections.describe.relationship-lookup.search-tab.toggle-dropdown": "Näytä/piilota pudotusvalikko", // "submission.sections.describe.relationship-lookup.selection-tab.settings": "Settings", "submission.sections.describe.relationship-lookup.selection-tab.settings": "Asetukset", @@ -4767,6 +6397,24 @@ // "submission.sections.describe.relationship-lookup.selection-tab.title.arxiv": "Search Results", "submission.sections.describe.relationship-lookup.selection-tab.title.arxiv": "Hakutulokset", + // "submission.sections.describe.relationship-lookup.selection-tab.title.crossref": "Search Results", + "submission.sections.describe.relationship-lookup.selection-tab.title.crossref": "Hakutulokset", + + // "submission.sections.describe.relationship-lookup.selection-tab.title.epo": "Search Results", + "submission.sections.describe.relationship-lookup.selection-tab.title.epo": "Hakutulokset", + + // "submission.sections.describe.relationship-lookup.selection-tab.title.scopus": "Search Results", + "submission.sections.describe.relationship-lookup.selection-tab.title.scopus": "Hakutulokset", + + // "submission.sections.describe.relationship-lookup.selection-tab.title.scielo": "Search Results", + "submission.sections.describe.relationship-lookup.selection-tab.title.scielo": "Hakutulokset", + + // "submission.sections.describe.relationship-lookup.selection-tab.title.wos": "Search Results", + "submission.sections.describe.relationship-lookup.selection-tab.title.wos": "Hakutulokset", + + // "submission.sections.describe.relationship-lookup.selection-tab.title": "Search Results", + "submission.sections.describe.relationship-lookup.selection-tab.title": "Hakutulokset", + // "submission.sections.describe.relationship-lookup.name-variant.notification.content": "Would you like to save \"{{ value }}\" as a name variant for this person so you and others can reuse it for future submissions? If you don't you can still use it for this submission.", "submission.sections.describe.relationship-lookup.name-variant.notification.content": "Haluatko tallentaa nimen \"{{ value }}\" käyttäjän vaihtoehtoiseksi nimeksi, jota muutkin voivat käyttää uudelleen myös tulevissa tallennuksissa? Ellet tallenna nimeä, voit silti käyttää sitä tässä tallennuksessa.", @@ -4792,14 +6440,17 @@ "submission.sections.ccLicense.option.select": "Valitse vaihtoehto…", // "submission.sections.ccLicense.link": "You’ve selected the following license:", - "submission.sections.ccLicense.link": "Olet valinunt seuraavan lisenssin:", + "submission.sections.ccLicense.link": "Olet valinnut seuraavan lisenssin:", // "submission.sections.ccLicense.confirmation": "I grant the license above", - "submission.sections.ccLicense.confirmation": "Myönnän yllä olevan lisenssin", + "submission.sections.ccLicense.confirmation": "Hyväksyn yllä olevan lisenssin", // "submission.sections.general.add-more": "Add more", "submission.sections.general.add-more": "Lisää enemmän", + // "submission.sections.general.cannot_deposit": "Deposit cannot be completed due to errors in the form.
Please fill out all required fields to complete the deposit.", + "submission.sections.general.cannot_deposit": "Tallennus ei onnistu, koska lomakkeella on virheitä.
Täytä kaikki pakolliset kentät viimeistelläksesi tallennuksen.", + // "submission.sections.general.collection": "Collection", "submission.sections.general.collection": "Kokoelma", @@ -4839,7 +6490,26 @@ // "submission.sections.general.sections_not_valid": "There are incomplete sections.", "submission.sections.general.sections_not_valid": "Tallennuksessa keskeneräisiä osioita.", + // "submission.sections.identifiers.info": "The following identifiers will be created for your item:", + "submission.sections.identifiers.info": "Tietueellesi luodaan seuraavat tunnisteet:", + // "submission.sections.identifiers.no_handle": "No handles have been minted for this item.", + "submission.sections.identifiers.no_handle": "Tietueelle ei ole luotu handleja.", + + // "submission.sections.identifiers.no_doi": "No DOIs have been minted for this item.", + "submission.sections.identifiers.no_doi": "Tietueelle ei ole luotu DOI-tunnuksia.", + + // "submission.sections.identifiers.handle_label": "Handle: ", + "submission.sections.identifiers.handle_label": "Handle: ", + + // "submission.sections.identifiers.doi_label": "DOI: ", + "submission.sections.identifiers.doi_label": "DOI: ", + + // "submission.sections.identifiers.otherIdentifiers_label": "Other identifiers: ", + "submission.sections.identifiers.otherIdentifiers_label": "Muut tunnisteet: ", + + // "submission.sections.submit.progressbar.accessCondition": "Item access conditions", + "submission.sections.submit.progressbar.accessCondition": "Tietueen pääsyoikeudet", // "submission.sections.submit.progressbar.CClicense": "Creative commons license", "submission.sections.submit.progressbar.CClicense": "Creative commons -lisenssi", @@ -4859,19 +6529,65 @@ // "submission.sections.submit.progressbar.detect-duplicate": "Potential duplicates", "submission.sections.submit.progressbar.detect-duplicate": "Mahdollisia kaksoiskappaleita", + // "submission.sections.submit.progressbar.identifiers": "Identifiers", + "submission.sections.submit.progressbar.identifiers": "Tunnisteet", + // "submission.sections.submit.progressbar.license": "Deposit license", "submission.sections.submit.progressbar.license": "Tallennuslisenssi", + // "submission.sections.submit.progressbar.sherpapolicy": "Sherpa policies", + "submission.sections.submit.progressbar.sherpapolicy": "Sherpa-käytännöt", + // "submission.sections.submit.progressbar.upload": "Upload files", "submission.sections.submit.progressbar.upload": "Lataa tiedostoja", + // "submission.sections.submit.progressbar.sherpaPolicies": "Publisher open access policy information", + "submission.sections.submit.progressbar.sherpaPolicies": "Tietoa julkaisijan open access -käytännöistä", + // "submission.sections.sherpa-policy.title-empty": "No publisher policy information available. If your work has an associated ISSN, please enter it above to see any related publisher open access policies.", + "submission.sections.sherpa-policy.title-empty": "Ei tietoa julkausijan käytännöistä. Jos työlläsi on ISSN-tunnus, syötä se alapuolella olevan kenttään nähdäksesi siihen liittyvät julkaisijan open access -käytännöt.", + + // "submission.sections.status.errors.title": "Errors", + "submission.sections.status.errors.title": "Virheet", + + // "submission.sections.status.valid.title": "Valid", + "submission.sections.status.valid.title": "Hyväksytty", + + // "submission.sections.status.warnings.title": "Warnings", + "submission.sections.status.warnings.title": "Varoitukset", + + // "submission.sections.status.errors.aria": "has errors", + "submission.sections.status.errors.aria": "sisältää virheitä", + + // "submission.sections.status.valid.aria": "is valid", + "submission.sections.status.valid.aria": "on validi", + + // "submission.sections.status.warnings.aria": "has warnings", + "submission.sections.status.warnings.aria": "sisältää varoituksia", + + // "submission.sections.status.info.title": "Additional Information", + "submission.sections.status.info.title": "Lisätiedot", + + // "submission.sections.status.info.aria": "Additional Information", + "submission.sections.status.info.aria": "Lisätiedot", + + // "submission.sections.toggle.open": "Open section", + "submission.sections.toggle.open": "Avaa osio", + + // "submission.sections.toggle.close": "Close section", + "submission.sections.toggle.close": "Sulje osio", + + // "submission.sections.toggle.aria.open": "Expand {{sectionHeader}} section", + "submission.sections.toggle.aria.open": "Laajenna {{sectionHeader}}-osio", + + // "submission.sections.toggle.aria.close": "Collapse {{sectionHeader}} section", + "submission.sections.toggle.aria.close": "Sulje {{sectionHeader}}-osio", // "submission.sections.upload.delete.confirm.cancel": "Cancel", "submission.sections.upload.delete.confirm.cancel": "Peruuta", // "submission.sections.upload.delete.confirm.info": "This operation can't be undone. Are you sure?", - "submission.sections.upload.delete.confirm.info": "Tätä toimintoa ei voi peruuttaa. Oletko varma?", + "submission.sections.upload.delete.confirm.info": "Tätä toimintoa ei voi perua. Oletko varma?", // "submission.sections.upload.delete.confirm.submit": "Yes, I'm sure", "submission.sections.upload.delete.confirm.submit": "Kyllä, olen varma", @@ -4882,18 +6598,36 @@ // "submission.sections.upload.delete.submit": "Delete", "submission.sections.upload.delete.submit": "Poista", + // "submission.sections.upload.download.title": "Download bitstream", + "submission.sections.upload.download.title": "Lataa tiedosto", + // "submission.sections.upload.drop-message": "Drop files to attach them to the item", "submission.sections.upload.drop-message": "Pudota tiedostot liittääksesi ne tietueeseen", + // "submission.sections.upload.edit.title": "Edit bitstream", + "submission.sections.upload.edit.title": "Muokkaa tiedostoa", + // "submission.sections.upload.form.access-condition-label": "Access condition type", "submission.sections.upload.form.access-condition-label": "Pääsyoikeustyyppi", + // "submission.sections.upload.form.access-condition-hint": "Select an access condition to apply on the bitstream once the item is deposited", + "submission.sections.upload.form.access-condition-hint": "Valitse pääsyoikeus, jota sovelletaan tiedostoon tietueen tallentamisen jälkeen", + // "submission.sections.upload.form.date-required": "Date is required.", "submission.sections.upload.form.date-required": "Päivämäärä on pakollinen tieto.", + // "submission.sections.upload.form.date-required-from": "Grant access from date is required.", + "submission.sections.upload.form.date-required-from": "Pääsyoikeuden alkupäivä on pakollinen tieto.", + + // "submission.sections.upload.form.date-required-until": "Grant access until date is required.", + "submission.sections.upload.form.date-required-until": "Pääsyoikeuden loppupäivä on pakollinen tieto.", + // "submission.sections.upload.form.from-label": "Grant access from", "submission.sections.upload.form.from-label": "Pääsyoikeus alkaa", + // "submission.sections.upload.form.from-hint": "Select the date from which the related access condition is applied", + "submission.sections.upload.form.from-hint": "Valitse päivämäärä josta lukien pääsyoikeutta sovelletaan", + // "submission.sections.upload.form.from-placeholder": "From", "submission.sections.upload.form.from-placeholder": "Alkaen", @@ -4906,6 +6640,9 @@ // "submission.sections.upload.form.until-label": "Grant access until", "submission.sections.upload.form.until-label": "Pääsyoikeus päättyy", + // "submission.sections.upload.form.until-hint": "Select the date until which the related access condition is applied", + "submission.sections.upload.form.until-hint": "Valitse päivämäärä, johon asti pääsyoikeus on voimassa", + // "submission.sections.upload.form.until-placeholder": "Until", "submission.sections.upload.form.until-placeholder": "Asti", @@ -4915,7 +6652,7 @@ // "submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):", "submission.sections.upload.header.policy.default.withlist": "Yksittäisten tiedostojen pääsyrajoitusten lisäksi {{collectionName}}-kokoelmaan ladatut tiedostot ovat seuraavien ryhmien saatavilla:", - // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files just dragging & dropping them everywhere in the page", + // "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the file metadata and access conditions or upload additional files by dragging & dropping them anywhere on the page.", "submission.sections.upload.info": "Tietueen kaikki tiedostot on lueteltu tässä. Voit päivittää tiedoston metadataa ja pääsyehtoja tai ladata lisää tiedostoja raahaamalla ne mihin hyvänsä sivun kohtaan.", // "submission.sections.upload.no-entry": "No", @@ -4936,18 +6673,149 @@ // "submission.sections.upload.upload-successful": "Upload successful", "submission.sections.upload.upload-successful": "Lataus valmis", + // "submission.sections.accesses.form.discoverable-description": "When checked, this item will be discoverable in search/browse. When unchecked, the item will only be available via a direct link and will never appear in search/browse.", + "submission.sections.accesses.form.discoverable-description": "Kun tämä on valittu, tietue on löydettävissä haussa ja selailtaessa. Kun tätä ei ole valittu, tietue on saatavilla vain suoran linkin kautta, eikä se näy haussa tai selailtaessa.", + // "submission.sections.accesses.form.discoverable-label": "Discoverable", + "submission.sections.accesses.form.discoverable-label": "Löydettävissä", - // "submission.submit.title": "Tallennus", - "submission.submit.title": "Julkaisu", + // "submission.sections.accesses.form.access-condition-label": "Access condition type", + "submission.sections.accesses.form.access-condition-label": "Pääsyoikeustyyppi", + // "submission.sections.accesses.form.access-condition-hint": "Select an access condition to apply on the item once it is deposited", + "submission.sections.accesses.form.access-condition-hint": "Valitse pääsyoikeus, jota sovelletaan tietueeseen tallentamisen jälkeen", + // "submission.sections.accesses.form.date-required": "Date is required.", + "submission.sections.accesses.form.date-required": "Päivämäärä on pakollinen tieto.", + + // "submission.sections.accesses.form.date-required-from": "Grant access from date is required.", + "submission.sections.accesses.form.date-required-from": "Pääsyoikeuden alkupäivä on pakollinen tieto.", + + // "submission.sections.accesses.form.date-required-until": "Grant access until date is required.", + "submission.sections.accesses.form.date-required-until": "Pääsyoikeuden loppupäivä on pakollinen tieto.", + + // "submission.sections.accesses.form.from-label": "Grant access from", + "submission.sections.accesses.form.from-label": "Pääsyoikeus alkaa", + + // "submission.sections.accesses.form.from-hint": "Select the date from which the related access condition is applied", + "submission.sections.accesses.form.from-hint": "Valitse päivämäärä, josta alkaen pääsyoikeutta sovelletaan", + + // "submission.sections.accesses.form.from-placeholder": "From", + "submission.sections.accesses.form.from-placeholder": "Alkaen", + + // "submission.sections.accesses.form.group-label": "Group", + "submission.sections.accesses.form.group-label": "Ryhmä", + + // "submission.sections.accesses.form.group-required": "Group is required.", + "submission.sections.accesses.form.group-required": "Ryhmä on pakollinen tieto.", + + // "submission.sections.accesses.form.until-label": "Grant access until", + "submission.sections.accesses.form.until-label": "Pääsyoikeus päättyy", + + // "submission.sections.accesses.form.until-hint": "Select the date until which the related access condition is applied", + "submission.sections.accesses.form.until-hint": "Valitse päivämäärä, johon asti pääsyoikeutta sovelletaan", + + // "submission.sections.accesses.form.until-placeholder": "Until", + "submission.sections.accesses.form.until-placeholder": "Asti", + + // "submission.sections.license.granted-label": "I confirm the license above", + "submission.sections.license.granted-label": "Vahvistan edellä olevan lisenssin", + + // "submission.sections.license.required": "You must accept the license", + "submission.sections.license.required": "Sinun on hyväksyttävä lisenssi", + + // "submission.sections.license.notgranted": "You must accept the license", + "submission.sections.license.notgranted": "Sinun on hyväksyttävä lisenssi", + + // "submission.sections.sherpa.publication.information": "Publication information", + "submission.sections.sherpa.publication.information": "Julkaisun tiedot", + + // "submission.sections.sherpa.publication.information.title": "Title", + "submission.sections.sherpa.publication.information.title": "Nimeke", + + // "submission.sections.sherpa.publication.information.issns": "ISSNs", + "submission.sections.sherpa.publication.information.issns": "ISSN-tunnukset", + + // "submission.sections.sherpa.publication.information.url": "URL", + "submission.sections.sherpa.publication.information.url": "URL", + + // "submission.sections.sherpa.publication.information.publishers": "Publisher", + "submission.sections.sherpa.publication.information.publishers": "Julkaisija", + + // "submission.sections.sherpa.publication.information.romeoPub": "Romeo Pub", + "submission.sections.sherpa.publication.information.romeoPub": "Romeo Pub", + + // "submission.sections.sherpa.publication.information.zetoPub": "Zeto Pub", + "submission.sections.sherpa.publication.information.zetoPub": "Zeto Pub", + + // "submission.sections.sherpa.publisher.policy": "Publisher Policy", + "submission.sections.sherpa.publisher.policy": "Julkaisukäytännöt", + + // "submission.sections.sherpa.publisher.policy.description": "The below information was found via Sherpa Romeo. Based on the policies of your publisher, it provides advice regarding whether an embargo may be necessary and/or which files you are allowed to upload. If you have questions, please contact your site administrator via the feedback form in the footer.", + "submission.sections.sherpa.publisher.policy.description": "Alla olevat tiedot on noudettu Sherpa Romeosta. Julkaisijan käytännöt määrittävät, vaaditaanko embargoa ja mitkä tiedostoista ovat ladattavissa. Jos sinulla on kysyttävää, ota yhteyttä ylläpitäjään.", + + // "submission.sections.sherpa.publisher.policy.openaccess": "Open Access pathways permitted by this journal's policy are listed below by article version. Click on a pathway for a more detailed view", + "submission.sections.sherpa.publisher.policy.openaccess": "Tämän kausijulkaisun käytäntöjen sallimat Open Access -reitit on lueteltu alla artikkeliversioittain. Napsauttamalla polkua saat yksityiskohtaisempia tietoja", + + // "submission.sections.sherpa.publisher.policy.more.information": "For more information, please see the following links:", + "submission.sections.sherpa.publisher.policy.more.information": "Lisätietoa saat seuraavista linkeistä:", + + // "submission.sections.sherpa.publisher.policy.version": "Version", + "submission.sections.sherpa.publisher.policy.version": "Versio", + + // "submission.sections.sherpa.publisher.policy.embargo": "Embargo", + "submission.sections.sherpa.publisher.policy.embargo": "Embargo", + + // "submission.sections.sherpa.publisher.policy.noembargo": "No Embargo", + "submission.sections.sherpa.publisher.policy.noembargo": "Ei embargoa", + + // "submission.sections.sherpa.publisher.policy.nolocation": "None", + "submission.sections.sherpa.publisher.policy.nolocation": "Ei mitään", + + // "submission.sections.sherpa.publisher.policy.license": "License", + "submission.sections.sherpa.publisher.policy.license": "Lisenssi", + + // "submission.sections.sherpa.publisher.policy.prerequisites": "Prerequisites", + "submission.sections.sherpa.publisher.policy.prerequisites": "Vaatimukset", + + // "submission.sections.sherpa.publisher.policy.location": "Location", + "submission.sections.sherpa.publisher.policy.location": "Sijainti", + + // "submission.sections.sherpa.publisher.policy.conditions": "Conditions", + "submission.sections.sherpa.publisher.policy.conditions": "Ehdot", + + // "submission.sections.sherpa.publisher.policy.refresh": "Refresh", + "submission.sections.sherpa.publisher.policy.refresh": "Päivitä", + + // "submission.sections.sherpa.record.information": "Record Information", + "submission.sections.sherpa.record.information": "Tietueen tiedot", + + // "submission.sections.sherpa.record.information.id": "ID", + "submission.sections.sherpa.record.information.id": "ID", + + // "submission.sections.sherpa.record.information.date.created": "Date Created", + "submission.sections.sherpa.record.information.date.created": "Luontipäivä", + + // "submission.sections.sherpa.record.information.date.modified": "Last Modified", + "submission.sections.sherpa.record.information.date.modified": "Viimeksi muokattu", + + // "submission.sections.sherpa.record.information.uri": "URI", + "submission.sections.sherpa.record.information.uri": "URI", + + // "submission.sections.sherpa.error.message": "There was an error retrieving sherpa informations", + "submission.sections.sherpa.error.message": "Virhe haettaessa Sherpa-tietoja", + + // "submission.submit.breadcrumbs": "New submission", + "submission.submit.breadcrumbs": "Uusi tallennus", + + // "submission.submit.title": "New submission", + "submission.submit.title": "Uusi tallennus", // "submission.workflow.generic.delete": "Delete", "submission.workflow.generic.delete": "Poista", - // "submission.workflow.generic.delete-help": "If you would to discard this item, select \"Delete\". You will then be asked to confirm it.", - "submission.workflow.generic.delete-help": "Valitse \"Poista\" hylätäksesi tietueen. Poisto pyydetään vielä vahvistamaan.", + // "submission.workflow.generic.delete-help": "Select this option to discard this item. You will then be asked to confirm it.", + "submission.workflow.generic.delete-help": "Valitse hylätäksesi tietueen. Poisto pyydetään vielä vahvistamaan.", // "submission.workflow.generic.edit": "Edit", "submission.workflow.generic.edit": "Muokkaa", @@ -4961,7 +6829,17 @@ // "submission.workflow.generic.view-help": "Select this option to view the item's metadata.", "submission.workflow.generic.view-help": "Valitse tämä katsoaksesi tietueen metadataa.", + // "submission.workflow.generic.submit_select_reviewer": "Select Reviewer", + "submission.workflow.generic.submit_select_reviewer": "Valitse tarkastaja", + // "submission.workflow.generic.submit_select_reviewer-help": "", + "submission.workflow.generic.submit_select_reviewer-help": "", + + // "submission.workflow.generic.submit_score": "Rate", + "submission.workflow.generic.submit_score": "Arvioi", + + // "submission.workflow.generic.submit_score-help": "", + "submission.workflow.generic.submit_score-help": "", // "submission.workflow.tasks.claimed.approve": "Approve", "submission.workflow.tasks.claimed.approve": "Hyväksy", @@ -4975,6 +6853,12 @@ // "submission.workflow.tasks.claimed.edit_help": "Select this option to change the item's metadata.", "submission.workflow.tasks.claimed.edit_help": "Valitse tämä muuttaaksesi tietueen metadataa.", + // "submission.workflow.tasks.claimed.decline": "Decline", + "submission.workflow.tasks.claimed.decline": "Hylkää", + + // "submission.workflow.tasks.claimed.decline_help": "", + "submission.workflow.tasks.claimed.decline_help": "", + // "submission.workflow.tasks.claimed.reject.reason.info": "Please enter your reason for rejecting the submission into the box below, indicating whether the submitter may fix a problem and resubmit.", "submission.workflow.tasks.claimed.reject.reason.info": "Syötä kenttään syy tallennuksen hylkäämiselle. Kerro myös, voiko tallentaja korjata ongelman ja lähettää aineiston uudelleen.", @@ -4999,8 +6883,6 @@ // "submission.workflow.tasks.claimed.return_help": "Return the task to the pool so that another user may perform the task.", "submission.workflow.tasks.claimed.return_help": "Palauta tehtävä tehtäväjonoon, jotta toinen käyttäjä voi suorittaa tehtävän.", - - // "submission.workflow.tasks.generic.error": "Error occurred during operation...", "submission.workflow.tasks.generic.error": "Virhe toimintoa suoritettaessa...", @@ -5013,8 +6895,6 @@ // "submission.workflow.tasks.generic.success": "Operation successful", "submission.workflow.tasks.generic.success": "Toiminto onnistui", - - // "submission.workflow.tasks.pool.claim": "Claim", "submission.workflow.tasks.pool.claim": "Ota itsellesi", @@ -5027,13 +6907,147 @@ // "submission.workflow.tasks.pool.show-detail": "Show detail", "submission.workflow.tasks.pool.show-detail": "Näytä lisätiedot", + // "submission.workspace.generic.view": "View", + "submission.workspace.generic.view": "Näytå", + // "submission.workspace.generic.view-help": "Select this option to view the item's metadata.", + "submission.workspace.generic.view-help": "Valitse tarkastellaksesi tietueen metadataa.", + + // "submitter.empty": "N/A", + "submitter.empty": "Ei saatavilla", + + // "subscriptions.title": "Subscriptions", + "subscriptions.title": "Tilaukset", + + // "subscriptions.item": "Subscriptions for items", + "subscriptions.item": "Tietueiden tilaukset", + + // "subscriptions.collection": "Subscriptions for collections", + "subscriptions.collection": "Kokoelmien tilaukset", + + // "subscriptions.community": "Subscriptions for communities", + "subscriptions.community": "Yhteisöjen tilaukset", + + // "subscriptions.subscription_type": "Subscription type", + "subscriptions.subscription_type": "Tilaustyyppi", + + // "subscriptions.frequency": "Subscription frequency", + "subscriptions.frequency": "Tilaustiheys", + + // "subscriptions.frequency.D": "Daily", + "subscriptions.frequency.D": "Päivittäin", + + // "subscriptions.frequency.M": "Monthly", + "subscriptions.frequency.M": "Kuukausittain", + + // "subscriptions.frequency.W": "Weekly", + "subscriptions.frequency.W": "Viikoittain", + + // "subscriptions.tooltip": "Subscribe", + "subscriptions.tooltip": "Tilaa", + + // "subscriptions.modal.title": "Subscriptions", + "subscriptions.modal.title": "Tilaukset", + + // "subscriptions.modal.type-frequency": "Type and frequency", + "subscriptions.modal.type-frequency": "Tyyppi ja tiheys", + + // "subscriptions.modal.close": "Close", + "subscriptions.modal.close": "Sulje", + + // "subscriptions.modal.delete-info": "To remove this subscription, please visit the \"Subscriptions\" page under your user profile", + "subscriptions.modal.delete-info": "Voit poistaa tilauksen käyttäjäprofiilisi \"Tilaukset\"-sivulla ", + + // "subscriptions.modal.new-subscription-form.type.content": "Content", + "subscriptions.modal.new-subscription-form.type.content": "Sisältö", + + // "subscriptions.modal.new-subscription-form.frequency.D": "Daily", + "subscriptions.modal.new-subscription-form.frequency.D": "Päivittäin", + + // "subscriptions.modal.new-subscription-form.frequency.W": "Weekly", + "subscriptions.modal.new-subscription-form.frequency.W": "Viikottain", + + // "subscriptions.modal.new-subscription-form.frequency.M": "Monthly", + "subscriptions.modal.new-subscription-form.frequency.M": "Kuukausittain", + + // "subscriptions.modal.new-subscription-form.submit": "Submit", + "subscriptions.modal.new-subscription-form.submit": "Lähetä", + + // "subscriptions.modal.new-subscription-form.processing": "Processing...", + "subscriptions.modal.new-subscription-form.processing": "Käsitellään...", + + // "subscriptions.modal.create.success": "Subscribed to {{ type }} successfully.", + "subscriptions.modal.create.success": "Tilaus {{ type }} onnistui.", + + // "subscriptions.modal.delete.success": "Subscription deleted successfully", + "subscriptions.modal.delete.success": "Tilaus poistettu", + + // "subscriptions.modal.update.success": "Subscription to {{ type }} updated successfully", + "subscriptions.modal.update.success": "Tilaus {{ type }} päivitetty", + + // "subscriptions.modal.create.error": "An error occurs during the subscription creation", + "subscriptions.modal.create.error": "Virhe tilausta luotaessa", + + // "subscriptions.modal.delete.error": "An error occurs during the subscription delete", + "subscriptions.modal.delete.error": "Virhe tilausta poistettaessa", + + // "subscriptions.modal.update.error": "An error occurs during the subscription update", + "subscriptions.modal.update.error": "Virhe tilausta päivitettäessä", + + // "subscriptions.table.dso": "Subject", + "subscriptions.table.dso": "Asiasana", + + // "subscriptions.table.subscription_type": "Subscription Type", + "subscriptions.table.subscription_type": "Tilaustyyppi", + + // "subscriptions.table.subscription_frequency": "Subscription Frequency", + "subscriptions.table.subscription_frequency": "Tilaustiheys", + + // "subscriptions.table.action": "Action", + "subscriptions.table.action": "Toiminto", + + // "subscriptions.table.edit": "Edit", + "subscriptions.table.edit": "Muokkaa", + + // "subscriptions.table.delete": "Delete", + "subscriptions.table.delete": "Poista", + + // "subscriptions.table.not-available": "Not available", + "subscriptions.table.not-available": "Ei saatavilla", + + // "subscriptions.table.not-available-message": "The subscribed item has been deleted, or you don't currently have the permission to view it", + "subscriptions.table.not-available-message": "Tilattu tietue on poistettu, tai sinulla ei ole oikeuksia nähdä sitä", + + // "subscriptions.table.empty.message": "You do not have any subscriptions at this time. To subscribe to email updates for a Community or Collection, use the subscription button on the object's page.", + "subscriptions.table.empty.message": "Sinulla ei tällä hetkellä ole tilauksia. Voit tilata yhteisön tai kokoelman sähköposti-ilmoitukset kohteen sivulla olevalla tilauspainikkeella.", + + // "thumbnail.default.alt": "Thumbnail Image", + "thumbnail.default.alt": "Pienoiskuva", + + // "thumbnail.default.placeholder": "No Thumbnail Available", + "thumbnail.default.placeholder": "Ei pienoiskuvaa saatavilla", + + // "thumbnail.project.alt": "Project Logo", + "thumbnail.project.alt": "Projektin logo", + + // "thumbnail.project.placeholder": "Project Placeholder Image", + "thumbnail.project.placeholder": "Projektin paikkamerkin kuva", + + // "thumbnail.orgunit.alt": "OrgUnit Logo", + "thumbnail.orgunit.alt": "Organisaatioykiskön logo", + + // "thumbnail.orgunit.placeholder": "OrgUnit Placeholder Image", + "thumbnail.orgunit.placeholder": "Organisaatioyksikön paikkamerkin kuva", + + // "thumbnail.person.alt": "Profile Picture", + "thumbnail.person.alt": "Profiilikuva", + + // "thumbnail.person.placeholder": "No Profile Picture Available", + "thumbnail.person.placeholder": "Ei profiilikuva saatavilla", // "title": "DSpace", "title": "Julkaisuarkisto", - - // "vocabulary-treeview.header": "Hierarchical tree view", "vocabulary-treeview.header": "Hierarkkinen puunäkymä", @@ -5055,7 +7069,8 @@ // "vocabulary-treeview.tree.description.srsc": "Research Subject Categories", "vocabulary-treeview.tree.description.srsc": "Tutkimusaiheiden kategoriat", - + // "vocabulary-treeview.info": "Select a subject to add as search filter", + "vocabulary-treeview.info": "Valitse asiasana hakusuodattimeksi", // "uploader.browse": "browse", "uploader.browse": "selaa", @@ -5063,6 +7078,9 @@ // "uploader.drag-message": "Drag & Drop your files here", "uploader.drag-message": "Raahaa tiedostot tähän", + // "uploader.delete.btn-title": "Delete", + "uploader.delete.btn-title": "Poista", + // "uploader.or": ", or ", "uploader.or": " tai", @@ -5081,30 +7099,44 @@ // "virtual-metadata.delete-relationship.modal-head": "Select the items for which you want to save the virtual metadata as real metadata", "virtual-metadata.delete-relationship.modal-head": "Valitse tietueet, joiden virtuaalisen metadatan haluat tallentaa varsinaiseksi metadataksi", + // "supervisedWorkspace.search.results.head": "Supervised Items", + "supervisedWorkspace.search.results.head": "Valvotut tietueet", + // "workspace.search.results.head": "Your submissions", + "workspace.search.results.head": "Tallennuksesi", // "workflowAdmin.search.results.head": "Administer Workflow", "workflowAdmin.search.results.head": "Hallinnoi työnkulkua", + // "workflow.search.results.head": "Workflow tasks", + "workflow.search.results.head": "Työnkulun tehtävät", + // "supervision.search.results.head": "Workflow and Workspace tasks", + "supervision.search.results.head": "Työnkulun ja työtilan tehtävät", + + // "workflow-item.edit.breadcrumbs": "Edit workflowitem", + "workflow-item.edit.breadcrumbs": "Muokkaa työnkulun tietuetta", + + // "workflow-item.edit.title": "Edit workflowitem", + "workflow-item.edit.title": "Muokkaa työnkulun tietuetta", // "workflow-item.delete.notification.success.title": "Deleted", "workflow-item.delete.notification.success.title": "Poistettu", // "workflow-item.delete.notification.success.content": "This workflow item was successfully deleted", - "workflow-item.delete.notification.success.content": "Tarkastamaton tietue poistettu", + "workflow-item.delete.notification.success.content": "Työnkulun tietue poistettu", // "workflow-item.delete.notification.error.title": "Something went wrong", "workflow-item.delete.notification.error.title": "Tapahtui virhe", // "workflow-item.delete.notification.error.content": "The workflow item could not be deleted", - "workflow-item.delete.notification.error.content": "Tarkastamatonta tietuetta ei voitu poistaa", + "workflow-item.delete.notification.error.content": "Työnkulun tietuetta ei voitu poistaa", // "workflow-item.delete.title": "Delete workflow item", - "workflow-item.delete.title": "Poista tarkastamaton tietue", + "workflow-item.delete.title": "Poista työnkulkuun tietue", // "workflow-item.delete.header": "Delete workflow item", - "workflow-item.delete.header": "Poista tarkastamaton tietue", + "workflow-item.delete.header": "Poista työnkulkuun tietue", // "workflow-item.delete.button.cancel": "Cancel", "workflow-item.delete.button.cancel": "Peruuta", @@ -5112,30 +7144,566 @@ // "workflow-item.delete.button.confirm": "Delete", "workflow-item.delete.button.confirm": "Poista", - // "workflow-item.send-back.notification.success.title": "Sent back to submitter", "workflow-item.send-back.notification.success.title": "Lähetetty takaisin tallentajalle", // "workflow-item.send-back.notification.success.content": "This workflow item was successfully sent back to the submitter", - "workflow-item.send-back.notification.success.content": "Tarkastamaton tietue lähetetty takaisin tallentajalle", + "workflow-item.send-back.notification.success.content": "Työnkulun tietue lähetetty takaisin tallentajalle", // "workflow-item.send-back.notification.error.title": "Something went wrong", "workflow-item.send-back.notification.error.title": "Tapahtui virhe", // "workflow-item.send-back.notification.error.content": "The workflow item could not be sent back to the submitter", - "workflow-item.send-back.notification.error.content": "Tarkastamatonta tietuetta ei voitu lähettää takaisin tallentajalle", + "workflow-item.send-back.notification.error.content": "Työnkulun tietuetta ei voitu lähettää takaisin tallentajalle", // "workflow-item.send-back.title": "Send workflow item back to submitter", - "workflow-item.send-back.title": "Lähetä tarkastamaton tietue takaisin tallentajalle", + "workflow-item.send-back.title": "Lähetä työnkulkuun tietue takaisin tallentajalle", // "workflow-item.send-back.header": "Send workflow item back to submitter", - "workflow-item.send-back.header": "Lähetä tarkastamaton tietue takaisin tallentajalle", + "workflow-item.send-back.header": "Lähetä työnkulun tietue takaisin tallentajalle", // "workflow-item.send-back.button.cancel": "Cancel", "workflow-item.send-back.button.cancel": "Peruuta", - // "workflow-item.send-back.button.confirm": "Send back" + // "workflow-item.send-back.button.confirm": "Send back", "workflow-item.send-back.button.confirm": "Lähetä takaisin", + // "workflow-item.view.breadcrumbs": "Workflow View", + "workflow-item.view.breadcrumbs": "Työnkulkunäkymä", -} + // "workspace-item.view.breadcrumbs": "Workspace View", + "workspace-item.view.breadcrumbs": "Työnkulkunäkymä", + + // "workspace-item.view.title": "Workspace View", + "workspace-item.view.title": "Työnkulkunäkymä", + + // "workspace-item.delete.breadcrumbs": "Workspace Delete", + "workspace-item.delete.breadcrumbs": "Työnkulku - poisto", + + // "workspace-item.delete.header": "Delete workspace item", + "workspace-item.delete.header": "Poista työnkulun tietue", + + // "workspace-item.delete.button.confirm": "Delete", + "workspace-item.delete.button.confirm": "Poista", + + // "workspace-item.delete.button.cancel": "Cancel", + "workspace-item.delete.button.cancel": "Peruuta", + + // "workspace-item.delete.notification.success.title": "Deleted", + "workspace-item.delete.notification.success.title": "Poistettu", + + // "workspace-item.delete.title": "This workspace item was successfully deleted", + "workspace-item.delete.title": "Työnkulun tietue poistettu", + + // "workspace-item.delete.notification.error.title": "Something went wrong", + "workspace-item.delete.notification.error.title": "Tapahtui virhe", + + // "workspace-item.delete.notification.error.content": "The workspace item could not be deleted", + "workspace-item.delete.notification.error.content": "Työnkulun tietuetta ei voitu poistaa", + + // "workflow-item.advanced.title": "Advanced workflow", + "workflow-item.advanced.title": "Laajennettu työnkulku", + + // "workflow-item.selectrevieweraction.notification.success.title": "Selected reviewer", + "workflow-item.selectrevieweraction.notification.success.title": "Valittu tarkastaja", + + // "workflow-item.selectrevieweraction.notification.success.content": "The reviewer for this workflow item has been successfully selected", + "workflow-item.selectrevieweraction.notification.success.content": "Työnkulun tarkastaja on valittu", + + // "workflow-item.selectrevieweraction.notification.error.title": "Something went wrong", + "workflow-item.selectrevieweraction.notification.error.title": "Tapahtui virhe", + + // "workflow-item.selectrevieweraction.notification.error.content": "Couldn't select the reviewer for this workflow item", + "workflow-item.selectrevieweraction.notification.error.content": "Työnkulun tietueelle ei voitu valita tarkastajaa", + + // "workflow-item.selectrevieweraction.title": "Select Reviewer", + "workflow-item.selectrevieweraction.title": "Valitse tarkastaja", + + // "workflow-item.selectrevieweraction.header": "Select Reviewer", + "workflow-item.selectrevieweraction.header": "Valitse tarkastaja", + + // "workflow-item.selectrevieweraction.button.cancel": "Cancel", + "workflow-item.selectrevieweraction.button.cancel": "Peruuta", + + // "workflow-item.selectrevieweraction.button.confirm": "Confirm", + "workflow-item.selectrevieweraction.button.confirm": "Vahvista", + + // "workflow-item.scorereviewaction.notification.success.title": "Rating review", + "workflow-item.scorereviewaction.notification.success.title": "Arviointikatselmus", + + // "workflow-item.scorereviewaction.notification.success.content": "The rating for this item workflow item has been successfully submitted", + "workflow-item.scorereviewaction.notification.success.content": "Tietueen arviointi on lähetetty", + + // "workflow-item.scorereviewaction.notification.error.title": "Something went wrong", + "workflow-item.scorereviewaction.notification.error.title": "Tapahtui virhe", + + // "workflow-item.scorereviewaction.notification.error.content": "Couldn't rate this item", + "workflow-item.scorereviewaction.notification.error.content": "Tietueen arviointi epäonnistui", + + // "workflow-item.scorereviewaction.title": "Rate this item", + "workflow-item.scorereviewaction.title": "Arvioi tietue", + + // "workflow-item.scorereviewaction.header": "Rate this item", + "workflow-item.scorereviewaction.header": "Arvioi tietue", + + // "workflow-item.scorereviewaction.button.cancel": "Cancel", + "workflow-item.scorereviewaction.button.cancel": "Peruuta", + + // "workflow-item.scorereviewaction.button.confirm": "Confirm", + "workflow-item.scorereviewaction.button.confirm": "Vahvista", + + // "idle-modal.header": "Session will expire soon", + "idle-modal.header": "Istunto vanhenee pian", + + // "idle-modal.info": "For security reasons, user sessions expire after {{ timeToExpire }} minutes of inactivity. Your session will expire soon. Would you like to extend it or log out?", + "idle-modal.info": "Turvallisuussyistä käyttäjän istunto vanhenee, kun käyttäjä on ollut epäaktiivinen {{ timeToExpire }} minuuttia. Istuntosi vanhenee pian. Haluatko pidentää istuntoasi vai kirjautua ulos?", + + // "idle-modal.log-out": "Log out", + "idle-modal.log-out": "Kirjaudu ulos", + + // "idle-modal.extend-session": "Extend session", + "idle-modal.extend-session": "Pidennä istuntoa", + + // "researcher.profile.action.processing": "Processing...", + "researcher.profile.action.processing": "Käsitellään...", + + // "researcher.profile.associated": "Researcher profile associated", + "researcher.profile.associated": "Tutkijaprofiili liitetty", + + // "researcher.profile.change-visibility.fail": "An unexpected error occurs while changing the profile visibility", + "researcher.profile.change-visibility.fail": "Odottamaton virhe muutettaessa profiilin näkyvyyttä", + + // "researcher.profile.create.new": "Create new", + "researcher.profile.create.new": "Luo uusi", + + // "researcher.profile.create.success": "Researcher profile created successfully", + "researcher.profile.create.success": "Tutkijaprofiili luotu", + + // "researcher.profile.create.fail": "An error occurs during the researcher profile creation", + "researcher.profile.create.fail": "Virhe luotaessa tutkijaprofiilia", + + // "researcher.profile.delete": "Delete", + "researcher.profile.delete": "Poista", + + // "researcher.profile.expose": "Expose", + "researcher.profile.expose": "Paljasta", + + // "researcher.profile.hide": "Hide", + "researcher.profile.hide": "Piilota", + + // "researcher.profile.not.associated": "Researcher profile not yet associated", + "researcher.profile.not.associated": "Tutkijaprofiilia ei ole vielä liitetty", + + // "researcher.profile.view": "View", + "researcher.profile.view": "Näytä", + + // "researcher.profile.private.visibility": "PRIVATE", + "researcher.profile.private.visibility": "YKSITYINEN", + + // "researcher.profile.public.visibility": "PUBLIC", + "researcher.profile.public.visibility": "JULKINEN", + + // "researcher.profile.status": "Status:", + "researcher.profile.status": "Tila :", + + // "researcherprofile.claim.not-authorized": "You are not authorized to claim this item. For more details contact the administrator(s).", + "researcherprofile.claim.not-authorized": "Sinulla ei ole valtuuksia ottaa itsellesi tätä tietuetta. Lisätietoa saat ylläpitäjiltä.", + + // "researcherprofile.error.claim.body": "An error occurred while claiming the profile, please try again later", + "researcherprofile.error.claim.body": "Tapahtui virhe profiilia haettaessa, yritä myöhemmin uudelleen", + + // "researcherprofile.error.claim.title": "Error", + "researcherprofile.error.claim.title": "Virhe", + + // "researcherprofile.success.claim.body": "Profile claimed with success", + "researcherprofile.success.claim.body": "Profiili haettu", + + // "researcherprofile.success.claim.title": "Success", + "researcherprofile.success.claim.title": "Valmis", + + // "person.page.orcid.create": "Create an ORCID ID", + "person.page.orcid.create": "Luo ORCID-tunniste", + + // "person.page.orcid.granted-authorizations": "Granted authorizations", + "person.page.orcid.granted-authorizations": "Myönnetyt valtuudet", + + // "person.page.orcid.grant-authorizations": "Grant authorizations", + "person.page.orcid.grant-authorizations": "Myönnä valtuuksia", + + // "person.page.orcid.link": "Connect to ORCID ID", + "person.page.orcid.link": "Yhdistä ORCID-tunniste", + + // "person.page.orcid.link.processing": "Linking profile to ORCID...", + "person.page.orcid.link.processing": "Liitetään profiilia ORCID-tunnisteeseen...", + + // "person.page.orcid.link.error.message": "Something went wrong while connecting the profile with ORCID. If the problem persists, contact the administrator.", + "person.page.orcid.link.error.message": "Virhe yhdistettäessä profiilia ORCID-tunnisteeseen. Jos virhe jatkuu, ota yhteyttä ylläpitäjään.", + + // "person.page.orcid.orcid-not-linked-message": "The ORCID iD of this profile ({{ orcid }}) has not yet been connected to an account on the ORCID registry or the connection is expired.", + "person.page.orcid.orcid-not-linked-message": "Tämän profiilin ORCID-tunnistetta ({{ orcid }}) ei ole vielä yhdistetty tiliin ORCID-rekisterissä tai yhteys on vanhentunut.", + + // "person.page.orcid.unlink": "Disconnect from ORCID", + "person.page.orcid.unlink": "Katkaise yhteys ORCIDiin", + + // "person.page.orcid.unlink.processing": "Processing...", + "person.page.orcid.unlink.processing": "Käsitellään...", + + // "person.page.orcid.missing-authorizations": "Missing authorizations", + "person.page.orcid.missing-authorizations": "Puuttuvia valtuuksia", + + // "person.page.orcid.missing-authorizations-message": "The following authorizations are missing:", + "person.page.orcid.missing-authorizations-message": "Seuraavat valtuudet puuttuvat:", + + // "person.page.orcid.no-missing-authorizations-message": "Great! This box is empty, so you have granted all access rights to use all functions offers by your institution.", + "person.page.orcid.no-missing-authorizations-message": "Hyvä! Tämä laatikko on tyhjä, joten olet myöntänyt kaikki käyttöoikeudet instituutiosi tarjoamiin toimintoihin.", + + // "person.page.orcid.no-orcid-message": "No ORCID iD associated yet. By clicking on the button below it is possible to link this profile with an ORCID account.", + "person.page.orcid.no-orcid-message": "ORCID-tunnistetta ei ole vielä liitetty. Painamalla alapuolella olevaa painiketta voit yhdistää tämän profiilin ORCID-tiliin.", + + // "person.page.orcid.profile-preferences": "Profile preferences", + "person.page.orcid.profile-preferences": "Profiiliasetukset", + + // "person.page.orcid.funding-preferences": "Funding preferences", + "person.page.orcid.funding-preferences": "Rahoitusasetukset", + + // "person.page.orcid.publications-preferences": "Publication preferences", + "person.page.orcid.publications-preferences": "Julkaisuasetukset", + + // "person.page.orcid.remove-orcid-message": "If you need to remove your ORCID, please contact the repository administrator", + "person.page.orcid.remove-orcid-message": "Jos haluat poistaa ORCID-tunnuksesi, ota yhteyttä julkaisuarkiston ylläpitäjään", + + // "person.page.orcid.save.preference.changes": "Update settings", + "person.page.orcid.save.preference.changes": "Muokkaa asetuksia", + + // "person.page.orcid.sync-profile.affiliation": "Affiliation", + "person.page.orcid.sync-profile.affiliation": "Affiliaatio", + + // "person.page.orcid.sync-profile.biographical": "Biographical data", + "person.page.orcid.sync-profile.biographical": "Elämäkerralliset tiedot", + + // "person.page.orcid.sync-profile.education": "Education", + "person.page.orcid.sync-profile.education": "Koulutus", + + // "person.page.orcid.sync-profile.identifiers": "Identifiers", + "person.page.orcid.sync-profile.identifiers": "Tunnisteet", + + // "person.page.orcid.sync-fundings.all": "All fundings", + "person.page.orcid.sync-fundings.all": "Kaikki rahoitukset", + + // "person.page.orcid.sync-fundings.mine": "My fundings", + "person.page.orcid.sync-fundings.mine": "Omat rahoitukset", + + // "person.page.orcid.sync-fundings.my_selected": "Selected fundings", + "person.page.orcid.sync-fundings.my_selected": "Valitut rahoitukset", + + // "person.page.orcid.sync-fundings.disabled": "Disabled", + "person.page.orcid.sync-fundings.disabled": "Poistettu käytöstä", + + // "person.page.orcid.sync-publications.all": "All publications", + "person.page.orcid.sync-publications.all": "Kaikki julkaisut", + + // "person.page.orcid.sync-publications.mine": "My publications", + "person.page.orcid.sync-publications.mine": "Omat julkaisut", + + // "person.page.orcid.sync-publications.my_selected": "Selected publications", + "person.page.orcid.sync-publications.my_selected": "Valitut julkaisut", + + // "person.page.orcid.sync-publications.disabled": "Disabled", + "person.page.orcid.sync-publications.disabled": "Poistettu käytöstä", + + // "person.page.orcid.sync-queue.discard": "Discard the change and do not synchronize with the ORCID registry", + "person.page.orcid.sync-queue.discard": "Hylkää muutos. Älä synkronoi ORCID-rekisterin kanssa.", + + // "person.page.orcid.sync-queue.discard.error": "The discarding of the ORCID queue record failed", + "person.page.orcid.sync-queue.discard.error": "ORCID-jonotietueen hylkääminen epäonnistui", + + // "person.page.orcid.sync-queue.discard.success": "The ORCID queue record have been discarded successfully", + "person.page.orcid.sync-queue.discard.success": "ORCID-jonotietue hylätty", + + // "person.page.orcid.sync-queue.empty-message": "The ORCID queue registry is empty", + "person.page.orcid.sync-queue.empty-message": "ORCID-jonorekisteri on tyhjä", + + // "person.page.orcid.sync-queue.table.header.type": "Type", + "person.page.orcid.sync-queue.table.header.type": "Tyyppi", + + // "person.page.orcid.sync-queue.table.header.description": "Description", + "person.page.orcid.sync-queue.table.header.description": "Kuvaus", + + // "person.page.orcid.sync-queue.table.header.action": "Action", + "person.page.orcid.sync-queue.table.header.action": "Toiminto", + + // "person.page.orcid.sync-queue.description.affiliation": "Affiliations", + "person.page.orcid.sync-queue.description.affiliation": "Affiliaatiot", + + // "person.page.orcid.sync-queue.description.country": "Country", + "person.page.orcid.sync-queue.description.country": "Maa", + + // "person.page.orcid.sync-queue.description.education": "Educations", + "person.page.orcid.sync-queue.description.education": "Koulutukset", + + // "person.page.orcid.sync-queue.description.external_ids": "External ids", + "person.page.orcid.sync-queue.description.external_ids": "Ulkoiset tunnisteet", + + // "person.page.orcid.sync-queue.description.other_names": "Other names", + "person.page.orcid.sync-queue.description.other_names": "Muut nimet", + + // "person.page.orcid.sync-queue.description.qualification": "Qualifications", + "person.page.orcid.sync-queue.description.qualification": "Pätevyydet", + + // "person.page.orcid.sync-queue.description.researcher_urls": "Researcher urls", + "person.page.orcid.sync-queue.description.researcher_urls": "Tutkijan URL-osoitteet", + + // "person.page.orcid.sync-queue.description.keywords": "Keywords", + "person.page.orcid.sync-queue.description.keywords": "Avainsanat", + + // "person.page.orcid.sync-queue.tooltip.insert": "Add a new entry in the ORCID registry", + "person.page.orcid.sync-queue.tooltip.insert": "Lisää uusi kohde ORCID-rekisteriin", + + // "person.page.orcid.sync-queue.tooltip.update": "Update this entry on the ORCID registry", + "person.page.orcid.sync-queue.tooltip.update": "Päivitä tämä kohde ORCID-rekisterissä", + + // "person.page.orcid.sync-queue.tooltip.delete": "Remove this entry from the ORCID registry", + "person.page.orcid.sync-queue.tooltip.delete": "Poista tämä kohde ORCID-rekisteristä", + + // "person.page.orcid.sync-queue.tooltip.publication": "Publication", + "person.page.orcid.sync-queue.tooltip.publication": "Julkaisu", + + // "person.page.orcid.sync-queue.tooltip.project": "Project", + "person.page.orcid.sync-queue.tooltip.project": "Projekti", + + // "person.page.orcid.sync-queue.tooltip.affiliation": "Affiliation", + "person.page.orcid.sync-queue.tooltip.affiliation": "Affiliaatio", + + // "person.page.orcid.sync-queue.tooltip.education": "Education", + "person.page.orcid.sync-queue.tooltip.education": "Koulutus", + + // "person.page.orcid.sync-queue.tooltip.qualification": "Qualification", + "person.page.orcid.sync-queue.tooltip.qualification": "Pätevyys", + + // "person.page.orcid.sync-queue.tooltip.other_names": "Other name", + "person.page.orcid.sync-queue.tooltip.other_names": "Toinen nimi", + + // "person.page.orcid.sync-queue.tooltip.country": "Country", + "person.page.orcid.sync-queue.tooltip.country": "Maa", + + // "person.page.orcid.sync-queue.tooltip.keywords": "Keyword", + "person.page.orcid.sync-queue.tooltip.keywords": "Asiasana", + + // "person.page.orcid.sync-queue.tooltip.external_ids": "External identifier", + "person.page.orcid.sync-queue.tooltip.external_ids": "Ulkoinen tunniste", + + // "person.page.orcid.sync-queue.tooltip.researcher_urls": "Researcher url", + "person.page.orcid.sync-queue.tooltip.researcher_urls": "Tutkijan URL-osoite", + + // "person.page.orcid.sync-queue.send": "Synchronize with ORCID registry", + "person.page.orcid.sync-queue.send": "Synkronoi ORCID-rekisterin kanssa", + + // "person.page.orcid.sync-queue.send.unauthorized-error.title": "The submission to ORCID failed for missing authorizations.", + "person.page.orcid.sync-queue.send.unauthorized-error.title": "ORCID-tunnisteen lähettäminen epäonnistui puuttuvien käyttöoikeuksien takia.", + + // "person.page.orcid.sync-queue.send.unauthorized-error.content": "Click here to grant again the required permissions. If the problem persists, contact the administrator", + "person.page.orcid.sync-queue.send.unauthorized-error.content": "Napsauta tästä myöntääksesi vaaditut käyttöoikeudet. Jos virhe jatkuu, ota yhteyttä ylläpitäjään.", + + // "person.page.orcid.sync-queue.send.bad-request-error": "The submission to ORCID failed because the resource sent to ORCID registry is not valid", + "person.page.orcid.sync-queue.send.bad-request-error": "ORCID-lähetys epäonnistui, koska ORCID-rekisteriin lähetetty resurssi ei ole kelvollinen", + + // "person.page.orcid.sync-queue.send.error": "The submission to ORCID failed", + "person.page.orcid.sync-queue.send.error": "ORCID-lähetys epäonnistui", + + // "person.page.orcid.sync-queue.send.conflict-error": "The submission to ORCID failed because the resource is already present on the ORCID registry", + "person.page.orcid.sync-queue.send.conflict-error": "ORCID-lähetys epäonnistui, koska lähetetty resurssi on jo ORCID-rekisterissä", + + // "person.page.orcid.sync-queue.send.not-found-warning": "The resource does not exists anymore on the ORCID registry.", + "person.page.orcid.sync-queue.send.not-found-warning": "Resurssia ei enää ole ORCID-rekisterissä..", + + // "person.page.orcid.sync-queue.send.success": "The submission to ORCID was completed successfully", + "person.page.orcid.sync-queue.send.success": "ORCID-lähetys onnistui", + + // "person.page.orcid.sync-queue.send.validation-error": "The data that you want to synchronize with ORCID is not valid", + "person.page.orcid.sync-queue.send.validation-error": "ORCIDin kanssa synkronoitava data ei ole kelvollista", + + // "person.page.orcid.sync-queue.send.validation-error.amount-currency.required": "The amount's currency is required", + "person.page.orcid.sync-queue.send.validation-error.amount-currency.required": "Valuutta on pakollinen tieto", + + // "person.page.orcid.sync-queue.send.validation-error.external-id.required": "The resource to be sent requires at least one identifier", + "person.page.orcid.sync-queue.send.validation-error.external-id.required": "Lähetettävällä resurssilla on oltava ainakin yksi tunniste", + + // "person.page.orcid.sync-queue.send.validation-error.title.required": "The title is required", + "person.page.orcid.sync-queue.send.validation-error.title.required": "Nimeke on pakollinen tieto", + + // "person.page.orcid.sync-queue.send.validation-error.type.required": "The dc.type is required", + "person.page.orcid.sync-queue.send.validation-error.type.required": "dc.type on pakollinen tieto", + + // "person.page.orcid.sync-queue.send.validation-error.start-date.required": "The start date is required", + "person.page.orcid.sync-queue.send.validation-error.start-date.required": "Alkupäivämäärä on pakollinen tieto", + + // "person.page.orcid.sync-queue.send.validation-error.funder.required": "The funder is required", + "person.page.orcid.sync-queue.send.validation-error.funder.required": "Rahoittaja on pakollinen tieto", + + // "person.page.orcid.sync-queue.send.validation-error.country.invalid": "Invalid 2 digits ISO 3166 country", + "person.page.orcid.sync-queue.send.validation-error.country.invalid": "Virheelliset kaksi merkkiä ISO 3166 -maatunnisteessa", + + // "person.page.orcid.sync-queue.send.validation-error.organization.required": "The organization is required", + "person.page.orcid.sync-queue.send.validation-error.organization.required": "Organisaatio on pakollinen tieto", + + // "person.page.orcid.sync-queue.send.validation-error.organization.name-required": "The organization's name is required", + "person.page.orcid.sync-queue.send.validation-error.organization.name-required": "Organisaation nimi on pakollinen tieto", + + // "person.page.orcid.sync-queue.send.validation-error.publication.date-invalid": "The publication date must be one year after 1900", + "person.page.orcid.sync-queue.send.validation-error.publication.date-invalid": "Julkaisuajan on oltava vuoden 1900 jälkeen", + + // "person.page.orcid.sync-queue.send.validation-error.organization.address-required": "The organization to be sent requires an address", + "person.page.orcid.sync-queue.send.validation-error.organization.address-required": "Organisaatiolla on oltava osoite", + + // "person.page.orcid.sync-queue.send.validation-error.organization.city-required": "The address of the organization to be sent requires a city", + "person.page.orcid.sync-queue.send.validation-error.organization.city-required": "Organisaation osoitteessa on oltava kaupunki", + + // "person.page.orcid.sync-queue.send.validation-error.organization.country-required": "The address of the organization to be sent requires a valid 2 digits ISO 3166 country", + "person.page.orcid.sync-queue.send.validation-error.organization.country-required": "Organisaation osoitteessa on oltava oikeelliset kaksi ISO 3166 -maatunnisteen merkkiä", + + // "person.page.orcid.sync-queue.send.validation-error.disambiguated-organization.required": "An identifier to disambiguate organizations is required. Supported ids are GRID, Ringgold, Legal Entity identifiers (LEIs) and Crossref Funder Registry identifiers", + "person.page.orcid.sync-queue.send.validation-error.disambiguated-organization.required": "Tunniste vaaditaan organisaatioiden erottelemiseksi. Tuetut tunnisteet ovat GRID, Ringgold, Legal Entity identifier -tunnisteet (LEIt) ja Crossrefin rahoittaharekisterin tunnisteet (FUNDREF)", + + // "person.page.orcid.sync-queue.send.validation-error.disambiguated-organization.value-required": "The organization's identifiers requires a value", + "person.page.orcid.sync-queue.send.validation-error.disambiguated-organization.value-required": "Organisaation tunnisteilla on oltava arvo", + + // "person.page.orcid.sync-queue.send.validation-error.disambiguation-source.required": "The organization's identifiers requires a source", + "person.page.orcid.sync-queue.send.validation-error.disambiguation-source.required": "Organisaation tunnisteilla on oltava lähde", + + // "person.page.orcid.sync-queue.send.validation-error.disambiguation-source.invalid": "The source of one of the organization identifiers is invalid. Supported sources are RINGGOLD, GRID, LEI and FUNDREF", + "person.page.orcid.sync-queue.send.validation-error.disambiguation-source.invalid": "Organisaation tunnisteen lähde ei ole validi. Tuetut lähteet ovat RINGGOLD, GRID, LEI ja FUNDREF", + + // "person.page.orcid.synchronization-mode": "Synchronization mode", + "person.page.orcid.synchronization-mode": "Synkronointimoodi", + + // "person.page.orcid.synchronization-mode.batch": "Batch", + "person.page.orcid.synchronization-mode.batch": "Erä", + + // "person.page.orcid.synchronization-mode.label": "Synchronization mode", + "person.page.orcid.synchronization-mode.label": "Synkronointimoodi", + + // "person.page.orcid.synchronization-mode-message": "Please select how you would like synchronization to ORCID to occur. The options include \"Manual\" (you must send your data to ORCID manually), or \"Batch\" (the system will send your data to ORCID via a scheduled script).", + "person.page.orcid.synchronization-mode-message": "Valitse, miten haluat synkronoinnin ORCIDiin tapahtuvan. Vaihtoehdot ovat \"Manuaalinen\" (sinun on lähetettävä tietosi ORCIDiin manuaalisesti) tai \"Erä\" (järjestelmä lähettää tietosi ORCIDiin ajastetun skriptin avulla).", + + // "person.page.orcid.synchronization-mode-funding-message": "Select whether to send your linked Project entities to your ORCID record's list of funding information.", + "person.page.orcid.synchronization-mode-funding-message": "Valitse, lähetetäänkö linkitetyt projektisi ORCID-rekisterin rahoitustietoluetteloon.", + + // "person.page.orcid.synchronization-mode-publication-message": "Select whether to send your linked Publication entities to your ORCID record's list of works.", + "person.page.orcid.synchronization-mode-publication-message": "Valitse, lähetetäänkö linkitetyt julkaisusi ORCID-rekisterin luetteloon.", + + // "person.page.orcid.synchronization-mode-profile-message": "Select whether to send your biographical data or personal identifiers to your ORCID record.", + "person.page.orcid.synchronization-mode-profile-message": "Valitse, lähetetäänkö elämäkerralliset tietosi tai henkilökohtaiset tunnisteesi ORCID-rekisteriin.", + + // "person.page.orcid.synchronization-settings-update.success": "The synchronization settings have been updated successfully", + "person.page.orcid.synchronization-settings-update.success": "Synkronisointiasetukset päivitetty", + + // "person.page.orcid.synchronization-settings-update.error": "The update of the synchronization settings failed", + "person.page.orcid.synchronization-settings-update.error": "Synkronisointiasetusten päivittäminen epäonnistui", + + // "person.page.orcid.synchronization-mode.manual": "Manual", + "person.page.orcid.synchronization-mode.manual": "Manuaalinen", + + // "person.page.orcid.scope.authenticate": "Get your ORCID iD", + "person.page.orcid.scope.authenticate": "Hae ORCID-tunnisteesi", + + // "person.page.orcid.scope.read-limited": "Read your information with visibility set to Trusted Parties", + // TODO New key - Add a translation + "person.page.orcid.scope.read-limited": "Read your information with visibility set to Trusted Parties", + + // "person.page.orcid.scope.activities-update": "Add/update your research activities", + "person.page.orcid.scope.activities-update": "Lisää/päivitä tutkimustoimiasi", + + // "person.page.orcid.scope.person-update": "Add/update other information about you", + "person.page.orcid.scope.person-update": "Lisää/päivitä muita tietojasi", + + // "person.page.orcid.unlink.success": "The disconnection between the profile and the ORCID registry was successful", + "person.page.orcid.unlink.success": "Yhteys katkaistu profiilin ja ORCID-rekisterin välillä", + + // "person.page.orcid.unlink.error": "An error occurred while disconnecting between the profile and the ORCID registry. Try again", + "person.page.orcid.unlink.error": "Tapahtui virhe katkaistaessa yhteyttä profiilin ja ORCID-rekisterin välillä. Yritä uudelleen", + + // "person.orcid.sync.setting": "ORCID Synchronization settings", + "person.orcid.sync.setting": "ORCIDin synkronisointiasetukset", + + // "person.orcid.registry.queue": "ORCID Registry Queue", + "person.orcid.registry.queue": "ORCIDin rekisteröintijono", + + // "person.orcid.registry.auth": "ORCID Authorizations", + "person.orcid.registry.auth": "ORCID-käyttöoikeudet", + + // "home.recent-submissions.head": "Recent Submissions", + "home.recent-submissions.head": "Viimeksi tallennetut", + + // "listable-notification-object.default-message": "This object couldn't be retrieved", + "listable-notification-object.default-message": "Kohdetta ei voitu noutaa", + + // "system-wide-alert-banner.retrieval.error": "Something went wrong retrieving the system-wide alert banner", + "system-wide-alert-banner.retrieval.error": "Virhe noudettaessa järjestelmänlaajuista hälytysbanneria", + + // "system-wide-alert-banner.countdown.prefix": "In", + "system-wide-alert-banner.countdown.prefix": "Aikaa", + + // "system-wide-alert-banner.countdown.days": "{{days}} day(s),", + "system-wide-alert-banner.countdown.days": "{{days}} päivää(ä),", + + // "system-wide-alert-banner.countdown.hours": "{{hours}} hour(s) and", + "system-wide-alert-banner.countdown.hours": "{{hours}} tunti(a) and", + + // "system-wide-alert-banner.countdown.minutes": "{{minutes}} minute(s):", + "system-wide-alert-banner.countdown.minutes": "{{minutes}} minuutti(a):", + + // "menu.section.system-wide-alert": "System-wide Alert", + "menu.section.system-wide-alert": "Järjestelmänlaajuinen hälytys", + + // "system-wide-alert.form.header": "System-wide Alert", + "system-wide-alert.form.header": "Järjestelmänlaajuinen hälytys", + + // "system-wide-alert-form.retrieval.error": "Something went wrong retrieving the system-wide alert", + "system-wide-alert-form.retrieval.error": "Virhe noudettaessa järjestelmänlaajuista hälytystä", + + // "system-wide-alert.form.cancel": "Cancel", + "system-wide-alert.form.cancel": "Peruuta", + + // "system-wide-alert.form.save": "Save", + "system-wide-alert.form.save": "Tallenna", + + // "system-wide-alert.form.label.active": "ACTIVE", + "system-wide-alert.form.label.active": "AKTIIVINEN", + + // "system-wide-alert.form.label.inactive": "INACTIVE", + "system-wide-alert.form.label.inactive": "EI-AKTIIVINEN", + + // "system-wide-alert.form.error.message": "The system wide alert must have a message", + "system-wide-alert.form.error.message": "Järjestelmänlaajuisessa hälytyksessä on oltava viesti", + + // "system-wide-alert.form.label.message": "Alert message", + "system-wide-alert.form.label.message": "Hälytysviesti", + + // "system-wide-alert.form.label.countdownTo.enable": "Enable a countdown timer", + "system-wide-alert.form.label.countdownTo.enable": "Ota käyttöön lähtölaskennan ajastin", + + // "system-wide-alert.form.label.countdownTo.hint": "Hint: Set a countdown timer. When enabled, a date can be set in the future and the system-wide alert banner will perform a countdown to the set date. When this timer ends, it will disappear from the alert. The server will NOT be automatically stopped.", + "system-wide-alert.form.label.countdownTo.hint": "Vinkki: Aseta lähtölaskennan ajastin. Kun se on käytössä, voidaan päivämäärä asettaa tulevaisuuteen, jolloin järjestelmänlaajuinen hälytysbanneri suorittaa lähtölaskennan asetettuun päivämäärään. Kun ajastin päättyy, hälytys katoaa. Palvelinta EI pysäytetä automaattisesti.", + + // "system-wide-alert.form.label.preview": "System-wide alert preview", + "system-wide-alert.form.label.preview": "Järjestelmänlaajuisen hälytyksen esikatselu", + + // "system-wide-alert.form.update.success": "The system-wide alert was successfully updated", + "system-wide-alert.form.update.success": "Järjestelmänlaajuinen hälytys päivitetty", + + // "system-wide-alert.form.update.error": "Something went wrong when updating the system-wide alert", + "system-wide-alert.form.update.error": "Virhe päivitettäessä järjestelmänlaajuista hälytystä", + + // "system-wide-alert.form.create.success": "The system-wide alert was successfully created", + "system-wide-alert.form.create.success": "Järjestelmänlaajuinen hälytys luotu", + + // "system-wide-alert.form.create.error": "Something went wrong when creating the system-wide alert", + "system-wide-alert.form.create.error": "Virhe luotaessa järjestelmänlaajuista hälytystä", + + // "admin.system-wide-alert.breadcrumbs": "System-wide Alerts", + "admin.system-wide-alert.breadcrumbs": "Järjestelmänlaajuiset hälytykset", + + // "admin.system-wide-alert.title": "System-wide Alerts", + "admin.system-wide-alert.title": "Järjestelmänlaajuiset hälytykset", + +} \ No newline at end of file From 7c379db7eec9196e1fcbd5eacbcbd67246c4546f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 21:23:09 +0000 Subject: [PATCH 0009/1529] Bump semver from 5.7.1 to 5.7.2 Bumps [semver](https://github.com/npm/node-semver) from 5.7.1 to 5.7.2. - [Release notes](https://github.com/npm/node-semver/releases) - [Changelog](https://github.com/npm/node-semver/blob/v5.7.2/CHANGELOG.md) - [Commits](https://github.com/npm/node-semver/compare/v5.7.1...v5.7.2) --- updated-dependencies: - dependency-name: semver dependency-type: indirect ... Signed-off-by: dependabot[bot] (cherry picked from commit 0b0c60e38c1aecb690f15b1af20df655bd028c5f) --- yarn.lock | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/yarn.lock b/yarn.lock index 730966fcdb..21de68a480 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10114,33 +10114,33 @@ selfsigned@^2.1.1: dependencies: node-forge "^1" -semver@7.3.8, semver@^7.3.5, semver@^7.3.8: +semver@7.3.8: version "7.3.8" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== dependencies: lru-cache "^6.0.0" semver@^5.3.0, semver@^5.6.0, semver@^5.7.1: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + version "5.7.2" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + version "6.3.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" + integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.7: - version "7.4.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.4.0.tgz" - integrity sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw== +semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: + version "7.5.4" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" + integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== dependencies: lru-cache "^6.0.0" semver@~7.0.0: version "7.0.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.0.0.tgz#5f3ca35761e47e05b206c6daff2cf814f0316b8e" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== send@0.16.2: From 0dc74165dc58bbeb36bd95ef86b6666e5245997f Mon Sep 17 00:00:00 2001 From: Mirko Scherf Date: Thu, 20 Jul 2023 14:53:28 +0200 Subject: [PATCH 0010/1529] refactor: rename aletr-type.ts to alert-type.ts --- .../group-registry/group-form/group-form.component.ts | 2 +- .../edit-item-template-page.component.ts | 2 +- .../dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts | 2 +- .../health-panel/health-component/health-component.component.ts | 2 +- src/app/item-page/alerts/item-alerts.component.ts | 2 +- .../item-version-history/item-version-history.component.ts | 2 +- .../item-page/orcid-page/orcid-queue/orcid-queue.component.ts | 2 +- src/app/item-page/versions/item-versions.component.ts | 2 +- .../item-page/versions/notice/item-versions-notice.component.ts | 2 +- src/app/process-page/detail/process-detail.component.ts | 2 +- src/app/register-email-form/register-email-form.component.ts | 2 +- .../access-control-form-container.component.ts | 2 +- src/app/shared/alert/{aletr-type.ts => alert-type.ts} | 0 src/app/shared/alert/alert.component.spec.ts | 2 +- src/app/shared/alert/alert.component.ts | 2 +- src/app/shared/error/error.component.ts | 2 +- .../sections/container/section-container.component.ts | 2 +- .../sections/identifiers/section-identifiers.component.ts | 2 +- .../publisher-policy/publisher-policy.component.ts | 2 +- .../sherpa-policies/section-sherpa-policies.component.ts | 2 +- src/app/submission/sections/upload/section-upload.component.ts | 2 +- 21 files changed, 20 insertions(+), 20 deletions(-) rename src/app/shared/alert/{aletr-type.ts => alert-type.ts} (100%) diff --git a/src/app/access-control/group-registry/group-form/group-form.component.ts b/src/app/access-control/group-registry/group-form/group-form.component.ts index 3c0547cca5..693e283b4a 100644 --- a/src/app/access-control/group-registry/group-form/group-form.component.ts +++ b/src/app/access-control/group-registry/group-form/group-form.component.ts @@ -37,7 +37,7 @@ import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; import { ConfirmationModalComponent } from '../../../shared/confirmation-modal/confirmation-modal.component'; import { hasValue, isNotEmpty, hasValueOperator } from '../../../shared/empty.util'; import { FormBuilderService } from '../../../shared/form/builder/form-builder.service'; diff --git a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts index 6425996fd2..238ec5e37a 100644 --- a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts +++ b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts @@ -8,7 +8,7 @@ import { ItemTemplateDataService } from '../../core/data/item-template-data.serv import { getCollectionEditRoute } from '../collection-page-routing-paths'; import { Item } from '../../core/shared/item.model'; import { getFirstSucceededRemoteDataPayload } from '../../core/shared/operators'; -import { AlertType } from '../../shared/alert/aletr-type'; +import { AlertType } from '../../shared/alert/alert-type'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; @Component({ 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 d67a7ea738..d44817be84 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 @@ -1,5 +1,5 @@ import { Component, Inject, Injector, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'; -import { AlertType } from '../../shared/alert/aletr-type'; +import { AlertType } from '../../shared/alert/alert-type'; import { DSpaceObject } from '../../core/shared/dspace-object.model'; import { DsoEditMetadataForm } from './dso-edit-metadata-form'; import { map } from 'rxjs/operators'; diff --git a/src/app/health-page/health-panel/health-component/health-component.component.ts b/src/app/health-page/health-panel/health-component/health-component.component.ts index e212a07289..f2391c9c4c 100644 --- a/src/app/health-page/health-panel/health-component/health-component.component.ts +++ b/src/app/health-page/health-panel/health-component/health-component.component.ts @@ -3,7 +3,7 @@ import { Component, Input } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { HealthComponent } from '../../models/health-component.model'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; /** * A component to render a "health component" object. diff --git a/src/app/item-page/alerts/item-alerts.component.ts b/src/app/item-page/alerts/item-alerts.component.ts index d7a84db015..2b1df58c9f 100644 --- a/src/app/item-page/alerts/item-alerts.component.ts +++ b/src/app/item-page/alerts/item-alerts.component.ts @@ -1,6 +1,6 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../core/shared/item.model'; -import { AlertType } from '../../shared/alert/aletr-type'; +import { AlertType } from '../../shared/alert/alert-type'; @Component({ selector: 'ds-item-alerts', diff --git a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts index 18878109c2..3845c03578 100644 --- a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts +++ b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts @@ -5,7 +5,7 @@ import { Item } from '../../../core/shared/item.model'; import { map } from 'rxjs/operators'; import { getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { ActivatedRoute } from '@angular/router'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; @Component({ selector: 'ds-item-version-history', diff --git a/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts b/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts index 6079287f71..3e88826952 100644 --- a/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts +++ b/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts @@ -15,7 +15,7 @@ import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; import { hasValue } from '../../../shared/empty.util'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; import { Item } from '../../../core/shared/item.model'; import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service'; diff --git a/src/app/item-page/versions/item-versions.component.ts b/src/app/item-page/versions/item-versions.component.ts index 700a35552c..e7ee9d5ea2 100644 --- a/src/app/item-page/versions/item-versions.component.ts +++ b/src/app/item-page/versions/item-versions.component.ts @@ -23,7 +23,7 @@ import { PaginatedList } from '../../core/data/paginated-list.model'; import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { VersionHistoryDataService } from '../../core/data/version-history-data.service'; import { PaginatedSearchOptions } from '../../shared/search/models/paginated-search-options.model'; -import { AlertType } from '../../shared/alert/aletr-type'; +import { AlertType } from '../../shared/alert/alert-type'; import { followLink } from '../../shared/utils/follow-link-config.model'; import { hasValue, hasValueOperator } from '../../shared/empty.util'; import { PaginationService } from '../../core/pagination/pagination.service'; diff --git a/src/app/item-page/versions/notice/item-versions-notice.component.ts b/src/app/item-page/versions/notice/item-versions-notice.component.ts index 8a8f5ff76f..0e5e45806b 100644 --- a/src/app/item-page/versions/notice/item-versions-notice.component.ts +++ b/src/app/item-page/versions/notice/item-versions-notice.component.ts @@ -12,7 +12,7 @@ import { } from '../../../core/shared/operators'; import { map, startWith, switchMap } from 'rxjs/operators'; import { VersionHistoryDataService } from '../../../core/data/version-history-data.service'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; import { getItemPageRoute } from '../../item-page-routing-paths'; @Component({ diff --git a/src/app/process-page/detail/process-detail.component.ts b/src/app/process-page/detail/process-detail.component.ts index a379dfe337..be0b6ad0f6 100644 --- a/src/app/process-page/detail/process-detail.component.ts +++ b/src/app/process-page/detail/process-detail.component.ts @@ -17,7 +17,7 @@ import { getFirstSucceededRemoteDataPayload } from '../../core/shared/operators'; import { URLCombiner } from '../../core/url-combiner/url-combiner'; -import { AlertType } from '../../shared/alert/aletr-type'; +import { AlertType } from '../../shared/alert/alert-type'; import { hasValue } from '../../shared/empty.util'; import { ProcessStatus } from '../processes/process-status.model'; import { Process } from '../processes/process.model'; diff --git a/src/app/register-email-form/register-email-form.component.ts b/src/app/register-email-form/register-email-form.component.ts index ddb77b669c..df7e9bea5e 100644 --- a/src/app/register-email-form/register-email-form.component.ts +++ b/src/app/register-email-form/register-email-form.component.ts @@ -13,7 +13,7 @@ import {isNotEmpty} from '../shared/empty.util'; import {BehaviorSubject, combineLatest, Observable, of, switchMap} from 'rxjs'; import {map, startWith, take} from 'rxjs/operators'; import {CAPTCHA_NAME, GoogleRecaptchaService} from '../core/google-recaptcha/google-recaptcha.service'; -import {AlertType} from '../shared/alert/aletr-type'; +import {AlertType} from '../shared/alert/alert-type'; import {KlaroService} from '../shared/cookies/klaro.service'; import {CookieService} from '../core/services/cookie.service'; import { Subscription } from 'rxjs'; diff --git a/src/app/shared/access-control-form-container/access-control-form-container.component.ts b/src/app/shared/access-control-form-container/access-control-form-container.component.ts index 69a598f7ce..cddd1b1a29 100644 --- a/src/app/shared/access-control-form-container/access-control-form-container.component.ts +++ b/src/app/shared/access-control-form-container/access-control-form-container.component.ts @@ -15,7 +15,7 @@ import { import { BulkAccessConfigDataService } from '../../core/config/bulk-access-config-data.service'; import { getFirstCompletedRemoteData } from '../../core/shared/operators'; import { BulkAccessConditionOptions } from '../../core/config/models/bulk-access-condition-options.model'; -import { AlertType } from '../alert/aletr-type'; +import { AlertType } from '../alert/alert-type'; import { createAccessControlInitialFormState } from './access-control-form-container-intial-state'; diff --git a/src/app/shared/alert/aletr-type.ts b/src/app/shared/alert/alert-type.ts similarity index 100% rename from src/app/shared/alert/aletr-type.ts rename to src/app/shared/alert/alert-type.ts diff --git a/src/app/shared/alert/alert.component.spec.ts b/src/app/shared/alert/alert.component.spec.ts index 21e4d197b7..11411c7de0 100644 --- a/src/app/shared/alert/alert.component.spec.ts +++ b/src/app/shared/alert/alert.component.spec.ts @@ -8,7 +8,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { AlertComponent } from './alert.component'; import { createTestComponent } from '../testing/utils.test'; -import { AlertType } from './aletr-type'; +import { AlertType } from './alert-type'; describe('AlertComponent test suite', () => { diff --git a/src/app/shared/alert/alert.component.ts b/src/app/shared/alert/alert.component.ts index 93535d2057..07a8efbd7d 100644 --- a/src/app/shared/alert/alert.component.ts +++ b/src/app/shared/alert/alert.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core'; import { trigger } from '@angular/animations'; -import { AlertType } from './aletr-type'; +import { AlertType } from './alert-type'; import { fadeOutLeave, fadeOutState } from '../animations/fade'; /** diff --git a/src/app/shared/error/error.component.ts b/src/app/shared/error/error.component.ts index 9a6b0660bb..6572598c8b 100644 --- a/src/app/shared/error/error.component.ts +++ b/src/app/shared/error/error.component.ts @@ -3,7 +3,7 @@ import { Component, Input } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; -import { AlertType } from '../alert/aletr-type'; +import { AlertType } from '../alert/alert-type'; @Component({ selector: 'ds-error', diff --git a/src/app/submission/sections/container/section-container.component.ts b/src/app/submission/sections/container/section-container.component.ts index 8f9ebfbfda..3331629f33 100644 --- a/src/app/submission/sections/container/section-container.component.ts +++ b/src/app/submission/sections/container/section-container.component.ts @@ -3,7 +3,7 @@ import { Component, Injector, Input, OnInit, ViewChild } from '@angular/core'; import { SectionsDirective } from '../sections.directive'; import { SectionDataObject } from '../models/section-data.model'; import { rendersSectionType } from '../sections-decorator'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; /** * This component represents a section that contains the submission license form. diff --git a/src/app/submission/sections/identifiers/section-identifiers.component.ts b/src/app/submission/sections/identifiers/section-identifiers.component.ts index 2dc70f668e..ac4af63adb 100644 --- a/src/app/submission/sections/identifiers/section-identifiers.component.ts +++ b/src/app/submission/sections/identifiers/section-identifiers.component.ts @@ -7,7 +7,7 @@ import { SectionModelComponent } from '../models/section.model'; import { renderSectionFor } from '../sections-decorator'; import { SectionDataObject } from '../models/section-data.model'; import { SubmissionService } from '../../submission.service'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; import { SectionsService } from '../sections.service'; import { WorkspaceitemSectionIdentifiersObject } from '../../../core/submission/models/workspaceitem-section-identifiers.model'; diff --git a/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.ts b/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.ts index 96ada3904c..25407f5a7b 100644 --- a/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.ts +++ b/src/app/submission/sections/sherpa-policies/publisher-policy/publisher-policy.component.ts @@ -1,7 +1,7 @@ import { Component, Input } from '@angular/core'; import { Policy } from '../../../../core/submission/models/sherpa-policies-details.model'; -import { AlertType } from '../../../../shared/alert/aletr-type'; +import { AlertType } from '../../../../shared/alert/alert-type'; /** * This component represents a section that contains the publisher policy informations. diff --git a/src/app/submission/sections/sherpa-policies/section-sherpa-policies.component.ts b/src/app/submission/sections/sherpa-policies/section-sherpa-policies.component.ts index e55b75146f..eb273a8420 100644 --- a/src/app/submission/sections/sherpa-policies/section-sherpa-policies.component.ts +++ b/src/app/submission/sections/sherpa-policies/section-sherpa-policies.component.ts @@ -1,4 +1,4 @@ -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; import { Component, Inject } from '@angular/core'; import { BehaviorSubject, Observable, of, Subscription } from 'rxjs'; diff --git a/src/app/submission/sections/upload/section-upload.component.ts b/src/app/submission/sections/upload/section-upload.component.ts index eefed8a36b..10203adbc0 100644 --- a/src/app/submission/sections/upload/section-upload.component.ts +++ b/src/app/submission/sections/upload/section-upload.component.ts @@ -21,7 +21,7 @@ import { SectionsType } from '../sections-type'; import { renderSectionFor } from '../sections-decorator'; import { SectionDataObject } from '../models/section-data.model'; import { SubmissionObjectEntry } from '../../objects/submission-objects.reducer'; -import { AlertType } from '../../../shared/alert/aletr-type'; +import { AlertType } from '../../../shared/alert/alert-type'; import { RemoteData } from '../../../core/data/remote-data'; import { Group } from '../../../core/eperson/models/group.model'; import { SectionsService } from '../sections.service'; From a7ed053d152df6ec45df02fd458928b2e39bb0b0 Mon Sep 17 00:00:00 2001 From: Kim Shepherd Date: Thu, 29 Jun 2023 16:09:54 +0200 Subject: [PATCH 0011/1529] catch and handle unsuccessful "convert rels to items" responses (cherry picked from commit a35b7d8356e17f4cdd8568389695b1685b27eb84) --- .../shared/item-relationships-utils.ts | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts b/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts index b4c3da2cdc..0c4e82178f 100644 --- a/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts +++ b/src/app/item-page/simple/item-types/shared/item-relationships-utils.ts @@ -5,8 +5,7 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { Relationship } from '../../../../core/shared/item-relationships/relationship.model'; import { Item } from '../../../../core/shared/item.model'; import { - getFirstSucceededRemoteDataPayload, - getFirstSucceededRemoteData + getFirstCompletedRemoteData } from '../../../../core/shared/operators'; import { hasValue } from '../../../../shared/empty.util'; import { InjectionToken } from '@angular/core'; @@ -77,24 +76,42 @@ export const relationsToItems = (thisId: string) => * @param {string} thisId The item's id of which the relations belong to * @returns {(source: Observable) => Observable} */ -export const paginatedRelationsToItems = (thisId: string) => - (source: Observable>>): Observable>> => +export const paginatedRelationsToItems = (thisId: string) => (source: Observable>>): Observable>> => source.pipe( - getFirstSucceededRemoteData(), + getFirstCompletedRemoteData(), switchMap((relationshipsRD: RemoteData>) => { return observableCombineLatest( relationshipsRD.payload.page.map((rel: Relationship) => observableCombineLatest([ - rel.leftItem.pipe(getFirstSucceededRemoteDataPayload()), - rel.rightItem.pipe(getFirstSucceededRemoteDataPayload())] + rel.leftItem.pipe( + getFirstCompletedRemoteData(), + map((rd: RemoteData) => { + if (rd.hasSucceeded) { + return rd.payload; + } else { + return null; + } + }) + ), + rel.rightItem.pipe( + getFirstCompletedRemoteData(), + map((rd: RemoteData) => { + if (rd.hasSucceeded) { + return rd.payload; + } else { + return null; + } + }) + ), + ] ) - )).pipe( + ) + ).pipe( map((arr) => - arr - .map(([leftItem, rightItem]) => { - if (leftItem.id === thisId) { + arr.map(([leftItem, rightItem]) => { + if (hasValue(leftItem) && leftItem.id === thisId) { return rightItem; - } else if (rightItem.id === thisId) { + } else if (hasValue(rightItem) && rightItem.id === thisId) { return leftItem; } }) From f746d45ac153f64c27a5e080083f11137dd1dccf Mon Sep 17 00:00:00 2001 From: milanmajchrak Date: Thu, 20 Jul 2023 12:46:30 +0200 Subject: [PATCH 0012/1529] Show error message from the error response (cherry picked from commit e6546b4499fe87a9308dab7ff2c6767f9f256c67) --- src/app/profile-page/profile-page.component.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/app/profile-page/profile-page.component.ts b/src/app/profile-page/profile-page.component.ts index 343314999b..d49bdedb83 100644 --- a/src/app/profile-page/profile-page.component.ts +++ b/src/app/profile-page/profile-page.component.ts @@ -161,7 +161,7 @@ export class ProfilePageComponent implements OnInit { } else { this.notificationsService.error( this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.title'), - this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.change-failed') + this.getPasswordErrorMessage(response) ); } }); @@ -199,4 +199,18 @@ export class ProfilePageComponent implements OnInit { return this.isResearcherProfileEnabled$.asObservable(); } + /** + * Returns an error message from a password validation request with a specific reason or + * a default message without specific reason. + * @param response from the validation password patch request. + */ + getPasswordErrorMessage(response) { + if (response.hasFailed && isNotEmpty(response.errorMessage)) { + // Response has a specific error message. Show this message in the error notification. + return this.translate.instant(response.errorMessage); + } + // Show default error message notification. + return this.translate.instant(this.PASSWORD_NOTIFICATIONS_PREFIX + 'error.change-failed'); + } + } From c3b9a1d5c6ed98fadb53b95eb5ca4de7174bca54 Mon Sep 17 00:00:00 2001 From: Mirko Scherf Date: Fri, 21 Jul 2023 10:43:13 +0200 Subject: [PATCH 0013/1529] fix(i18n): add and update missing status strings New strings for status filter entries: search.filters.namedresourcetype.* Refactored strings introduced with #2068 (refactor badged), e.g. mydspace.status.archived -> mydspace.status.mydspaceArchived --- src/assets/i18n/ar.json5 | 20 ++++++++++---------- src/assets/i18n/bn.json5 | 20 ++++++++++---------- src/assets/i18n/ca.json5 | 20 ++++++++++---------- src/assets/i18n/cs.json5 | 20 ++++++++++---------- src/assets/i18n/de.json5 | 35 +++++++++++++++++++++++++---------- src/assets/i18n/el.json5 | 10 +++++----- src/assets/i18n/en.json5 | 10 ++++++++++ src/assets/i18n/es.json5 | 20 ++++++++++---------- src/assets/i18n/fr.json5 | 20 ++++++++++---------- src/assets/i18n/gd.json5 | 20 ++++++++++---------- src/assets/i18n/hi.json5 | 10 +++++----- src/assets/i18n/hu.json5 | 20 ++++++++++---------- src/assets/i18n/it.json5 | 20 ++++++++++---------- src/assets/i18n/ja.json5 | 20 ++++++++++---------- src/assets/i18n/kk.json5 | 20 ++++++++++---------- src/assets/i18n/lv.json5 | 20 ++++++++++---------- src/assets/i18n/nl.json5 | 20 ++++++++++---------- src/assets/i18n/pl.json5 | 10 +++++----- src/assets/i18n/pt-BR.json5 | 20 ++++++++++---------- src/assets/i18n/pt-PT.json5 | 20 ++++++++++---------- src/assets/i18n/sv.json5 | 20 ++++++++++---------- src/assets/i18n/sw.json5 | 20 ++++++++++---------- src/assets/i18n/tr.json5 | 20 ++++++++++---------- src/assets/i18n/uk.json5 | 20 ++++++++++---------- src/assets/i18n/vi.json5 | 10 +++++----- 25 files changed, 245 insertions(+), 220 deletions(-) diff --git a/src/assets/i18n/ar.json5 b/src/assets/i18n/ar.json5 index 70f5fdadb1..3069104dd9 100644 --- a/src/assets/i18n/ar.json5 +++ b/src/assets/i18n/ar.json5 @@ -4276,25 +4276,25 @@ // TODO New key - Add a translation "mydspace.show.workspace": "Your Submissions", - // "mydspace.status.archived": "Archived", + // "mydspace.status.mydspaceArchived": "Archived", // TODO New key - Add a translation - "mydspace.status.archived": "Archived", + "mydspace.status.mydspaceArchived": "Archived", - // "mydspace.status.validation": "Validation", + // "mydspace.status.mydspaceValidation": "Validation", // TODO New key - Add a translation - "mydspace.status.validation": "Validation", + "mydspace.status.mydspaceValidation": "Validation", - // "mydspace.status.waiting-for-controller": "Waiting for controller", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", // TODO New key - Add a translation - "mydspace.status.waiting-for-controller": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Waiting for controller", - // "mydspace.status.workflow": "Workflow", + // "mydspace.status.mydspaceWorkflow": "Workflow", // TODO New key - Add a translation - "mydspace.status.workflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Workflow", - // "mydspace.status.workspace": "Workspace", + // "mydspace.status.mydspaceWorkspace": "Workspace", // TODO New key - Add a translation - "mydspace.status.workspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Workspace", // "mydspace.title": "MyDSpace", // TODO New key - Add a translation diff --git a/src/assets/i18n/bn.json5 b/src/assets/i18n/bn.json5 index cc05d12828..c70cc6f459 100644 --- a/src/assets/i18n/bn.json5 +++ b/src/assets/i18n/bn.json5 @@ -3880,20 +3880,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "আপনার জমাগুলো", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "সংরক্ষণাগারভুক্ত", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "সংরক্ষণাগারভুক্ত", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "বৈধতা", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "বৈধতা", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "নিয়ামক জন্য অপেক্ষা করছে", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "নিয়ামক জন্য অপেক্ষা করছে", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "ওয়ার্কফ্লো", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "ওয়ার্কফ্লো", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "কর্মক্ষেত্র", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "কর্মক্ষেত্র", // "mydspace.title": "MyDSpace", "mydspace.title": "আমার ডিস্পেস", diff --git a/src/assets/i18n/ca.json5 b/src/assets/i18n/ca.json5 index 34279548bb..ad8fe49424 100644 --- a/src/assets/i18n/ca.json5 +++ b/src/assets/i18n/ca.json5 @@ -4190,20 +4190,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Els seus enviaments", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Arxivat", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Arxivat", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Validació", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validació", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Esperant el controlador", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Esperant el controlador", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Flux de treball", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Flux de treball", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Espai de treball", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Espai de treball", // "mydspace.title": "MyDSpace", "mydspace.title": "El meu DSpace", diff --git a/src/assets/i18n/cs.json5 b/src/assets/i18n/cs.json5 index f3155e9f57..7f9583a50e 100644 --- a/src/assets/i18n/cs.json5 +++ b/src/assets/i18n/cs.json5 @@ -4187,25 +4187,25 @@ // TODO New key - Add a translation "mydspace.show.workspace": "Your Submissions", - // "mydspace.status.archived": "Archived", + // "mydspace.status.mydspaceArchived": "Archived", // TODO New key - Add a translation - "mydspace.status.archived": "Archived", + "mydspace.status.mydspaceArchived": "Archived", - // "mydspace.status.validation": "Validation", + // "mydspace.status.mydspaceValidation": "Validation", // TODO New key - Add a translation - "mydspace.status.validation": "Validation", + "mydspace.status.mydspaceValidation": "Validation", - // "mydspace.status.waiting-for-controller": "Waiting for controller", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", // TODO New key - Add a translation - "mydspace.status.waiting-for-controller": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Waiting for controller", - // "mydspace.status.workflow": "Workflow", + // "mydspace.status.mydspaceWorkflow": "Workflow", // TODO New key - Add a translation - "mydspace.status.workflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Workflow", - // "mydspace.status.workspace": "Workspace", + // "mydspace.status.mydspaceWorkspace": "Workspace", // TODO New key - Add a translation - "mydspace.status.workspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Workspace", // "mydspace.title": "MyDSpace", // TODO New key - Add a translation diff --git a/src/assets/i18n/de.json5 b/src/assets/i18n/de.json5 index b03dc21e5a..4ebce8012d 100644 --- a/src/assets/i18n/de.json5 +++ b/src/assets/i18n/de.json5 @@ -3484,20 +3484,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Ihre Veröffentlichungen", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Archiviert", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Archiviert", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Validierung", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validierung", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Warten auf die Überprüfung", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Warten auf die Überprüfung", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Geschäftsgang", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Geschäftsgang", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Arbeitsbereich", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Arbeitsbereich", // "mydspace.title": "MyDSpace", "mydspace.title": "Mein DSpace", @@ -4487,6 +4487,21 @@ // "search.filters.discoverable.false": "Yes", "search.filters.discoverable.false": "Ja", + // "search.filters.namedresourcetype.Archived": "Archived", + "search.filters.namedresourcetype.Archived": "Archiviert", + + // "search.filters.namedresourcetype.Validation": "Validation", + "search.filters.namedresourcetype.Validation": "Validierung", + + // "search.filters.namedresourcetype.Waiting for Controller": "Waiting for Controller", + "search.filters.namedresourcetype.Waiting for Controller": "Warten auf die Überprüfung", + + // "search.filters.namedresourcetype.Workflow": "Workflow", + "search.filters.namedresourcetype.Workflow": "Geschäftsgang", + + // "search.filters.namedresourcetype.Workspace": "Workspace", + "search.filters.namedresourcetype.Workspace": "Arbeitsbereich", + // "search.filters.withdrawn.true": "Yes", "search.filters.withdrawn.true": "Ja", diff --git a/src/assets/i18n/el.json5 b/src/assets/i18n/el.json5 index af8a4fce49..176eadff62 100644 --- a/src/assets/i18n/el.json5 +++ b/src/assets/i18n/el.json5 @@ -1315,11 +1315,11 @@ "mydspace.search-form.placeholder": "Αναζήτηση στο mydspace...", "mydspace.show.workflow": "Εργασίες ροής εργασιών", "mydspace.show.workspace": "Οι Υποβολές σας", - "mydspace.status.archived": "Αρχειοθετημένα", - "mydspace.status.validation": "Επικύρωση", - "mydspace.status.waiting-for-controller": "Αναμονή για τον ελεγκτή", - "mydspace.status.workflow": "Ροή εργασιών", - "mydspace.status.workspace": "Χώρος εργασίας", + "mydspace.status.mydspaceArchived": "Αρχειοθετημένα", + "mydspace.status.mydspaceValidation": "Επικύρωση", + "mydspace.status.mydspaceWaitingController": "Αναμονή για τον ελεγκτή", + "mydspace.status.mydspaceWorkflow": "Ροή εργασιών", + "mydspace.status.mydspaceWorkspace": "Χώρος εργασίας", "mydspace.title": "MyDSpace", "mydspace.upload.upload-failed": "Σφάλμα κατά τη δημιουργία νέου χώρου εργασίας. Επαληθεύστε το περιεχόμενο που ανεβάσατε πριν δοκιμάσετε ξανά.", "mydspace.upload.upload-failed-manyentries": "Μη επεξεργάσιμο αρχείο. Εντοπίστηκαν πάρα πολλές καταχωρίσεις, αλλά επιτρέπεται μόνο μία για αρχείο.", diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 6c91bae4c1..5c17fc8e42 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -3812,6 +3812,16 @@ "search.filters.discoverable.false": "Yes", + "search.filters.namedresourcetype.Archived": "Archived", + + "search.filters.namedresourcetype.Validation": "Validation", + + "search.filters.namedresourcetype.Waiting for Controller": "Waiting for Controller", + + "search.filters.namedresourcetype.Workflow": "Workflow", + + "search.filters.namedresourcetype.Workspace": "Workspace", + "search.filters.withdrawn.true": "Yes", "search.filters.withdrawn.false": "No", diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index 7a2f2fa3db..5a0e40af42 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -4560,20 +4560,20 @@ // "mydspace.show.supervisedWorkspace": "Supervised items", "mydspace.show.supervisedWorkspace": "Ítems supervisados", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Archivado", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Archivado", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Validación", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validación", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Esperando al controlador", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Esperando al controlador", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Flujo de trabajo", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Flujo de trabajo", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Espacio de trabajo", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Espacio de trabajo", // "mydspace.title": "MyDSpace", "mydspace.title": "Mi DSpace", diff --git a/src/assets/i18n/fr.json5 b/src/assets/i18n/fr.json5 index 8ee4dc7d22..699ca5cc27 100644 --- a/src/assets/i18n/fr.json5 +++ b/src/assets/i18n/fr.json5 @@ -3822,20 +3822,20 @@ //"mydspace.show.supervisedWorkspace": "Supervised items", "mydspace.show.supervisedWorkspace": "Items supervisés", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Archivés", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Archivés", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "En cours de validation", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "En cours de validation", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "En attente d'assignation", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "En attente d'assignation", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "En traitement", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "En traitement", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Dépôts en cours", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Dépôts en cours", // "mydspace.title": "MyDSpace", "mydspace.title": "Mon compte DSpace", diff --git a/src/assets/i18n/gd.json5 b/src/assets/i18n/gd.json5 index 6096073d56..55a53bc6f1 100644 --- a/src/assets/i18n/gd.json5 +++ b/src/assets/i18n/gd.json5 @@ -3867,20 +3867,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Do Chur-a-steachan", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "San Tasglann", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "San Tasglann", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Dearbhadh", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Dearbhadh", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "A' feitheamh riaghladair", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "A' feitheamh riaghladair", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Sruth-obrach", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Sruth-obrach", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Raon-obrach", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Raon-obrach", // "mydspace.title": "MyDSpace", "mydspace.title": "MoDSpace", diff --git a/src/assets/i18n/hi.json5 b/src/assets/i18n/hi.json5 index 53fc106187..68eb6c1f12 100644 --- a/src/assets/i18n/hi.json5 +++ b/src/assets/i18n/hi.json5 @@ -2677,15 +2677,15 @@ "mydspace.show.workspace": "आपकी प्रस्तुतियां", - "mydspace.status.archived": "संग्रहीत", + "mydspace.status.mydspaceArchived": "संग्रहीत", - "mydspace.status.validation": "सत्यापन", + "mydspace.status.mydspaceValidation": "सत्यापन", - "mydspace.status.waiting-for-controller": "नियंत्रक की प्रतीक्षा कर रहा है", + "mydspace.status.mydspaceWaitingController": "नियंत्रक की प्रतीक्षा कर रहा है", - "mydspace.status.workflow": "कार्यप्रवाह", + "mydspace.status.mydspaceWorkflow": "कार्यप्रवाह", - "mydspace.status.workspace": "कार्यस्थान", + "mydspace.status.mydspaceWorkspace": "कार्यस्थान", "mydspace.title": "मेरा डीस्पेस", diff --git a/src/assets/i18n/hu.json5 b/src/assets/i18n/hu.json5 index 373d73aec5..e1076c7512 100644 --- a/src/assets/i18n/hu.json5 +++ b/src/assets/i18n/hu.json5 @@ -4983,20 +4983,20 @@ // TODO New key - Add a translation "mydspace.show.supervisedWorkspace": "Supervised items", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Tárolva", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Tárolva", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Érvényesítés", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Érvényesítés", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Várakozás a kontrollerre", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Várakozás a kontrollerre", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Munkafolyamat", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Munkafolyamat", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Munkafelület", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Munkafelület", // "mydspace.title": "MyDSpace", "mydspace.title": "MyDSpace", diff --git a/src/assets/i18n/it.json5 b/src/assets/i18n/it.json5 index 4131d0bee6..1a97eca501 100644 --- a/src/assets/i18n/it.json5 +++ b/src/assets/i18n/it.json5 @@ -4813,20 +4813,20 @@ // TODO New key - Add a translation "mydspace.show.supervisedWorkspace": "Supervised items", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Archiviati", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Archiviati", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Convalida", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Convalida", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "In attesa del controllo", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "In attesa del controllo", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Workflow", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Workflow", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Workspace", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Workspace", // "mydspace.title": "MyDSpace", "mydspace.title": "MyDSpace", diff --git a/src/assets/i18n/ja.json5 b/src/assets/i18n/ja.json5 index 94dfc9aa98..da2385fd62 100644 --- a/src/assets/i18n/ja.json5 +++ b/src/assets/i18n/ja.json5 @@ -4276,25 +4276,25 @@ // TODO New key - Add a translation "mydspace.show.workspace": "Your Submissions", - // "mydspace.status.archived": "Archived", + // "mydspace.status.mydspaceArchived": "Archived", // TODO New key - Add a translation - "mydspace.status.archived": "Archived", + "mydspace.status.mydspaceArchived": "Archived", - // "mydspace.status.validation": "Validation", + // "mydspace.status.mydspaceValidation": "Validation", // TODO New key - Add a translation - "mydspace.status.validation": "Validation", + "mydspace.status.mydspaceValidation": "Validation", - // "mydspace.status.waiting-for-controller": "Waiting for controller", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", // TODO New key - Add a translation - "mydspace.status.waiting-for-controller": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Waiting for controller", - // "mydspace.status.workflow": "Workflow", + // "mydspace.status.mydspaceWorkflow": "Workflow", // TODO New key - Add a translation - "mydspace.status.workflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Workflow", - // "mydspace.status.workspace": "Workspace", + // "mydspace.status.mydspaceWorkspace": "Workspace", // TODO New key - Add a translation - "mydspace.status.workspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Workspace", // "mydspace.title": "MyDSpace", // TODO New key - Add a translation diff --git a/src/assets/i18n/kk.json5 b/src/assets/i18n/kk.json5 index 354eb1104a..d23dc23c47 100644 --- a/src/assets/i18n/kk.json5 +++ b/src/assets/i18n/kk.json5 @@ -4139,20 +4139,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Сіздің өтініштеріңіз", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Мұрағатталған", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Мұрағатталған", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Валидация", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Валидация", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Контроллерді күтуде", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Контроллерді күтуде", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Жұмыс барысы", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Жұмыс барысы", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Жұмыс кеңістігі", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Жұмыс кеңістігі", // "mydspace.title": "MyDSpace", "mydspace.title": "MyDSpace", diff --git a/src/assets/i18n/lv.json5 b/src/assets/i18n/lv.json5 index 9b4058a3e6..81e2383a1f 100644 --- a/src/assets/i18n/lv.json5 +++ b/src/assets/i18n/lv.json5 @@ -3492,20 +3492,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Jūsu Iesniegumi", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Arhivēts", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Arhivēts", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Validācija", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validācija", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Gaida kontrolieri", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Gaida kontrolieri", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Darba plūsma", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Darba plūsma", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Darbavieta", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Darbavieta", // "mydspace.title": "MyDSpace", "mydspace.title": "Mans DSpace", diff --git a/src/assets/i18n/nl.json5 b/src/assets/i18n/nl.json5 index 520a8ca427..280a87b96f 100644 --- a/src/assets/i18n/nl.json5 +++ b/src/assets/i18n/nl.json5 @@ -3764,20 +3764,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Uw Submissions", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Opgeslagen", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Opgeslagen", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Validatie", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validatie", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Wachten op controlleur", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Wachten op controlleur", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Workflow", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Workflow", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Workspace", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Workspace", // "mydspace.title": "MyDSpace", "mydspace.title": "MyDSpace", diff --git a/src/assets/i18n/pl.json5 b/src/assets/i18n/pl.json5 index d748b94888..3512653705 100644 --- a/src/assets/i18n/pl.json5 +++ b/src/assets/i18n/pl.json5 @@ -1207,11 +1207,11 @@ "mydspace.search-form.placeholder": "Wyszukaj w mydspace...", "mydspace.show.workflow": "Wszystkie zadania", "mydspace.show.workspace": "Twoje zadania", - "mydspace.status.archived": "Zarchiwizowano", - "mydspace.status.validation": "Walidacja", - "mydspace.status.waiting-for-controller": "Oczekiwanie na redaktora", - "mydspace.status.workflow": "Workflow", - "mydspace.status.workspace": "Wersja robocza", + "mydspace.status.mydspaceArchived": "Zarchiwizowano", + "mydspace.status.mydspaceValidation": "Walidacja", + "mydspace.status.mydspaceWaitingController": "Oczekiwanie na redaktora", + "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkspace": "Wersja robocza", "mydspace.title": "Mój DSpace", "mydspace.upload.upload-failed": "Bład podczas tworzenia nowej wersji roboczej. Sprawdź poprawność plików i spróbuj ponownie.", "mydspace.upload.upload-failed-manyentries": "Plik jest niemożliwy do przetworzenia. Wykryto wiele wejść, a dopuszczalne jest tylko jedno dla jednego pliku.", diff --git a/src/assets/i18n/pt-BR.json5 b/src/assets/i18n/pt-BR.json5 index 25f1e0fb7c..5d852129bc 100644 --- a/src/assets/i18n/pt-BR.json5 +++ b/src/assets/i18n/pt-BR.json5 @@ -3972,20 +3972,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Minhas Submissões", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Arquivado", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Arquivado", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Validação", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validação", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Esperando pelo controlador", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Esperando pelo controlador", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Fluxo de trabalho", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Fluxo de trabalho", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Espaço de trabalho", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Espaço de trabalho", // "mydspace.title": "MyDSpace", "mydspace.title": "MeuDSpace", diff --git a/src/assets/i18n/pt-PT.json5 b/src/assets/i18n/pt-PT.json5 index a187ff927c..622f8cc48b 100644 --- a/src/assets/i18n/pt-PT.json5 +++ b/src/assets/i18n/pt-PT.json5 @@ -7713,20 +7713,20 @@ // "browse.metadata.srsc": "Subject Category", "browse.metadata.srsc": "vocabulário controlado (SRSC)", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Depositado", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Depositado", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Em validação", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Em validação", - // "mydspace.status.waiting-for-controller": "Waiting for Controller", - "mydspace.status.waiting-for-controller": "Aguarda validador", + // "mydspace.status.mydspaceWaitingController": "Waiting for Controller", + "mydspace.status.mydspaceWaitingController": "Aguarda validador", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Em fluxo de trabalho", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Em fluxo de trabalho", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Depósito por terminar", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Depósito por terminar", // "search.filters.namedresourcetype.Archived": "Archived", "search.filters.namedresourcetype.Archived": "Depositado", diff --git a/src/assets/i18n/sv.json5 b/src/assets/i18n/sv.json5 index c988577c92..4e3576ccfc 100644 --- a/src/assets/i18n/sv.json5 +++ b/src/assets/i18n/sv.json5 @@ -3934,20 +3934,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Dina registreringar", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "I arkivet", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "I arkivet", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Validering", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Validering", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Väntar på kontrollant", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Väntar på kontrollant", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Arbetsflöde", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Arbetsflöde", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "I arbetsflödet", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "I arbetsflödet", // "mydspace.title": "MyDSpace", "mydspace.title": "Mitt DSpace", diff --git a/src/assets/i18n/sw.json5 b/src/assets/i18n/sw.json5 index 47253dea9f..a470ee4b58 100644 --- a/src/assets/i18n/sw.json5 +++ b/src/assets/i18n/sw.json5 @@ -4276,25 +4276,25 @@ // TODO New key - Add a translation "mydspace.show.workspace": "Your Submissions", - // "mydspace.status.archived": "Archived", + // "mydspace.status.mydspaceArchived": "Archived", // TODO New key - Add a translation - "mydspace.status.archived": "Archived", + "mydspace.status.mydspaceArchived": "Archived", - // "mydspace.status.validation": "Validation", + // "mydspace.status.mydspaceValidation": "Validation", // TODO New key - Add a translation - "mydspace.status.validation": "Validation", + "mydspace.status.mydspaceValidation": "Validation", - // "mydspace.status.waiting-for-controller": "Waiting for controller", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", // TODO New key - Add a translation - "mydspace.status.waiting-for-controller": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Waiting for controller", - // "mydspace.status.workflow": "Workflow", + // "mydspace.status.mydspaceWorkflow": "Workflow", // TODO New key - Add a translation - "mydspace.status.workflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Workflow", - // "mydspace.status.workspace": "Workspace", + // "mydspace.status.mydspaceWorkspace": "Workspace", // TODO New key - Add a translation - "mydspace.status.workspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Workspace", // "mydspace.title": "MyDSpace", // TODO New key - Add a translation diff --git a/src/assets/i18n/tr.json5 b/src/assets/i18n/tr.json5 index e9869e0019..153eaa1281 100644 --- a/src/assets/i18n/tr.json5 +++ b/src/assets/i18n/tr.json5 @@ -3257,20 +3257,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Gönderimleriniz", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Arşivlendi", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Arşivlendi", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Doğrulama", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Doğrulama", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Kontrolör bekleniyor", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Kontrolör bekleniyor", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "İş akışı", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "İş akışı", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Çalışma alanı", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Çalışma alanı", // "mydspace.title": "MyDSpace", "mydspace.title": "MyDSpace", diff --git a/src/assets/i18n/uk.json5 b/src/assets/i18n/uk.json5 index 5cbb480179..7df55fa236 100644 --- a/src/assets/i18n/uk.json5 +++ b/src/assets/i18n/uk.json5 @@ -3383,20 +3383,20 @@ // "mydspace.show.workspace": "Your Submissions", "mydspace.show.workspace": "Ваші надіслані документи ", - // "mydspace.status.archived": "Archived", - "mydspace.status.archived": "Заархівовані", + // "mydspace.status.mydspaceArchived": "Archived", + "mydspace.status.mydspaceArchived": "Заархівовані", - // "mydspace.status.validation": "Validation", - "mydspace.status.validation": "Перевірка", + // "mydspace.status.mydspaceValidation": "Validation", + "mydspace.status.mydspaceValidation": "Перевірка", - // "mydspace.status.waiting-for-controller": "Waiting for controller", - "mydspace.status.waiting-for-controller": "Чекаємо контролера", + // "mydspace.status.mydspaceWaitingController": "Waiting for controller", + "mydspace.status.mydspaceWaitingController": "Чекаємо контролера", - // "mydspace.status.workflow": "Workflow", - "mydspace.status.workflow": "Робочий процес", + // "mydspace.status.mydspaceWorkflow": "Workflow", + "mydspace.status.mydspaceWorkflow": "Робочий процес", - // "mydspace.status.workspace": "Workspace", - "mydspace.status.workspace": "Робоче середовище", + // "mydspace.status.mydspaceWorkspace": "Workspace", + "mydspace.status.mydspaceWorkspace": "Робоче середовище", // "mydspace.title": "MyDSpace", "mydspace.title": "Моє середовище", diff --git a/src/assets/i18n/vi.json5 b/src/assets/i18n/vi.json5 index 7627818978..f254df34fe 100644 --- a/src/assets/i18n/vi.json5 +++ b/src/assets/i18n/vi.json5 @@ -1449,11 +1449,11 @@ "mydspace.search-form.placeholder": "Tìm kiếm trong trang cá nhân của tôi...", "mydspace.show.workflow": "Tất cả nhiệm vụ", "mydspace.show.workspace": "Tài liệu của tôi", - "mydspace.status.archived": "Đã lưu trữ", - "mydspace.status.validation": "Đang kiểm tra", - "mydspace.status.waiting-for-controller": "Đợi nhận nhiệm vụ", - "mydspace.status.workflow": "Đang kiểm duyệt", - "mydspace.status.workspace": "Đang biên mục", + "mydspace.status.mydspaceArchived": "Đã lưu trữ", + "mydspace.status.mydspaceValidation": "Đang kiểm tra", + "mydspace.status.mydspaceWaitingController": "Đợi nhận nhiệm vụ", + "mydspace.status.mydspaceWorkflow": "Đang kiểm duyệt", + "mydspace.status.mydspaceWorkspace": "Đang biên mục", "mydspace.title": "Trang cá nhân", "mydspace.upload.upload-failed": "Có lỗi xảy ra khi tạo tài liệu mới. Vui lòng xác minh nội dung đã tải lên trước khi thử lại.", "mydspace.upload.upload-failed-manyentries": "Không thể xử lý tệp tin. Có quá nhiều mục trong khi hệ thống chỉ cho phép một mục trong tệp tin.", From cfcf93ecf8bee2a22b1b0d3ddc791d092f27ef94 Mon Sep 17 00:00:00 2001 From: Kristof De Langhe Date: Mon, 17 Jul 2023 15:08:54 +0200 Subject: [PATCH 0014/1529] 104126: ProcessDetailComponent test improvement --- .../detail/process-detail.component.spec.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/app/process-page/detail/process-detail.component.spec.ts b/src/app/process-page/detail/process-detail.component.spec.ts index 9552f9a092..9a0d89a882 100644 --- a/src/app/process-page/detail/process-detail.component.spec.ts +++ b/src/app/process-page/detail/process-detail.component.spec.ts @@ -147,7 +147,7 @@ describe('ProcessDetailComponent', () => { providers: [ { provide: ActivatedRoute, - useValue: { data: observableOf({ process: createSuccessfulRemoteDataObject(process) }) } + useValue: { data: observableOf({ process: createSuccessfulRemoteDataObject(process) }), snapshot: { params: { id: 1 } } }, }, { provide: ProcessDataService, useValue: processService }, { provide: BitstreamDataService, useValue: bitstreamDataService }, @@ -310,10 +310,11 @@ describe('ProcessDetailComponent', () => { }); it('should call refresh method every 5 seconds, until process is completed', fakeAsync(() => { - spyOn(component, 'refresh'); - spyOn(component, 'stopRefreshTimer'); + spyOn(component, 'refresh').and.callThrough(); + spyOn(component, 'stopRefreshTimer').and.callThrough(); - process.processStatus = ProcessStatus.COMPLETED; + // start off with a running process in order for the refresh counter starts counting up + process.processStatus = ProcessStatus.RUNNING; // set findbyId to return a completed process (processService.findById as jasmine.Spy).and.returnValue(observableOf(createSuccessfulRemoteDataObject(process))); @@ -336,6 +337,10 @@ describe('ProcessDetailComponent', () => { tick(1001); // 1 second + 1 ms by the setTimeout expect(component.refreshCounter$.value).toBe(0); // 1 - 1 + // set the process to completed right before the counter checks the process + process.processStatus = ProcessStatus.COMPLETED; + (processService.findById as jasmine.Spy).and.returnValue(observableOf(createSuccessfulRemoteDataObject(process))); + tick(1000); // 1 second expect(component.refresh).toHaveBeenCalledTimes(1); From bbb50f2858f9c0fc6b6cd9ddf15ed54c7dc10e30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Aug 2023 21:28:22 +0000 Subject: [PATCH 0015/1529] Bump word-wrap from 1.2.3 to 1.2.5 Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.5. - [Release notes](https://github.com/jonschlinkert/word-wrap/releases) - [Commits](https://github.com/jonschlinkert/word-wrap/compare/1.2.3...1.2.5) --- updated-dependencies: - dependency-name: word-wrap dependency-type: indirect ... Signed-off-by: dependabot[bot] (cherry picked from commit 2fec33e70af5de3a2533f4ff33aabaff4aae03fc) --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 21de68a480..e53a070d16 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11743,9 +11743,9 @@ wildcard@^2.0.0: integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== word-wrap@^1.2.3, word-wrap@~1.2.3: - version "1.2.3" - resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + version "1.2.5" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.5.tgz#d2c45c6dd4fbce621a66f136cbe328afd0410b34" + integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== wrap-ansi@^6.2.0: version "6.2.0" From 2fd53c7ad21382fa822ef92343f90dd8ae5a1da7 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 22 Aug 2023 16:32:55 -0500 Subject: [PATCH 0016/1529] Replace mentions of demo7.dspace.org and api7.dspace.org with demo or sandbox --- README.md | 6 +++--- config/config.example.yml | 2 +- config/config.yml | 2 +- docker/README.md | 4 ++-- docker/docker-compose-dist.yml | 2 +- docs/Configuration.md | 4 ++-- src/app/core/services/browser-hard-redirect.service.ts | 4 ++-- src/app/core/services/hard-redirect.service.ts | 4 ++-- src/app/core/services/server-hard-redirect.service.ts | 4 ++-- 9 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 689c64a292..ebc24f8b91 100644 --- a/README.md +++ b/README.md @@ -157,8 +157,8 @@ DSPACE_UI_SSL => DSPACE_SSL The same settings can also be overwritten by setting system environment variables instead, E.g.: ```bash -export DSPACE_HOST=api7.dspace.org -export DSPACE_UI_PORT=4200 +export DSPACE_HOST=demo.dspace.org +export DSPACE_UI_PORT=4000 ``` The priority works as follows: **environment variable** overrides **variable in `.env` file** overrides external config set by `DSPACE_APP_CONFIG_PATH` overrides **`config.(prod or dev).yml`** @@ -288,7 +288,7 @@ E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Con The test files can be found in the `./cypress/integration/` folder. Before you can run e2e tests, two things are REQUIRED: -1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo REST API (https://api7.dspace.org/server/), as that server is uncontrolled and may have content added/removed at any time. +1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo/sandbox REST API (https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/), as those sites may have content added/removed at any time. * After starting up your backend on localhost, make sure either your `config.prod.yml` or `config.dev.yml` has its `rest` settings defined to use that localhost backend. * If you'd prefer, you may instead use environment variables as described at [Configuring](#configuring). For example: ``` diff --git a/config/config.example.yml b/config/config.example.yml index ea38303fa3..b7ea190c55 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -22,7 +22,7 @@ ui: # 'synced' with the 'dspace.server.url' setting in your backend's local.cfg. rest: ssl: true - host: api7.dspace.org + host: sandbox.dspace.org port: 443 # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript nameSpace: /server diff --git a/config/config.yml b/config/config.yml index b5eecd112f..109db60ca9 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1,5 +1,5 @@ rest: ssl: true - host: api7.dspace.org + host: sandbox.dspace.org port: 443 nameSpace: /server diff --git a/docker/README.md b/docker/README.md index 42deb793f9..37d071a86f 100644 --- a/docker/README.md +++ b/docker/README.md @@ -101,8 +101,8 @@ and the backend at http://localhost:8080/server/ ## Run DSpace Angular dist build with DSpace Demo site backend -This allows you to run the Angular UI in *production* mode, pointing it at the demo backend -(https://api7.dspace.org/server/). +This allows you to run the Angular UI in *production* mode, pointing it at the demo or sandbox backend +(https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/). ``` docker-compose -f docker/docker-compose-dist.yml pull diff --git a/docker/docker-compose-dist.yml b/docker/docker-compose-dist.yml index 1c75539da9..3d57174b13 100644 --- a/docker/docker-compose-dist.yml +++ b/docker/docker-compose-dist.yml @@ -24,7 +24,7 @@ services: # This is because Server Side Rendering (SSR) currently requires a public URL, # see this bug: https://github.com/DSpace/dspace-angular/issues/1485 DSPACE_REST_SSL: 'true' - DSPACE_REST_HOST: api7.dspace.org + DSPACE_REST_HOST: sandbox.dspace.org DSPACE_REST_PORT: 443 DSPACE_REST_NAMESPACE: /server image: dspace/dspace-angular:dspace-7_x-dist diff --git a/docs/Configuration.md b/docs/Configuration.md index 62fa444cc0..01fd83c94d 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -48,7 +48,7 @@ dspace-angular connects to your DSpace installation by using its REST endpoint. ```yaml rest: ssl: true - host: api7.dspace.org + host: demo.dspace.org port: 443 nameSpace: /server } @@ -57,7 +57,7 @@ rest: Alternately you can set the following environment variables. If any of these are set, it will override all configuration files: ``` DSPACE_REST_SSL=true - DSPACE_REST_HOST=api7.dspace.org + DSPACE_REST_HOST=demo.dspace.org DSPACE_REST_PORT=443 DSPACE_REST_NAMESPACE=/server ``` diff --git a/src/app/core/services/browser-hard-redirect.service.ts b/src/app/core/services/browser-hard-redirect.service.ts index 4ef9548899..827e83f0b7 100644 --- a/src/app/core/services/browser-hard-redirect.service.ts +++ b/src/app/core/services/browser-hard-redirect.service.ts @@ -38,8 +38,8 @@ export class BrowserHardRedirectService extends HardRedirectService { /** * Get the origin of the current URL * i.e. "://" [ ":" ] - * e.g. if the URL is https://demo7.dspace.org/search?query=test, - * the origin would be https://demo7.dspace.org + * e.g. if the URL is https://demo.dspace.org/search?query=test, + * the origin would be https://demo.dspace.org */ getCurrentOrigin(): string { return this.location.origin; diff --git a/src/app/core/services/hard-redirect.service.ts b/src/app/core/services/hard-redirect.service.ts index 826c7e4fa9..e6104cefb9 100644 --- a/src/app/core/services/hard-redirect.service.ts +++ b/src/app/core/services/hard-redirect.service.ts @@ -25,8 +25,8 @@ export abstract class HardRedirectService { /** * Get the origin of the current URL * i.e. "://" [ ":" ] - * e.g. if the URL is https://demo7.dspace.org/search?query=test, - * the origin would be https://demo7.dspace.org + * e.g. if the URL is https://demo.dspace.org/search?query=test, + * the origin would be https://demo.dspace.org */ abstract getCurrentOrigin(): string; } diff --git a/src/app/core/services/server-hard-redirect.service.ts b/src/app/core/services/server-hard-redirect.service.ts index 8c45cc864b..d71318d7b8 100644 --- a/src/app/core/services/server-hard-redirect.service.ts +++ b/src/app/core/services/server-hard-redirect.service.ts @@ -69,8 +69,8 @@ export class ServerHardRedirectService extends HardRedirectService { /** * Get the origin of the current URL * i.e. "://" [ ":" ] - * e.g. if the URL is https://demo7.dspace.org/search?query=test, - * the origin would be https://demo7.dspace.org + * e.g. if the URL is https://demo.dspace.org/search?query=test, + * the origin would be https://demo.dspace.org */ getCurrentOrigin(): string { return this.req.protocol + '://' + this.req.headers.host; From 5853e49bd05eba84141d2bc1aa3f4ff94fabdf04 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 22 Aug 2023 16:44:10 -0500 Subject: [PATCH 0017/1529] Update default configs to use https://demo.dspace.org/server/ --- config/config.example.yml | 2 +- config/config.yml | 2 +- docker/docker-compose-dist.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.example.yml b/config/config.example.yml index b7ea190c55..7e61155916 100644 --- a/config/config.example.yml +++ b/config/config.example.yml @@ -22,7 +22,7 @@ ui: # 'synced' with the 'dspace.server.url' setting in your backend's local.cfg. rest: ssl: true - host: sandbox.dspace.org + host: demo.dspace.org port: 443 # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript nameSpace: /server diff --git a/config/config.yml b/config/config.yml index 109db60ca9..dcf5389378 100644 --- a/config/config.yml +++ b/config/config.yml @@ -1,5 +1,5 @@ rest: ssl: true - host: sandbox.dspace.org + host: demo.dspace.org port: 443 nameSpace: /server diff --git a/docker/docker-compose-dist.yml b/docker/docker-compose-dist.yml index 3d57174b13..00225e8052 100644 --- a/docker/docker-compose-dist.yml +++ b/docker/docker-compose-dist.yml @@ -24,7 +24,7 @@ services: # This is because Server Side Rendering (SSR) currently requires a public URL, # see this bug: https://github.com/DSpace/dspace-angular/issues/1485 DSPACE_REST_SSL: 'true' - DSPACE_REST_HOST: sandbox.dspace.org + DSPACE_REST_HOST: demo.dspace.org DSPACE_REST_PORT: 443 DSPACE_REST_NAMESPACE: /server image: dspace/dspace-angular:dspace-7_x-dist From 36868c06f0fb5fd66c21a5a7d39c1f45928afe55 Mon Sep 17 00:00:00 2001 From: Hardy Pottinger Date: Tue, 15 Aug 2023 10:16:50 -0500 Subject: [PATCH 0018/1529] 2437 Correct and clarify commented-out code in several custom components - Correct the path in commented-out code in the custom theme's components - Clarify that the workflow-item-sen-back.component.scss file is a stub - It has no corresponding SCSS file in the base theme (cherry picked from commit 0906234a293a3dbe9057ef13cc4c5b690b1cf25b) --- src/themes/custom/app/footer/footer.component.ts | 4 ++-- .../header-nav-wrapper/header-navbar-wrapper.component.ts | 4 ++-- .../app/shared/auth-nav-menu/auth-nav-menu.component.ts | 4 ++-- .../custom/app/shared/object-list/object-list.component.ts | 2 +- .../workflow-item-send-back.component.ts | 5 ++++- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/themes/custom/app/footer/footer.component.ts b/src/themes/custom/app/footer/footer.component.ts index de80ceb311..81286fb662 100644 --- a/src/themes/custom/app/footer/footer.component.ts +++ b/src/themes/custom/app/footer/footer.component.ts @@ -3,9 +3,9 @@ import { FooterComponent as BaseComponent } from '../../../../app/footer/footer. @Component({ selector: 'ds-footer', - // styleUrls: ['footer.component.scss'], + // styleUrls: ['./footer.component.scss'], styleUrls: ['../../../../app/footer/footer.component.scss'], - // templateUrl: 'footer.component.html' + // templateUrl: './footer.component.html' templateUrl: '../../../../app/footer/footer.component.html' }) export class FooterComponent extends BaseComponent { diff --git a/src/themes/custom/app/header-nav-wrapper/header-navbar-wrapper.component.ts b/src/themes/custom/app/header-nav-wrapper/header-navbar-wrapper.component.ts index 875b5f69b8..e049543630 100644 --- a/src/themes/custom/app/header-nav-wrapper/header-navbar-wrapper.component.ts +++ b/src/themes/custom/app/header-nav-wrapper/header-navbar-wrapper.component.ts @@ -6,9 +6,9 @@ import { HeaderNavbarWrapperComponent as BaseComponent } from '../../../../app/h */ @Component({ selector: 'ds-header-navbar-wrapper', - // styleUrls: ['header-navbar-wrapper.component.scss'], + // styleUrls: ['./header-navbar-wrapper.component.scss'], styleUrls: ['../../../../app/header-nav-wrapper/header-navbar-wrapper.component.scss'], - // templateUrl: 'header-navbar-wrapper.component.html', + // templateUrl: './header-navbar-wrapper.component.html', templateUrl: '../../../../app/header-nav-wrapper/header-navbar-wrapper.component.html', }) export class HeaderNavbarWrapperComponent extends BaseComponent { diff --git a/src/themes/custom/app/shared/auth-nav-menu/auth-nav-menu.component.ts b/src/themes/custom/app/shared/auth-nav-menu/auth-nav-menu.component.ts index af54aacd44..ff5f09eb76 100644 --- a/src/themes/custom/app/shared/auth-nav-menu/auth-nav-menu.component.ts +++ b/src/themes/custom/app/shared/auth-nav-menu/auth-nav-menu.component.ts @@ -9,9 +9,9 @@ import { fadeInOut, fadeOut } from '../../../../../app/shared/animations/fade'; */ @Component({ selector: 'ds-auth-nav-menu', - // templateUrl: 'auth-nav-menu.component.html', + // templateUrl: './auth-nav-menu.component.html', templateUrl: '../../../../../app/shared/auth-nav-menu/auth-nav-menu.component.html', - // styleUrls: ['auth-nav-menu.component.scss'], + // styleUrls: ['./auth-nav-menu.component.scss'], styleUrls: ['../../../../../app/shared/auth-nav-menu/auth-nav-menu.component.scss'], animations: [fadeInOut, fadeOut] }) 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 49f464610f..a376336870 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 @@ -9,7 +9,7 @@ import { ObjectListComponent as BaseComponent} from '../../../../../app/shared/o selector: 'ds-object-list', // styleUrls: ['./object-list.component.scss'], styleUrls: ['../../../../../app/shared/object-list/object-list.component.scss'], - // templateUrl: 'object-list.component.html' + // templateUrl: './object-list.component.html' templateUrl: '../../../../../app/shared/object-list/object-list.component.html' }) diff --git a/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts b/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts index 49121e64b9..ac8ffc99a9 100644 --- a/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts +++ b/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts @@ -3,7 +3,10 @@ import { WorkflowItemSendBackComponent as BaseComponent } from '../../../../../a @Component({ selector: 'ds-workflow-item-send-back', - // styleUrls: ['workflow-item-send-back.component.scss'], + // NOTE: the SCSS file for workflow-item-action-page does not have a corresponding file in the original + // implementation, so this commented out line below is a stub, here if you + // need it, but you probably don't need it. + // styleUrls: ['./workflow-item-send-back.component.scss'], // templateUrl: './workflow-item-send-back.component.html' templateUrl: '../../../../../app/workflowitems-edit-page/workflow-item-action-page.component.html' }) From 3292222e47bbea25232a34166b31f048087c1398 Mon Sep 17 00:00:00 2001 From: Hardy Pottinger Date: Tue, 15 Aug 2023 10:26:38 -0500 Subject: [PATCH 0019/1529] fix lint error in workflow-item-send-back.component.ts (cherry picked from commit 518cc714f2286889d2e66a4f013b954660e7ba5c) --- .../workflow-item-send-back.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts b/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts index ac8ffc99a9..022c46ef22 100644 --- a/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts +++ b/src/themes/custom/app/workflowitems-edit-page/workflow-item-send-back/workflow-item-send-back.component.ts @@ -6,7 +6,7 @@ import { WorkflowItemSendBackComponent as BaseComponent } from '../../../../../a // NOTE: the SCSS file for workflow-item-action-page does not have a corresponding file in the original // implementation, so this commented out line below is a stub, here if you // need it, but you probably don't need it. - // styleUrls: ['./workflow-item-send-back.component.scss'], + // styleUrls: ['./workflow-item-send-back.component.scss'], // templateUrl: './workflow-item-send-back.component.html' templateUrl: '../../../../../app/workflowitems-edit-page/workflow-item-action-page.component.html' }) From fe8429ebbe0e7733478157cf22a0f25820d79e87 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Wed, 23 Aug 2023 17:05:42 -0500 Subject: [PATCH 0020/1529] Enable new skip merge commit feature --- .github/workflows/port_merged_pull_request.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/port_merged_pull_request.yml b/.github/workflows/port_merged_pull_request.yml index 50faf3f886..109835d14d 100644 --- a/.github/workflows/port_merged_pull_request.yml +++ b/.github/workflows/port_merged_pull_request.yml @@ -39,6 +39,8 @@ jobs: # Copy all labels from original PR to (newly created) port PR # NOTE: The labels matching 'label_pattern' are automatically excluded copy_labels_pattern: '.*' + # Skip any merge commits in the ported PR. This means only non-merge commits are cherry-picked to the new PR + merge_commits: 'skip' # Use a personal access token (PAT) to create PR as 'dspace-bot' user. # A PAT is required in order for the new PR to trigger its own actions (for CI checks) github_token: ${{ secrets.PR_PORT_TOKEN }} \ No newline at end of file From 2078b7593a707f4dace81c78c1f049d86b841e98 Mon Sep 17 00:00:00 2001 From: Koen Pauwels Date: Fri, 4 Aug 2023 12:25:20 +0200 Subject: [PATCH 0021/1529] 103818 Add warning tooltip to "Inherit policies" checkbox on item move page --- .../edit-item-page/item-move/item-move.component.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/item-page/edit-item-page/item-move/item-move.component.html b/src/app/item-page/edit-item-page/item-move/item-move.component.html index 589aac655f..475d36fb6f 100644 --- a/src/app/item-page/edit-item-page/item-move/item-move.component.html +++ b/src/app/item-page/edit-item-page/item-move/item-move.component.html @@ -21,7 +21,11 @@

From a5b30ea3c2bebd4a4522078a05938940da7444a3 Mon Sep 17 00:00:00 2001 From: Koen Pauwels Date: Fri, 4 Aug 2023 17:10:06 +0200 Subject: [PATCH 0022/1529] 103818 Adjusted "Inherit policies" tooltip --- .../item-page/edit-item-page/item-move/item-move.component.html | 2 +- src/assets/i18n/en.json5 | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/item-page/edit-item-page/item-move/item-move.component.html b/src/app/item-page/edit-item-page/item-move/item-move.component.html index 475d36fb6f..c1a4a5b9a9 100644 --- a/src/app/item-page/edit-item-page/item-move/item-move.component.html +++ b/src/app/item-page/edit-item-page/item-move/item-move.component.html @@ -22,7 +22,7 @@

-
+ {{ dsoNameService.getName(node.payload) }}   {{node.payload.archivedItemsCount}} -
+
From 46ac61dcac5e6c3169a846f63d81eada002cff59 Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Tue, 22 Aug 2023 04:27:23 +0100 Subject: [PATCH 0036/1529] Replace h2 with a h1 (cherry picked from commit 05c53ad1d49da41af474322364891289494a5f02) --- src/app/community-list-page/community-list-page.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/community-list-page/community-list-page.component.html b/src/app/community-list-page/community-list-page.component.html index 9759f4405d..4392fb87d0 100644 --- a/src/app/community-list-page/community-list-page.component.html +++ b/src/app/community-list-page/community-list-page.component.html @@ -1,4 +1,4 @@
-

{{ 'communityList.title' | translate }}

+

{{ 'communityList.title' | translate }}

From 9fc4e213df758576f393975e12e0ae5b929330c4 Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Tue, 22 Aug 2023 04:28:28 +0100 Subject: [PATCH 0037/1529] Add trackby function so cdktree can differentiate between new and old nodes (cherry picked from commit 5f71de885bc811152729b3fefcb6fefbeda3001e) --- .../community-list/community-list.component.html | 2 +- .../community-list/community-list.component.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/community-list-page/community-list/community-list.component.html b/src/app/community-list-page/community-list/community-list.component.html index 38c9ed1ad6..18e9e84577 100644 --- a/src/app/community-list-page/community-list/community-list.component.html +++ b/src/app/community-list-page/community-list/community-list.component.html @@ -1,5 +1,5 @@ - + diff --git a/src/app/community-list-page/community-list/community-list.component.ts b/src/app/community-list-page/community-list/community-list.component.ts index 5b2f930813..e4ad5d8c29 100644 --- a/src/app/community-list-page/community-list/community-list.component.ts +++ b/src/app/community-list-page/community-list/community-list.component.ts @@ -30,6 +30,7 @@ export class CommunityListComponent implements OnInit, OnDestroy { ); dataSource: CommunityListDatasource; + trackBy = (index, node: FlatNode) => node.id; paginationConfig: FindListOptions; From e89a277702aed1b3ec462a88518bffb788ac50ac Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Tue, 22 Aug 2023 04:29:01 +0100 Subject: [PATCH 0038/1529] Improve documentation (cherry picked from commit d9b6e9d81f2fba70f7c13a1377e2f2472c20d592) --- .../community-list-service.ts | 6 ++--- .../community-list.component.ts | 25 ++++++++++++++----- .../show-more-flat-node.model.ts | 2 +- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/app/community-list-page/community-list-service.ts b/src/app/community-list-page/community-list-service.ts index 99e9dbeb0d..67715716da 100644 --- a/src/app/community-list-page/community-list-service.ts +++ b/src/app/community-list-page/community-list-service.ts @@ -25,7 +25,7 @@ import { ShowMoreFlatNode } from './show-more-flat-node.model'; import { FindListOptions } from '../core/data/find-list-options.model'; import { AppConfig, APP_CONFIG } from 'src/config/app-config.interface'; -// Helper method to combine an flatten an array of observables of flatNode arrays +// Helper method to combine and flatten an array of observables of flatNode arrays export const combineAndFlatten = (obsList: Observable[]): Observable => observableCombineLatest([...obsList]).pipe( map((matrix: any[][]) => [].concat(...matrix)), @@ -199,7 +199,7 @@ export class CommunityListService { * Transforms a community in a list of FlatNodes containing firstly a flatnode of the community itself, * followed by flatNodes of its possible subcommunities and collection * It gets called recursively for each subcommunity to add its subcommunities and collections to the list - * Number of subcommunities and collections added, is dependant on the current page the parent is at for respectively subcommunities and collections. + * Number of subcommunities and collections added, is dependent on the current page the parent is at for respectively subcommunities and collections. * @param community Community being transformed * @param level Depth of the community in the list, subcommunities and collections go one level deeper * @param parent Flatnode of the parent community @@ -275,7 +275,7 @@ export class CommunityListService { /** * Checks if a community has subcommunities or collections by querying the respective services with a pageSize = 0 - * Returns an observable that combines the result.payload.totalElements fo the observables that the + * Returns an observable that combines the result.payload.totalElements of the observables that the * respective services return when queried * @param community Community being checked whether it is expandable (if it has subcommunities or collections) */ diff --git a/src/app/community-list-page/community-list/community-list.component.ts b/src/app/community-list-page/community-list/community-list.component.ts index e4ad5d8c29..bd1d5ecb78 100644 --- a/src/app/community-list-page/community-list/community-list.component.ts +++ b/src/app/community-list-page/community-list/community-list.component.ts @@ -59,18 +59,28 @@ export class CommunityListComponent implements OnInit, OnDestroy { this.communityListService.saveCommunityListStateToStore(this.expandedNodes, this.loadingNode); } - // whether or not this node has children (subcommunities or collections) + /** + * Whether this node has children (subcommunities or collections) + * @param _ + * @param node + */ hasChild(_: number, node: FlatNode) { return node.isExpandable$; } - // whether or not it is a show more node (contains no data, but is indication that there are more topcoms, subcoms or collections + /** + * Whether this is a show more node that contains no data, but indicates that there is + * one or more community or collection. + * @param _ + * @param node + */ isShowMore(_: number, node: FlatNode) { return node.isShowMoreNode; } /** - * Toggles the expanded variable of a node, adds it to the expanded nodes list and reloads the tree so this node is expanded + * Toggles the expanded variable of a node, adds it to the expanded nodes list and reloads the tree + * so this node is expanded * @param node Node we want to expand */ toggleExpanded(node: FlatNode) { @@ -93,9 +103,12 @@ export class CommunityListComponent implements OnInit, OnDestroy { /** * Makes sure the next page of a node is added to the tree (top community, sub community of collection) - * > Finds its parent (if not top community) and increases its corresponding collection/subcommunity currentPage - * > Reloads tree with new page added to corresponding top community lis, sub community list or collection list - * @param node The show more node indicating whether it's an increase in top communities, sub communities or collections + * > Finds its parent (if not top community) and increases its corresponding collection/subcommunity + * currentPage + * > Reloads tree with new page added to corresponding top community lis, sub community list or + * collection list + * @param node The show more node indicating whether it's an increase in top communities, sub communities + * or collections */ getNextPage(node: FlatNode): void { this.loadingNode = node; diff --git a/src/app/community-list-page/show-more-flat-node.model.ts b/src/app/community-list-page/show-more-flat-node.model.ts index 801c9e7388..c7b7162d21 100644 --- a/src/app/community-list-page/show-more-flat-node.model.ts +++ b/src/app/community-list-page/show-more-flat-node.model.ts @@ -1,6 +1,6 @@ /** * The show more links in the community tree are also represented by a flatNode so we know where in - * the tree it should be rendered an who its parent is (needed for the action resulting in clicking this link) + * the tree it should be rendered and who its parent is (needed for the action resulting in clicking this link) */ export class ShowMoreFlatNode { } From 8a5d6897c4a2130f56da71e04fb0e2bdba400b07 Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Tue, 22 Aug 2023 04:59:23 +0100 Subject: [PATCH 0039/1529] Reorder instance method to come after member declaration (cherry picked from commit e59913acab0e782a743a4f18634e2930de9b71e8) --- .../community-list/community-list.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/community-list-page/community-list/community-list.component.ts b/src/app/community-list-page/community-list/community-list.component.ts index bd1d5ecb78..90dd6b3c05 100644 --- a/src/app/community-list-page/community-list/community-list.component.ts +++ b/src/app/community-list-page/community-list/community-list.component.ts @@ -28,11 +28,9 @@ export class CommunityListComponent implements OnInit, OnDestroy { treeControl = new FlatTreeControl( (node: FlatNode) => node.level, (node: FlatNode) => true ); - dataSource: CommunityListDatasource; - trackBy = (index, node: FlatNode) => node.id; - paginationConfig: FindListOptions; + trackBy = (index, node: FlatNode) => node.id; constructor( protected communityListService: CommunityListService, From 2a55e36082c78427fabfb2de8f4ab0a59f98890b Mon Sep 17 00:00:00 2001 From: Mirko Scherf Date: Wed, 26 Jul 2023 13:04:04 +0200 Subject: [PATCH 0040/1529] fix(i18m): curation-task.task.registerdoi.label changed curation-task.task.register-doi.label back to curation-task.task.registerdoi.label and added German translation (cherry picked from commit 0ec72f679bb8d1bb7611c1de2125f92cb718b1a9) --- src/assets/i18n/de.json5 | 3 ++- src/assets/i18n/en.json5 | 2 +- src/assets/i18n/es.json5 | 4 ++-- src/assets/i18n/hu.json5 | 4 ++-- src/assets/i18n/it.json5 | 4 ++-- src/assets/i18n/pt-PT.json5 | 4 ++-- src/assets/i18n/vi.json5 | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/assets/i18n/de.json5 b/src/assets/i18n/de.json5 index 4ebce8012d..5ab57cf3e6 100644 --- a/src/assets/i18n/de.json5 +++ b/src/assets/i18n/de.json5 @@ -1712,7 +1712,8 @@ // "curation-task.task.vscan.label": "Virus Scan", "curation-task.task.vscan.label": "Virenscan", - + // "curation-task.task.registerdoi.label": "Register DOI", + "curation-task.task.registerdoi.label": "DOI registrieren", // "curation.form.task-select.label": "Task:", "curation.form.task-select.label": "Aufgabe:", diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 5c17fc8e42..e12233eb5b 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -1392,7 +1392,7 @@ "curation-task.task.vscan.label": "Virus Scan", - "curation-task.task.register-doi.label": "Register DOI", + "curation-task.task.registerdoi.label": "Register DOI", "curation.form.task-select.label": "Task:", diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index 5a0e40af42..bb9334cf11 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -2080,8 +2080,8 @@ // "curation-task.task.vscan.label": "Virus Scan", "curation-task.task.vscan.label": "Búsqueda de virus", - // "curation-task.task.register-doi.label": "Register DOI", - "curation-task.task.register-doi.label": "Registro DOI", + // "curation-task.task.registerdoi.label": "Register DOI", + "curation-task.task.registerdoi.label": "Registro DOI", diff --git a/src/assets/i18n/hu.json5 b/src/assets/i18n/hu.json5 index e1076c7512..d186f6435a 100644 --- a/src/assets/i18n/hu.json5 +++ b/src/assets/i18n/hu.json5 @@ -2228,9 +2228,9 @@ // "curation-task.task.vscan.label": "Virus Scan", "curation-task.task.vscan.label": "Virus ellenőrzés", - // "curation-task.task.register-doi.label": "Register DOI", + // "curation-task.task.registerdoi.label": "Register DOI", // TODO New key - Add a translation - "curation-task.task.register-doi.label": "Register DOI", + "curation-task.task.registerdoi.label": "Register DOI", diff --git a/src/assets/i18n/it.json5 b/src/assets/i18n/it.json5 index 1a97eca501..4fc07cebdf 100644 --- a/src/assets/i18n/it.json5 +++ b/src/assets/i18n/it.json5 @@ -2160,9 +2160,9 @@ // "curation-task.task.vscan.label": "Virus Scan", "curation-task.task.vscan.label": "Scansione antivirus", - // "curation-task.task.register-doi.label": "Register DOI", + // "curation-task.task.registerdoi.label": "Register DOI", // TODO New key - Add a translation - "curation-task.task.register-doi.label": "Register DOI", + "curation-task.task.registerdoi.label": "Register DOI", diff --git a/src/assets/i18n/pt-PT.json5 b/src/assets/i18n/pt-PT.json5 index 622f8cc48b..5aa4817e88 100644 --- a/src/assets/i18n/pt-PT.json5 +++ b/src/assets/i18n/pt-PT.json5 @@ -2054,8 +2054,8 @@ // "curation-task.task.vscan.label": "Virus Scan", "curation-task.task.vscan.label": "Scan de vírus", - // "curation-task.task.register-doi.label": "Register DOI", - "curation-task.task.register-doi.label": "Registo DOI", + // "curation-task.task.registerdoi.label": "Register DOI", + "curation-task.task.registerdoi.label": "Registo DOI", // "curation.form.task-select.label": "Task:", "curation.form.task-select.label": "Tarefa:", diff --git a/src/assets/i18n/vi.json5 b/src/assets/i18n/vi.json5 index f254df34fe..f9fb33ebcb 100644 --- a/src/assets/i18n/vi.json5 +++ b/src/assets/i18n/vi.json5 @@ -671,7 +671,7 @@ "curation-task.task.citationpage.label": "Tạo trang trích dẫn", "curation-task.task.noop.label": "NOOP", "curation-task.task.profileformats.label": "Định dạng tệp tin", - "curation-task.task.register-doi.label": "Đăng ký DOI", + "curation-task.task.registerdoi.label": "Đăng ký DOI", "curation-task.task.requiredmetadata.label": "Kiểm tra các trường dữ liệu bắt buộc", "curation-task.task.translate.label": "Bộ dịch của Microsoft", "curation-task.task.vscan.label": "Quét Virus", From 07a2e333ca5cb0f55178f9352d93b09f4fb311b2 Mon Sep 17 00:00:00 2001 From: Alexandre Vryghem Date: Sat, 26 Aug 2023 22:02:33 +0200 Subject: [PATCH 0041/1529] Implemented i18n cache busting --- package.json | 2 +- .../translate-browser.loader.ts | 4 +- .../translate-server.loader.ts | 3 +- webpack/helpers.ts | 47 +++++++++++++++---- webpack/webpack.common.ts | 11 +++-- 5 files changed, 53 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 719b13b23b..a2dd76d01b 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "analyze": "webpack-bundle-analyzer dist/browser/stats.json", "build": "ng build --configuration development", "build:stats": "ng build --stats-json", - "build:prod": "yarn run build:ssr", + "build:prod": "cross-env NODE_ENV=production yarn run build:ssr", "build:ssr": "ng build --configuration production && ng run dspace-angular:server:production", "test": "ng test --source-map=true --watch=false --configuration test", "test:watch": "nodemon --exec \"ng test --source-map=true --watch=true --configuration test\"", diff --git a/src/ngx-translate-loaders/translate-browser.loader.ts b/src/ngx-translate-loaders/translate-browser.loader.ts index a6188c9f15..85d59c96f0 100644 --- a/src/ngx-translate-loaders/translate-browser.loader.ts +++ b/src/ngx-translate-loaders/translate-browser.loader.ts @@ -5,6 +5,7 @@ import { NGX_TRANSLATE_STATE, NgxTranslateState } from './ngx-translate-state'; import { hasValue } from '../app/shared/empty.util'; import { map } from 'rxjs/operators'; import { of as observableOf, Observable } from 'rxjs'; +import { environment } from '../environments/environment'; /** * A TranslateLoader for ngx-translate to retrieve i18n messages from the TransferState, or download @@ -33,9 +34,10 @@ export class TranslateBrowserLoader implements TranslateLoader { if (hasValue(messages)) { return observableOf(messages); } else { + const translationHash: string = environment.production ? `.${(process.env.languageHashes as any)[lang + '.json5']}` : ''; // If they're not available on the transfer state (e.g. when running in dev mode), retrieve // them using HttpClient - return this.http.get('' + this.prefix + lang + this.suffix, { responseType: 'text' }).pipe( + return this.http.get(`${this.prefix}${lang}${translationHash}${this.suffix}`, { responseType: 'text' }).pipe( map((json: any) => JSON.parse(json)) ); } diff --git a/src/ngx-translate-loaders/translate-server.loader.ts b/src/ngx-translate-loaders/translate-server.loader.ts index c09c71f049..1f47dfe95b 100644 --- a/src/ngx-translate-loaders/translate-server.loader.ts +++ b/src/ngx-translate-loaders/translate-server.loader.ts @@ -23,8 +23,9 @@ export class TranslateServerLoader implements TranslateLoader { * @param lang the language code */ public getTranslation(lang: string): Observable { + const translationHash: string = (process.env.languageHashes as any)[lang + '.json5']; // Retrieve the file for the given language, and parse it - const messages = JSON.parse(readFileSync(`${this.prefix}${lang}${this.suffix}`, 'utf8')); + const messages = JSON.parse(readFileSync(`${this.prefix}${lang}.${translationHash}${this.suffix}`, 'utf8')); // Store the parsed messages in the transfer state so they'll be available immediately when the // app loads on the client this.storeInTransferState(lang, messages); diff --git a/webpack/helpers.ts b/webpack/helpers.ts index 43855f6c72..f0b42a8a69 100644 --- a/webpack/helpers.ts +++ b/webpack/helpers.ts @@ -1,18 +1,49 @@ -const path = require('path'); +import { readFileSync, readdirSync, statSync, Stats } from 'fs'; +import { join, resolve } from 'path'; + +const md5 = require('md5'); export const projectRoot = (relativePath) => { - return path.resolve(__dirname, '..', relativePath); + return resolve(__dirname, '..', relativePath); }; export const globalCSSImports = () => { return [ - projectRoot(path.join('src', 'styles', '_variables.scss')), - projectRoot(path.join('src', 'styles', '_mixins.scss')), + projectRoot(join('src', 'styles', '_variables.scss')), + projectRoot(join('src', 'styles', '_mixins.scss')), ]; }; +/** + * Calculates the md5 hash of a file + * + * @param filePath The path of the file + */ +export function calculateFileHash(filePath: string): string { + const fileContent: Buffer = readFileSync(filePath); + return md5(fileContent); +} -module.exports = { - projectRoot, - globalCSSImports -}; +/** + * Calculate the hashes of all the files (matching the given regex) in a certain folder + * + * @param folderPath The path of the folder + * @param regExp A regex of the files in the folder for which a hash needs to be generated + */ +export function getFileHashes(folderPath: string, regExp: RegExp): { [fileName: string]: string } { + const files: string[] = readdirSync(folderPath); + let hashes: { [fileName: string]: string } = {}; + + for (const file of files) { + if (file.match(regExp)) { + const filePath: string = join(folderPath, file); + const stats: Stats = statSync(filePath); + + if (stats.isFile()) { + hashes[file] = calculateFileHash(filePath); + } + } + } + + return hashes; +} diff --git a/webpack/webpack.common.ts b/webpack/webpack.common.ts index 1a1ecfd6ef..8d433edf39 100644 --- a/webpack/webpack.common.ts +++ b/webpack/webpack.common.ts @@ -1,4 +1,5 @@ -import { globalCSSImports, projectRoot } from './helpers'; +import { globalCSSImports, projectRoot, getFileHashes, calculateFileHash } from './helpers'; +import { EnvironmentPlugin } from 'webpack'; const CopyWebpackPlugin = require('copy-webpack-plugin'); const path = require('path'); @@ -18,12 +19,13 @@ export const copyWebpackOptions = { // use [\/|\\] to match both POSIX and Windows separators const matches = absoluteFilename.match(/.*[\/|\\]assets[\/|\\](.+)\.json5$/); if (matches) { + const fileHash: string = process.env.NODE_ENV === 'production' ? `.${calculateFileHash(absoluteFilename)}` : ''; // matches[1] is the relative path from src/assets to the JSON5 file, without the extension - return path.join('assets', matches[1] + '.json'); + return path.join('assets', `${matches[1]}${fileHash}.json`); } }, transform(content) { - return JSON.stringify(JSON5.parse(content.toString())) + return JSON.stringify(JSON5.parse(content.toString())); } }, { @@ -77,6 +79,9 @@ const SCSS_LOADERS = [ export const commonExports = { plugins: [ + new EnvironmentPlugin({ + languageHashes: getFileHashes(path.join(__dirname, '..', 'src', 'assets', 'i18n'), /.*\.json5/g), + }), new CopyWebpackPlugin(copyWebpackOptions), ], module: { From 13c0cb48ed9fd02a421fdcdfae3c578130f4c985 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Mon, 28 Aug 2023 13:53:19 -0500 Subject: [PATCH 0042/1529] Update to latest cypress (cherry picked from commit 68a3323fcaf9b97d260f5032c9eb2fa5f6096bc2) --- package.json | 2 +- yarn.lock | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 36 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 06d7063240..0cb2b8d41f 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "compression-webpack-plugin": "^9.2.0", "copy-webpack-plugin": "^6.4.1", "cross-env": "^7.0.3", - "cypress": "12.10.0", + "cypress": "12.17.4", "cypress-axe": "^1.4.0", "deep-freeze": "0.0.1", "eslint": "^8.39.0", diff --git a/yarn.lock b/yarn.lock index e53a070d16..a7c8af6c04 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1551,10 +1551,10 @@ resolved "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.2.0.tgz" integrity sha512-+OJ9konv95ClSTOJCmMZqpd5+YGsB2S+x6w3E1oaM8UuR5j8nTNHYSz8c9BEPGDOCMQYIEEGlVPj/VY64iTbGw== -"@cypress/request@^2.88.10": - version "2.88.11" - resolved "https://registry.npmjs.org/@cypress/request/-/request-2.88.11.tgz" - integrity sha512-M83/wfQ1EkspjkE2lNWNV5ui2Cv7UCv1swW1DqljahbzLVWltcsexQh8jYtuS/vzFXP+HySntGM83ZXA9fn17w== +"@cypress/request@2.88.12": + version "2.88.12" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590" + integrity sha512-tOn+0mDZxASFM+cuAP9szGUGPI1HwWVSvdzm7V4cCsPdFTx6qMj29CwaQmRAMIEhORIUBFBsYROYJcveK4uOjA== dependencies: aws-sign2 "~0.7.0" aws4 "^1.8.0" @@ -1571,7 +1571,7 @@ performance-now "^2.1.0" qs "~6.10.3" safe-buffer "^5.1.2" - tough-cookie "~2.5.0" + tough-cookie "^4.1.3" tunnel-agent "^0.6.0" uuid "^8.3.2" @@ -2457,11 +2457,16 @@ resolved "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz" integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== -"@types/node@*", "@types/node@>=10.0.0", "@types/node@^14.14.31", "@types/node@^14.14.9": +"@types/node@*", "@types/node@>=10.0.0", "@types/node@^14.14.9": version "14.18.42" resolved "https://registry.npmjs.org/@types/node/-/node-14.18.42.tgz" integrity sha512-xefu+RBie4xWlK8hwAzGh3npDz/4VhF6icY/shU+zv/1fNn+ZVG7T7CRwe9LId9sAYRPxI+59QBPuKL3WpyGRg== +"@types/node@^16.18.39": + version "16.18.46" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.46.tgz#9f2102d0ba74a318fcbe170cbff5463f119eab59" + integrity sha512-Mnq3O9Xz52exs3mlxMcQuA7/9VFe/dXcrgAyfjLkABIqxXKOgBRjyazTxUbjsxDa4BP7hhPliyjVTP9RDP14xg== + "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz" @@ -4437,14 +4442,14 @@ cypress-axe@^1.4.0: resolved "https://registry.yarnpkg.com/cypress-axe/-/cypress-axe-1.4.0.tgz#e67482bfe9e740796bf77c7823f19781a8a2faff" integrity sha512-Ut7NKfzjyKm0BEbt2WxuKtLkIXmx6FD2j0RwdvO/Ykl7GmB/qRQkwbKLk3VP35+83hiIr8GKD04PDdrTK5BnyA== -cypress@12.10.0: - version "12.10.0" - resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.10.0.tgz#b6264f77c214d63530ebac2b33c4d099bd40b715" - integrity sha512-Y0wPc221xKKW1/4iAFCphkrG2jNR4MjOne3iGn4mcuCaE7Y5EtXL83N8BzRsAht7GYfWVjJ/UeTqEdDKHz39HQ== +cypress@12.17.4: + version "12.17.4" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.17.4.tgz#b4dadf41673058493fa0d2362faa3da1f6ae2e6c" + integrity sha512-gAN8Pmns9MA5eCDFSDJXWKUpaL3IDd89N9TtIupjYnzLSmlpVr+ZR+vb4U/qaMp+lB6tBvAmt7504c3Z4RU5KQ== dependencies: - "@cypress/request" "^2.88.10" + "@cypress/request" "2.88.12" "@cypress/xvfb" "^1.2.4" - "@types/node" "^14.14.31" + "@types/node" "^16.18.39" "@types/sinonjs__fake-timers" "8.1.1" "@types/sizzle" "^2.3.2" arch "^2.2.0" @@ -4477,9 +4482,10 @@ cypress@12.10.0: minimist "^1.2.8" ospath "^1.2.2" pretty-bytes "^5.6.0" + process "^0.11.10" proxy-from-env "1.0.0" request-progress "^3.0.0" - semver "^7.3.2" + semver "^7.5.3" supports-color "^8.1.1" tmp "~0.2.1" untildify "^4.0.0" @@ -9267,6 +9273,11 @@ process-nextick-args@~2.0.0: resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz" @@ -10131,7 +10142,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8: +semver@^7.0.0, semver@^7.1.1, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -10912,6 +10923,16 @@ tough-cookie@^4.0.0, tough-cookie@^4.1.2: universalify "^0.2.0" url-parse "^1.5.3" +tough-cookie@^4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.1.3.tgz#97b9adb0728b42280aa3d814b6b999b2ff0318bf" + integrity sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.2.0" + url-parse "^1.5.3" + tough-cookie@~2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz" From 7ebdc43ca2c5c2d8826da036aa9253158e7ad416 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Mon, 28 Aug 2023 13:55:05 -0500 Subject: [PATCH 0043/1529] Update to latest axe-core (cherry picked from commit 50899f1d1b16e322e323507ad7dd42e5173cfbe5) --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0cb2b8d41f..849002f60e 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "@types/sanitize-html": "^2.9.0", "@typescript-eslint/eslint-plugin": "^5.59.1", "@typescript-eslint/parser": "^5.59.1", - "axe-core": "^4.7.0", + "axe-core": "^4.7.2", "compression-webpack-plugin": "^9.2.0", "copy-webpack-plugin": "^6.4.1", "cross-env": "^7.0.3", diff --git a/yarn.lock b/yarn.lock index a7c8af6c04..58ddfaca4b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3363,10 +3363,10 @@ aws4@^1.8.0: resolved "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz" integrity sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg== -axe-core@^4.7.0: - version "4.7.0" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf" - integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ== +axe-core@^4.7.2: + version "4.7.2" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.2.tgz#040a7342b20765cb18bb50b628394c21bccc17a0" + integrity sha512-zIURGIS1E1Q4pcrMjp+nnEh+16G56eG/MUllJH8yEvw7asDo7Ac9uhC9KIH5jzpITueEZolfYglnCGIuSBz39g== axios@0.21.4: version "0.21.4" From baecf2ac111ea4b528ea9893d00d7cee22e4d3a8 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 29 Aug 2023 11:41:03 -0500 Subject: [PATCH 0044/1529] Reenable accessibility check fixed in #2251 (cherry picked from commit 158ebb0e3268a314e18bc4855457166d8b57f2e8) --- cypress/e2e/community-list.cy.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/cypress/e2e/community-list.cy.ts b/cypress/e2e/community-list.cy.ts index 7b60b59dbc..d91260eca1 100644 --- a/cypress/e2e/community-list.cy.ts +++ b/cypress/e2e/community-list.cy.ts @@ -13,13 +13,6 @@ describe('Community List Page', () => { cy.get('[data-test="expand-button"]').click({ multiple: true }); // Analyze for accessibility issues - // Disable heading-order checks until it is fixed - testA11y('ds-community-list-page', - { - rules: { - 'heading-order': { enabled: false } - } - } as Options - ); + testA11y('ds-community-list-page'); }); }); From a7a807c0bb9b736ea9aa04860ae9ce8035ba5eac Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 29 Aug 2023 11:43:36 -0500 Subject: [PATCH 0045/1529] Enable excessibility checking of login menu, and remove unnecessary exclusion from header (cherry picked from commit 339ed63734d4192fb37a12e67b0395aa1669acdb) --- cypress/e2e/header.cy.ts | 3 +-- cypress/e2e/login-modal.cy.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/header.cy.ts b/cypress/e2e/header.cy.ts index 236208db68..1a9b841eb7 100644 --- a/cypress/e2e/header.cy.ts +++ b/cypress/e2e/header.cy.ts @@ -11,8 +11,7 @@ describe('Header', () => { testA11y({ include: ['ds-header'], exclude: [ - ['#search-navbar-container'], // search in navbar has duplicative ID. Will be fixed in #1174 - ['.dropdownLogin'] // "Log in" link has color contrast issues. Will be fixed in #1149 + ['#search-navbar-container'] // search in navbar has duplicative ID. Will be fixed in #1174 ], }); }); diff --git a/cypress/e2e/login-modal.cy.ts b/cypress/e2e/login-modal.cy.ts index b169634cfa..d29c13c2f9 100644 --- a/cypress/e2e/login-modal.cy.ts +++ b/cypress/e2e/login-modal.cy.ts @@ -1,4 +1,5 @@ import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e'; +import { testA11y } from 'cypress/support/utils'; const page = { openLoginMenu() { @@ -123,4 +124,15 @@ describe('Login Modal', () => { cy.location('pathname').should('eq', '/forgot'); cy.get('ds-forgot-email').should('exist'); }); + + it('should pass accessibility tests', () => { + cy.visit('/'); + + page.openLoginMenu(); + + cy.get('ds-log-in').should('exist'); + + // Analyze for accessibility issues + testA11y('ds-log-in'); + }); }); From 13ead8174abf4ab630b40e10002a17e3f988a79a Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 29 Aug 2023 11:44:03 -0500 Subject: [PATCH 0046/1529] Fix heading order issue with item page & update accessibility tests to prove it now passes (cherry picked from commit ba244bf6b14bfed06f1b1052cc6407f2537a175b) --- cypress/e2e/item-page.cy.ts | 20 ++++++++++--------- .../item-page-title-field.component.html | 4 ++-- .../metadata-field-wrapper.component.html | 2 +- .../metadata-field-wrapper.component.scss | 3 +++ 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/cypress/e2e/item-page.cy.ts b/cypress/e2e/item-page.cy.ts index 9eed711776..9dba6eb8ce 100644 --- a/cypress/e2e/item-page.cy.ts +++ b/cypress/e2e/item-page.cy.ts @@ -1,4 +1,3 @@ -import { Options } from 'cypress-axe'; import { TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e'; import { testA11y } from 'cypress/support/utils'; @@ -19,13 +18,16 @@ describe('Item Page', () => { cy.get('ds-item-page').should('be.visible'); // Analyze for accessibility issues - // Disable heading-order checks until it is fixed - testA11y('ds-item-page', - { - rules: { - 'heading-order': { enabled: false } - } - } as Options - ); + testA11y('ds-item-page'); + }); + + it('should pass accessibility tests on full item page', () => { + cy.visit(ENTITYPAGE + '/full'); + + // tag must be loaded + cy.get('ds-full-item-page').should('be.visible'); + + // Analyze for accessibility issues + testA11y('ds-full-item-page'); }); }); diff --git a/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.html b/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.html index 15960bdc9d..85975d4533 100644 --- a/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.html +++ b/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.html @@ -1,6 +1,6 @@ -

+

{{ type.toLowerCase() + '.page.titleprefix' | translate }}
{{ dsoNameService.getName(item) }} -

+ diff --git a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.html b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.html index d69f87883b..7748e385ca 100644 --- a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.html +++ b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.html @@ -1,5 +1,5 @@
-
{{ label }}
+

{{ label }}

diff --git a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.scss b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.scss index 75dfd09d0d..bf17d63d6c 100644 --- a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.scss +++ b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.scss @@ -2,4 +2,7 @@ .simple-view-element { margin-bottom: 15px; } + .simple-view-element-header { + font-size: 1.25rem; + } } From b90d102e5e252e1bd4bb2b36b02508e36d94da30 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 29 Aug 2023 14:58:49 -0500 Subject: [PATCH 0047/1529] Update ng2-nouislider and nouislider to latest versions (cherry picked from commit 91d8b7e4f7187b68f70c1cf2906f4e6e8d8af2b9) --- package.json | 4 ++-- src/styles/_vendor.scss | 2 +- yarn.lock | 18 ++++++++++-------- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 849002f60e..9aec4e0823 100644 --- a/package.json +++ b/package.json @@ -116,12 +116,12 @@ "morgan": "^1.10.0", "ng-mocks": "^14.10.0", "ng2-file-upload": "1.4.0", - "ng2-nouislider": "^1.8.3", + "ng2-nouislider": "^2.0.0", "ngx-infinite-scroll": "^15.0.0", "ngx-pagination": "6.0.3", "ngx-sortablejs": "^11.1.0", "ngx-ui-switch": "^14.0.3", - "nouislider": "^14.6.3", + "nouislider": "^15.7.1", "pem": "1.14.7", "prop-types": "^15.8.1", "react-copy-to-clipboard": "^5.1.0", diff --git a/src/styles/_vendor.scss b/src/styles/_vendor.scss index 9d9842b9b3..b2b94c2826 100644 --- a/src/styles/_vendor.scss +++ b/src/styles/_vendor.scss @@ -1,5 +1,5 @@ // node_modules imports meant for all the themes @import '~node_modules/bootstrap/scss/bootstrap.scss'; -@import '~node_modules/nouislider/distribute/nouislider.min'; +@import '~node_modules/nouislider/dist/nouislider.min'; @import '~node_modules/ngx-ui-switch/ui-switch.component.scss'; diff --git a/yarn.lock b/yarn.lock index 58ddfaca4b..44625c4bd0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8197,10 +8197,12 @@ ng2-file-upload@1.4.0: dependencies: tslib "^1.9.0" -ng2-nouislider@^1.8.3: - version "1.8.3" - resolved "https://registry.npmjs.org/ng2-nouislider/-/ng2-nouislider-1.8.3.tgz" - integrity sha512-Vl8tHCcJ/ioJLAs2t6FBC35sZq1P/O5ZdqdFwYxOCOMVbILGWNg+2gWZIjFstvv9pqb/mVvVUYe6qGG/mA/RBQ== +ng2-nouislider@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ng2-nouislider/-/ng2-nouislider-2.0.0.tgz#a62fd6cf3f1561be19a2691c2f68d21a46dc6006" + integrity sha512-NGbF/0w0+bZqclpSPFOlWIeVJaVwRRYFJzD1x8PClbw9GIeo7fCHoBzZ81y7K7FTJg6to+cgjSTFETPZG/Dizg== + dependencies: + tslib "^2.3.0" ngx-infinite-scroll@^15.0.0: version "15.0.0" @@ -8343,10 +8345,10 @@ normalize-url@^4.5.0: resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== -nouislider@^14.6.3: - version "14.7.0" - resolved "https://registry.npmjs.org/nouislider/-/nouislider-14.7.0.tgz" - integrity sha512-4RtQ1+LHJKesDCNJrXkQcwXAWCrC2aggdLYMstS/G5fEWL+fXZbUA9pwVNHFghMGuFGRATlDLNInRaPeRKzpFQ== +nouislider@^15.7.1: + version "15.7.1" + resolved "https://registry.yarnpkg.com/nouislider/-/nouislider-15.7.1.tgz#77d55e47d9b4cd771728515713df43b489db9705" + integrity sha512-5N7C1ru/i8y3dg9+Z6ilj6+m1EfabvOoaRa7ztpxBSKKRZso4vA52DGSbBJjw5XLtFr/LZ9SgGAXqyVtlVHO5w== npm-bundled@^3.0.0: version "3.0.0" From 3cdcdaf475f19e2d264c4e3685cf94ac2fc847c5 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 29 Aug 2023 15:01:21 -0500 Subject: [PATCH 0048/1529] Fix accessibility of date sliders by adding aria-labels (cherry picked from commit 2a881791ba76091d2f85d0b068f926043ef33bc9) --- cypress/e2e/my-dspace.cy.ts | 6 +--- cypress/e2e/search-page.cy.ts | 6 +--- .../search-range-filter.component.html | 10 +++---- .../search-range-filter.component.ts | 29 +++++++++++++++++++ 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/cypress/e2e/my-dspace.cy.ts b/cypress/e2e/my-dspace.cy.ts index 79786c298a..af4aab41f3 100644 --- a/cypress/e2e/my-dspace.cy.ts +++ b/cypress/e2e/my-dspace.cy.ts @@ -22,15 +22,11 @@ describe('My DSpace page', () => { testA11y( { include: ['ds-my-dspace-page'], - exclude: [ - ['nouislider'] // Date filter slider is missing ARIA labels. Will be fixed by #1175 - ], }, { rules: { - // Search filters fail these two "moderate" impact rules + // Search filters fail this "moderate" impact rules 'heading-order': { enabled: false }, - 'landmark-unique': { enabled: false } } } as Options ); diff --git a/cypress/e2e/search-page.cy.ts b/cypress/e2e/search-page.cy.ts index 24519cc236..0d4f70ef03 100644 --- a/cypress/e2e/search-page.cy.ts +++ b/cypress/e2e/search-page.cy.ts @@ -30,15 +30,11 @@ describe('Search Page', () => { testA11y( { include: ['ds-search-page'], - exclude: [ - ['nouislider'] // Date filter slider is missing ARIA labels. Will be fixed by #1175 - ], }, { rules: { - // Search filters fail these two "moderate" impact rules + // Search filters fail this "moderate" impact rule 'heading-order': { enabled: false }, - 'landmark-unique': { enabled: false } } } as Options ); diff --git a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.html b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.html index 7834c4c557..251e5ac420 100644 --- a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.html @@ -9,8 +9,8 @@
@@ -21,8 +21,8 @@ @@ -33,7 +33,7 @@ - diff --git a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts index 938f67412e..ed20e63c52 100644 --- a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts @@ -2,6 +2,7 @@ import { BehaviorSubject, combineLatest as observableCombineLatest, Subscription import { map, startWith } from 'rxjs/operators'; import { isPlatformBrowser } from '@angular/common'; import { Component, Inject, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core'; +import { TranslateService } from '@ngx-translate/core'; import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service'; import { FilterType } from '../../../models/filter-type.model'; import { renderFacetFor } from '../search-filter-type-decorator'; @@ -53,11 +54,27 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple */ min = 1950; + /** + * i18n Label to use for minimum field + */ + minLabel: string; + /** * Fallback maximum for the range */ max = new Date().getUTCFullYear(); + /** + * i18n Label to use for maximum field + */ + maxLabel: string; + + /** + * Base configuration for nouislider + * https://refreshless.com/nouislider/slider-options/ + */ + config = {}; + /** * The current range of the filter */ @@ -78,6 +95,7 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple protected filterService: SearchFilterService, protected router: Router, protected rdbs: RemoteDataBuildService, + private translateService: TranslateService, @Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService, @Inject(IN_PLACE_SEARCH) public inPlaceSearch: boolean, @Inject(FILTER_CONFIG) public filterConfig: SearchFilterConfig, @@ -96,6 +114,8 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple super.ngOnInit(); this.min = yearFromString(this.filterConfig.minValue) || this.min; this.max = yearFromString(this.filterConfig.maxValue) || this.max; + this.minLabel = this.translateService.instant('search.filters.filter.' + this.filterConfig.name + '.min.placeholder'); + this.maxLabel = this.translateService.instant('search.filters.filter.' + this.filterConfig.name + '.max.placeholder'); const iniMin = this.route.getQueryParameterValue(this.filterConfig.paramName + RANGE_FILTER_MIN_SUFFIX).pipe(startWith(undefined)); const iniMax = this.route.getQueryParameterValue(this.filterConfig.paramName + RANGE_FILTER_MAX_SUFFIX).pipe(startWith(undefined)); this.sub = observableCombineLatest(iniMin, iniMax).pipe( @@ -105,6 +125,15 @@ export class SearchRangeFilterComponent extends SearchFacetFilterComponent imple return [minimum, maximum]; }) ).subscribe((minmax) => this.range = minmax); + + // Default/base config for nouislider + this.config = { + // Ensure draggable handles have labels + handleAttributes: [ + { 'aria-label': this.minLabel }, + { 'aria-label': this.maxLabel }, + ], + }; } /** From 6df76515ba0980709049ee288e2b2b737bf3614b Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 29 Aug 2023 15:01:51 -0500 Subject: [PATCH 0049/1529] Minor fixes to cypress tests (cherry picked from commit 70a7bbe3cbdd24abaf7f6f791ef60e88a3ae8922) --- cypress/e2e/community-list.cy.ts | 1 - cypress/e2e/pagenotfound.cy.ts | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/community-list.cy.ts b/cypress/e2e/community-list.cy.ts index d91260eca1..c371f6ceae 100644 --- a/cypress/e2e/community-list.cy.ts +++ b/cypress/e2e/community-list.cy.ts @@ -1,4 +1,3 @@ -import { Options } from 'cypress-axe'; import { testA11y } from 'cypress/support/utils'; describe('Community List Page', () => { diff --git a/cypress/e2e/pagenotfound.cy.ts b/cypress/e2e/pagenotfound.cy.ts index 43e3c3af24..d02aa8541c 100644 --- a/cypress/e2e/pagenotfound.cy.ts +++ b/cypress/e2e/pagenotfound.cy.ts @@ -1,8 +1,13 @@ +import { testA11y } from 'cypress/support/utils'; + describe('PageNotFound', () => { it('should contain element ds-pagenotfound when navigating to page that doesnt exist', () => { // request an invalid page (UUIDs at root path aren't valid) cy.visit('/e9019a69-d4f1-4773-b6a3-bd362caa46f2', { failOnStatusCode: false }); cy.get('ds-pagenotfound').should('be.visible'); + + // Analyze for accessibility issues + testA11y('ds-pagenotfound'); }); it('should not contain element ds-pagenotfound when navigating to existing page', () => { From 63c752b3f4ad2d4a04438dd66f97c8ffff9ca87b Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 29 Aug 2023 15:10:12 -0500 Subject: [PATCH 0050/1529] Fix heading order accessibility issue in search filters/facets (cherry picked from commit 276d80895e38225fcbde38cab01d79cd31a34e9b) --- cypress/e2e/my-dspace.cy.ts | 12 +----------- cypress/e2e/search-page.cy.ts | 12 +----------- .../search-filter/search-filter.component.html | 4 ++-- .../shared/sidebar/sidebar-dropdown.component.html | 2 +- src/themes/dspace/styles/_global-styles.scss | 2 +- 5 files changed, 6 insertions(+), 26 deletions(-) diff --git a/cypress/e2e/my-dspace.cy.ts b/cypress/e2e/my-dspace.cy.ts index af4aab41f3..13f4a1b547 100644 --- a/cypress/e2e/my-dspace.cy.ts +++ b/cypress/e2e/my-dspace.cy.ts @@ -19,17 +19,7 @@ describe('My DSpace page', () => { cy.get('.filter-toggle').click({ multiple: true }); // Analyze for accessibility issues - testA11y( - { - include: ['ds-my-dspace-page'], - }, - { - rules: { - // Search filters fail this "moderate" impact rules - 'heading-order': { enabled: false }, - } - } as Options - ); + testA11y('ds-my-dspace-page'); }); it('should have a working detailed view that passes accessibility tests', () => { diff --git a/cypress/e2e/search-page.cy.ts b/cypress/e2e/search-page.cy.ts index 0d4f70ef03..755f8eaac6 100644 --- a/cypress/e2e/search-page.cy.ts +++ b/cypress/e2e/search-page.cy.ts @@ -27,17 +27,7 @@ describe('Search Page', () => { cy.get('[data-test="filter-toggle"]').click({ multiple: true }); // Analyze for accessibility issues - testA11y( - { - include: ['ds-search-page'], - }, - { - rules: { - // Search filters fail this "moderate" impact rule - 'heading-order': { enabled: false }, - } - } as Options - ); + testA11y('ds-search-page'); }); it('should have a working grid view that passes accessibility tests', () => { diff --git a/src/app/shared/search/search-filters/search-filter/search-filter.component.html b/src/app/shared/search/search-filters/search-filter/search-filter.component.html index a6fb0021b7..421d1ede2c 100644 --- a/src/app/shared/search/search-filters/search-filter/search-filter.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-filter.component.html @@ -6,9 +6,9 @@ [attr.aria-label]="(((collapsed$ | async) ? 'search.filters.filter.expand' : 'search.filters.filter.collapse') | translate) + ' ' + (('search.filters.filter.' + filter.name + '.head') | translate | lowercase)" [attr.data-test]="'filter-toggle' | dsBrowserOnly" > -
+

{{'search.filters.filter.' + filter.name + '.head'| translate}} -

+ diff --git a/src/app/shared/sidebar/sidebar-dropdown.component.html b/src/app/shared/sidebar/sidebar-dropdown.component.html index 0c2a1c05d2..2eadac09f7 100644 --- a/src/app/shared/sidebar/sidebar-dropdown.component.html +++ b/src/app/shared/sidebar/sidebar-dropdown.component.html @@ -1,5 +1,5 @@
-
+

diff --git a/src/themes/dspace/styles/_global-styles.scss b/src/themes/dspace/styles/_global-styles.scss index e41dae0e3f..5bd4c19bc0 100644 --- a/src/themes/dspace/styles/_global-styles.scss +++ b/src/themes/dspace/styles/_global-styles.scss @@ -17,7 +17,7 @@ background-color: var(--bs-primary); } - h5 { + h4 { font-size: 1.1rem } } From d1ebf07456681dec8b804099aca6423603d8573c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Fern=C3=A1ndez=20Celorio?= Date: Tue, 22 Aug 2023 11:59:54 +0200 Subject: [PATCH 0051/1529] Spanish translation updated to 7.6 (cherry picked from commit 4cc4192e93aea3eb7dddc8486fe1fad35b6103bc) --- src/assets/i18n/es.json5 | 766 ++++++++++++++++++++------------------- 1 file changed, 385 insertions(+), 381 deletions(-) diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index bb9334cf11..24ce7159e3 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -9,8 +9,6 @@ // "401.unauthorized": "unauthorized", "401.unauthorized": "no autorizado", - - // "403.help": "You don't have permission to access this page. You can use the button below to get back to the home page.", "403.help": "No tiene permisos para acceder a esta página. Puede utilizar el botón de abajo para volver a la página de inicio.", @@ -29,7 +27,6 @@ // "500.link.home-page": "Take me to the home page", "500.link.home-page": "Llévame a la página de inicio", - // "404.help": "We can't find the page you're looking for. The page may have been moved or deleted. You can use the button below to get back to the home page. ", "404.help": "No podemos encontrar la página que busca. La página puede haber sido movida o eliminada. Puede utilizar el botón de abajo para volver a la página de inicio. ", @@ -52,7 +49,7 @@ "error-page.description.404": "página no encontrada", // "error-page.orcid.generic-error": "An error occurred during login via ORCID. Make sure you have shared your ORCID account email address with DSpace. If the error persists, contact the administrator", - "error-page.orcid.generic-error": "Hubo un error en el login via ORCID. Asegúrese que ha compartido el correo electrónico de su cuenta ORCID con Dspace. Si continuase el error, contacte con el administrador", + "error-page.orcid.generic-error": "Hubo un error en el login vía ORCID. Asegúrese que ha compartido el correo electrónico de su cuenta ORCID con Dspace. Si continuase el error, contacte con el administrador", // "access-status.embargo.listelement.badge": "Embargo", "access-status.embargo.listelement.badge": "Embargo", @@ -194,7 +191,8 @@ // "admin.registries.bitstream-formats.table.name": "Name", "admin.registries.bitstream-formats.table.name": "Nombre", - // "admin.registries.bitstream-formats.table.id" : "ID", + + // "admin.registries.bitstream-formats.table.id": "ID", "admin.registries.bitstream-formats.table.id": "ID", // "admin.registries.bitstream-formats.table.return": "Back", @@ -215,8 +213,6 @@ // "admin.registries.bitstream-formats.title": "Bitstream Format Registry", "admin.registries.bitstream-formats.title": "Registro de formato Archivo", - - // "admin.registries.metadata.breadcrumbs": "Metadata registry", "admin.registries.metadata.breadcrumbs": "Registro de metadatos", @@ -256,8 +252,6 @@ // "admin.registries.metadata.title": "Metadata Registry", "admin.registries.metadata.title": "Registro de metadatos", - - // "admin.registries.schema.breadcrumbs": "Metadata schema", "admin.registries.schema.breadcrumbs": "Esquema de metadatos", @@ -275,7 +269,8 @@ // "admin.registries.schema.fields.table.field": "Field", "admin.registries.schema.fields.table.field": "Campo", - // "admin.registries.schema.fields.table.id" : "ID", + + // "admin.registries.schema.fields.table.id": "ID", "admin.registries.schema.fields.table.id": "ID", // "admin.registries.schema.fields.table.scopenote": "Scope Note", @@ -335,7 +330,29 @@ // "admin.registries.schema.title": "Metadata Schema Registry", "admin.registries.schema.title": "Registro de esquemas de metadatos", + // "admin.access-control.bulk-access.breadcrumbs": "Bulk Access Management", + "admin.access-control.bulk-access.breadcrumbs": "Gestión de Acceso Masivo", + // "administrativeBulkAccess.search.results.head": "Search Results", + "administrativeBulkAccess.search.results.head": "Resultados de la búsqueda", + + // "admin.access-control.bulk-access": "Bulk Access Management", + "admin.access-control.bulk-access": "Gestión de Acceso Masivo", + + // "admin.access-control.bulk-access.title": "Bulk Access Management", + "admin.access-control.bulk-access.title": "Gestión de Acceso Masivo", + + // "admin.access-control.bulk-access-browse.header": "Step 1: Select Objects", + "admin.access-control.bulk-access-browse.header": "Paso 1: Seleccione Objetos", + + // "admin.access-control.bulk-access-browse.search.header": "Search", + "admin.access-control.bulk-access-browse.search.header": "Buscar", + + // "admin.access-control.bulk-access-browse.selected.header": "Current selection({{number}})", + "admin.access-control.bulk-access-browse.selected.header": "Selección actual({{number}})", + + // "admin.access-control.bulk-access-settings.header": "Step 2: Operation to Perform", + "admin.access-control.bulk-access-settings.header": "Paso 2: Operación a realizar", // "admin.access-control.epeople.actions.delete": "Delete EPerson", "admin.access-control.epeople.actions.delete": "Eliminar usuario", @@ -347,7 +364,7 @@ "admin.access-control.epeople.actions.reset": "Restablecer la contraseña", // "admin.access-control.epeople.actions.stop-impersonating": "Stop impersonating EPerson", - "admin.access-control.epeople.actions.stop-impersonating": "Deja de hacerse pasar por usuario", + "admin.access-control.epeople.actions.stop-impersonating": "Dejar de hacerse pasar por usuario", // "admin.access-control.epeople.breadcrumbs": "EPeople", "admin.access-control.epeople.breadcrumbs": "Usuarios", @@ -478,8 +495,6 @@ // "admin.access-control.epeople.notification.deleted.success": "Successfully deleted EPerson: \"{{name}}\"", "admin.access-control.epeople.notification.deleted.success": "Usuario eliminado correctamente: \"{{ name }}\"", - - // "admin.access-control.groups.title": "Groups", "admin.access-control.groups.title": "Grupos", @@ -549,8 +564,6 @@ // "admin.access-control.groups.notification.deleted.failure.content": "Cause: \"{{cause}}\"", "admin.access-control.groups.notification.deleted.failure.content": "Causa: \"{{ cause }}\"", - - // "admin.access-control.groups.form.alert.permanent": "This group is permanent, so it can't be edited or deleted. You can still add and remove group members using this page.", "admin.access-control.groups.form.alert.permanent": "Este grupo es permanente, por lo que no se puede editar ni eliminar. Sin embargo, puedes añadir y eliminar miembros del grupo utilizando esta página.", @@ -791,9 +804,6 @@ // "administrativeView.search.results.head": "Administrative Search", "administrativeView.search.results.head": "Búsqueda administrativa", - - - // "admin.workflow.breadcrumbs": "Administer Workflow", "admin.workflow.breadcrumbs": "Administrar flujo de trabajo", @@ -818,8 +828,6 @@ // "admin.workflow.item.supervision": "Supervision", "admin.workflow.item.supervision": "Supervisión", - - // "admin.metadata-import.breadcrumbs": "Import Metadata", "admin.metadata-import.breadcrumbs": "Importar metadatos", @@ -844,6 +852,9 @@ // "admin.batch-import.page.help": "Select the Collection to import into. Then, drop or browse to a Simple Archive Format (SAF) zip file that includes the Items to import", "admin.batch-import.page.help": "Seleccione la Colección a la que importar. Luego, suelte o busque el archivo zip en formato Simple Archive Format (SAF) que incluye los ítems a importar", + // "admin.batch-import.page.toggle.help": "It is possible to perform import either with file upload or via URL, use above toggle to set the input source", + "admin.batch-import.page.toggle.help": "Es posible realizar una importación tanto mediante una subida de fichero como a través de una URL. Use el selector de arriba para especificar la fuente de entrada.", + // "admin.metadata-import.page.dropMsg": "Drop a metadata CSV to import", "admin.metadata-import.page.dropMsg": "Suelta un CSV de metadatos para importar", @@ -863,14 +874,26 @@ "admin.metadata-import.page.button.proceed": "Continuar", // "admin.metadata-import.page.button.select-collection": "Select Collection", - "admin.metadata-import.page.button.select-collection": "Selecciona la Colleción", + "admin.metadata-import.page.button.select-collection": "Selecciona la Colección", // "admin.metadata-import.page.error.addFile": "Select file first!", "admin.metadata-import.page.error.addFile": "¡Seleccione el archivo primero!", + // "admin.metadata-import.page.error.addFileUrl": "Insert file url first!", + "admin.metadata-import.page.error.addFileUrl": "¡Seleccione primero la URL del archivo!", + // "admin.batch-import.page.error.addFile": "Select Zip file first!", "admin.batch-import.page.error.addFile": "¡Seleccione el archivo ZIP primero!", + // "admin.metadata-import.page.toggle.upload": "Upload", + "admin.metadata-import.page.toggle.upload": "Subir", + + // "admin.metadata-import.page.toggle.url": "URL", + "admin.metadata-import.page.toggle.url": "URL", + + // "admin.metadata-import.page.urlMsg": "Insert the batch ZIP url to import", + "admin.metadata-import.page.urlMsg": "¡Seleccione primero la URL del archivo ZIP!", + // "admin.metadata-import.page.validateOnly": "Validate Only", "admin.metadata-import.page.validateOnly": "Solo Validar", @@ -895,14 +918,12 @@ // "advanced-workflow-action.rating.description-requiredDescription": "Please select a rating below and also add a review", "advanced-workflow-action.rating.description-requiredDescription": "Por favor, seleccione una evaluación y también agregue una revisión", - // "advanced-workflow-action.select-reviewer.description-single": "Please select a single reviewer below before submitting", "advanced-workflow-action.select-reviewer.description-single": "Por favor, seleccione un revisor antes de realizar el envío", // "advanced-workflow-action.select-reviewer.description-multiple": "Please select one or more reviewers below before submitting", "advanced-workflow-action.select-reviewer.description-multiple": "Por favor, seleccione uno o mas revisores antes de realizar el envío", - // "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.head": "EPeople", "advanced-workflow-action-select-reviewer.groups.form.reviewers-list.head": "Usuario", @@ -987,15 +1008,12 @@ // "auth.messages.token-refresh-failed": "Refreshing your session token failed. Please log in again.", "auth.messages.token-refresh-failed": "No se pudo actualizar el token de la sesión. Inicie sesión de nuevo.", - - - // "bitstream.download.page": "Now downloading {{bitstream}}..." , + // "bitstream.download.page": "Now downloading {{bitstream}}...", "bitstream.download.page": "Descargando {{ bitstream }}...", - // "bitstream.download.page.back": "Back" , + // "bitstream.download.page.back": "Back", "bitstream.download.page.back": "Atrás" , - // "bitstream.edit.authorizations.link": "Edit bitstream's Policies", "bitstream.edit.authorizations.link": "Editar las políticas del archivo", @@ -1047,6 +1065,9 @@ // "bitstream.edit.notifications.error.format.title": "An error occurred saving the bitstream's format", "bitstream.edit.notifications.error.format.title": "Se produjo un error al guardar el formato del archivo.", + // "bitstream.edit.notifications.error.primaryBitstream.title": "An error occurred saving the primary bitstream", + "bitstream.edit.notifications.error.primaryBitstream.title": "Se produjo un error al guardar el archivo primario", + // "bitstream.edit.form.iiifLabel.label": "IIIF Label", "bitstream.edit.form.iiifLabel.label": "Etiqueta IIIF", @@ -1071,7 +1092,6 @@ // "bitstream.edit.form.iiifHeight.hint": "The canvas height should usually match the image height.", "bitstream.edit.form.iiifHeight.hint": "La altura del marco normalmente debería coincidir con la altura de la imagen", - // "bitstream.edit.notifications.saved.content": "Your changes to this bitstream were saved.", "bitstream.edit.notifications.saved.content": "Se guardaron sus cambios en este archivo.", @@ -1095,6 +1115,7 @@ // "bitstream-request-a-copy.intro.bitstream.one": "Requesting the following file: ", "bitstream-request-a-copy.intro.bitstream.one": "Solicitando el siguiente fichero: ", + // "bitstream-request-a-copy.intro.bitstream.all": "Requesting all files. ", "bitstream-request-a-copy.intro.bitstream.all": "Solicitando todos los ficheros. ", @@ -1137,8 +1158,6 @@ // "bitstream-request-a-copy.submit.error": "Something went wrong with submitting the item request.", "bitstream-request-a-copy.submit.error": "Hubo un fallo en el envío de la solicitud de ítem.", - - // "browse.back.all-results": "All browse results", "browse.back.all-results": "Todos los resultados de la búsqueda", @@ -1151,8 +1170,11 @@ // "browse.comcol.by.subject": "By Subject", "browse.comcol.by.subject": "Por materia", + // "browse.comcol.by.srsc": "By Subject Category", + "browse.comcol.by.srsc": "Por categoría", + // "browse.comcol.by.title": "By Title", - "browse.comcol.by.title": "Por titulo", + "browse.comcol.by.title": "Por título", // "browse.comcol.head": "Browse", "browse.comcol.head": "Examinar", @@ -1181,6 +1203,9 @@ // "browse.metadata.subject.breadcrumbs": "Browse by Subject", "browse.metadata.subject.breadcrumbs": "Examinar por materia", + // "browse.metadata.srsc.breadcrumbs": "Browse by Subject Category", + "browse.metadata.srsc.breadcrumbs": "Examinar por categoría", + // "browse.metadata.title.breadcrumbs": "Browse by Title", "browse.metadata.title.breadcrumbs": "Examinar por título", @@ -1262,21 +1287,24 @@ // "browse.startsWith.type_text": "Filter results by typing the first few letters", "browse.startsWith.type_text": "Seleccione resultados tecleando las primeras letras", + // "browse.startsWith.input": "Filter", + "browse.startsWith.input": "Filtrar", + + // "browse.taxonomy.button": "Browse", + "browse.taxonomy.button": "Examinar", + // "browse.title": "Browsing {{ collection }} by {{ field }}{{ startsWith }} {{ value }}", "browse.title": "Examinando {{ collection }} por {{ field }} {{ value }}", // "browse.title.page": "Browsing {{ collection }} by {{ field }} {{ value }}", "browse.title.page": "Examinando {{ collection }} por {{ field }} {{ value }}", - // "search.browse.item-back": "Back to Results", "search.browse.item-back": "Volver a los resultados", - // "chips.remove": "Remove chip", "chips.remove": "Quitar chip", - // "claimed-approved-search-result-list-element.title": "Approved", "claimed-approved-search-result-list-element.title": "Aprobado", @@ -1286,7 +1314,6 @@ // "claimed-declined-task-search-result-list-element.title": "Declined, sent back to Review Manager's workflow", "claimed-declined-task-search-result-list-element.title": "Declinado, enviar de vuelta al Administrador de Revisión del flujo de trabajo", - // "collection.create.head": "Create a Collection", "collection.create.head": "Crear una colección", @@ -1320,8 +1347,6 @@ // "collection.delete.text": "Are you sure you want to delete collection \"{{ dso }}\"", "collection.delete.text": "¿Estás seguro de que quieres eliminar la colección \"{{ dso }}\"?", - - // "collection.edit.delete": "Delete this collection", "collection.edit.delete": "Eliminar esta colección", @@ -1331,8 +1356,6 @@ // "collection.edit.breadcrumbs": "Edit Collection", "collection.edit.breadcrumbs": "Editar colección", - - // "collection.edit.tabs.mapper.head": "Item Mapper", "collection.edit.tabs.mapper.head": "Mapeo de ítems", @@ -1393,7 +1416,6 @@ // "collection.edit.item-mapper.tabs.map": "Map new items", "collection.edit.item-mapper.tabs.map": "Asignar nuevos ítems", - // "collection.edit.logo.delete.title": "Delete logo", "collection.edit.logo.delete.title": "Eliminar logo", @@ -1421,21 +1443,23 @@ // "collection.edit.logo.upload": "Drop a Collection Logo to upload", "collection.edit.logo.upload": "Suelta un logotipo de colección para cargarlo", - - // "collection.edit.notifications.success": "Successfully edited the Collection", "collection.edit.notifications.success": "Editó con éxito la colección", // "collection.edit.return": "Back", "collection.edit.return": "Atrás", + // "collection.edit.tabs.access-control.head": "Access Control", + "collection.edit.tabs.access-control.head": "Control de acceso", + // "collection.edit.tabs.access-control.title": "Collection Edit - Access Control", + "collection.edit.tabs.access-control.title": "Edición de colección: Control de acceso", // "collection.edit.tabs.curate.head": "Curate", "collection.edit.tabs.curate.head": "Curar", // "collection.edit.tabs.curate.title": "Collection Edit - Curate", - "collection.edit.tabs.curate.title": "Edición de colección - Curar", + "collection.edit.tabs.curate.title": "Edición de colección: Curar", // "collection.edit.tabs.authorizations.head": "Authorizations", "collection.edit.tabs.authorizations.head": "Autorizaciones", @@ -1518,8 +1542,6 @@ // "collection.edit.tabs.source.title": "Collection Edit - Content Source", "collection.edit.tabs.source.title": "Edición de colección: fuente de contenido", - - // "collection.edit.template.add-button": "Add", "collection.edit.template.add-button": "Agregar", @@ -1556,8 +1578,6 @@ // "collection.edit.template.title": "Edit Template Item", "collection.edit.template.title": "Editar plantilla de ítem", - - // "collection.form.abstract": "Short Description", "collection.form.abstract": "Breve descripción", @@ -1585,13 +1605,9 @@ // "collection.form.entityType": "Entity Type", "collection.form.entityType": "Tipo de entidad", - - // "collection.listelement.badge": "Collection", "collection.listelement.badge": "Colección", - - // "collection.page.browse.recent.head": "Recent Submissions", "collection.page.browse.recent.head": "Envíos recientes", @@ -1610,8 +1626,6 @@ // "collection.page.news": "News", "collection.page.news": "Noticias", - - // "collection.select.confirm": "Confirm selected", "collection.select.confirm": "Confirmar seleccionado", @@ -1621,63 +1635,81 @@ // "collection.select.table.title": "Title", "collection.select.table.title": "Título", - // "collection.source.controls.head": "Harvest Controls", "collection.source.controls.head": "Controles de recolección", + // "collection.source.controls.test.submit.error": "Something went wrong with initiating the testing of the settings", "collection.source.controls.test.submit.error": "Hubo fallos al realizar las pruebas de comprobación de los ajustes", + // "collection.source.controls.test.failed": "The script to test the settings has failed", "collection.source.controls.test.failed": "La prueba de los ajustes ha fallado", + // "collection.source.controls.test.completed": "The script to test the settings has successfully finished", "collection.source.controls.test.completed": "El script de prueba de los ajustes ha terminado correctamente", + // "collection.source.controls.test.submit": "Test configuration", "collection.source.controls.test.submit": "Probar la configuración", + // "collection.source.controls.test.running": "Testing configuration...", "collection.source.controls.test.running": "Probando la configuración...", + // "collection.source.controls.import.submit.success": "The import has been successfully initiated", "collection.source.controls.import.submit.success": "La importación ha comenzado correctamente", + // "collection.source.controls.import.submit.error": "Something went wrong with initiating the import", "collection.source.controls.import.submit.error": "Hubo algún fallo al iniciar la importación", + // "collection.source.controls.import.submit": "Import now", "collection.source.controls.import.submit": "Importar ahora", + // "collection.source.controls.import.running": "Importing...", "collection.source.controls.import.running": "Importando...", + // "collection.source.controls.import.failed": "An error occurred during the import", "collection.source.controls.import.failed": "Ha ocurrido un error durante la importación", + // "collection.source.controls.import.completed": "The import completed", "collection.source.controls.import.completed": "La importación finalizó", + // "collection.source.controls.reset.submit.success": "The reset and reimport has been successfully initiated", "collection.source.controls.reset.submit.success": "La restauración y reimportación ha comenzado correctamente", + // "collection.source.controls.reset.submit.error": "Something went wrong with initiating the reset and reimport", "collection.source.controls.reset.submit.error": "Ha ocurrido un error al iniciar la restauración y reimportación", + // "collection.source.controls.reset.failed": "An error occurred during the reset and reimport", "collection.source.controls.reset.failed": "Ha ocurrido un error en la restauración y reimportación", + // "collection.source.controls.reset.completed": "The reset and reimport completed", "collection.source.controls.reset.completed": "Restauración y reimportación finalizadas", + // "collection.source.controls.reset.submit": "Reset and reimport", "collection.source.controls.reset.submit": "Restauración y reimportación", + // "collection.source.controls.reset.running": "Resetting and reimporting...", "collection.source.controls.reset.running": "Restaurando y reimportando...", + // "collection.source.controls.harvest.status": "Harvest status:", "collection.source.controls.harvest.status": "Estado de la Recolección:", + // "collection.source.controls.harvest.start": "Harvest start time:", "collection.source.controls.harvest.start": "Comienzo de la recolección:", + // "collection.source.controls.harvest.last": "Last time harvested:", "collection.source.controls.harvest.last": "Fecha de la última recolección:", + // "collection.source.controls.harvest.message": "Harvest info:", "collection.source.controls.harvest.message": "Información de recolección:", + // "collection.source.controls.harvest.no-information": "N/A", "collection.source.controls.harvest.no-information": "N/A", - // "collection.source.update.notifications.error.content": "The provided settings have been tested and didn't work.", "collection.source.update.notifications.error.content": "La configuración proporcionada se ha probado y no funcionó.", // "collection.source.update.notifications.error.title": "Server Error", "collection.source.update.notifications.error.title": "Error del Servidor", - - // "communityList.breadcrumbs": "Community List", "communityList.breadcrumbs": "Lista de comunidades", @@ -1690,8 +1722,6 @@ // "communityList.showMore": "Show More", "communityList.showMore": "Mostrar más", - - // "community.create.head": "Create a Community", "community.create.head": "Crear una comunidad", @@ -1734,7 +1764,6 @@ // "community.edit.breadcrumbs": "Edit Community", "community.edit.breadcrumbs": "Editar comunidad", - // "community.edit.logo.delete.title": "Delete logo", "community.edit.logo.delete.title": "Eliminar logo", @@ -1762,8 +1791,6 @@ // "community.edit.logo.upload": "Drop a Community Logo to upload", "community.edit.logo.upload": "Suelta un logotipo de la comunidad para cargar", - - // "community.edit.notifications.success": "Successfully edited the Community", "community.edit.notifications.success": "Editó con éxito la comunidad", @@ -1776,14 +1803,18 @@ // "community.edit.return": "Back", "community.edit.return": "Atrás", - - // "community.edit.tabs.curate.head": "Curate", "community.edit.tabs.curate.head": "Curar", // "community.edit.tabs.curate.title": "Community Edit - Curate", "community.edit.tabs.curate.title": "Edición de la comunidad - Curar", + // "community.edit.tabs.access-control.head": "Access Control", + "community.edit.tabs.access-control.head": "Control de acceso", + + // "community.edit.tabs.access-control.title": "Community Edit - Access Control", + "community.edit.tabs.access-control.title": "Edición de la comunidad: Control de acceso", + // "community.edit.tabs.metadata.head": "Edit Metadata", "community.edit.tabs.metadata.head": "Editar metadatos", @@ -1802,13 +1833,9 @@ // "community.edit.tabs.authorizations.title": "Community Edit - Authorizations", "community.edit.tabs.authorizations.title": "Edición de la comunidad: autorizaciones", - - // "community.listelement.badge": "Community", "community.listelement.badge": "Comunidad", - - // "comcol-role.edit.no-group": "None", "comcol-role.edit.no-group": "Ninguno", @@ -1827,28 +1854,24 @@ // "comcol-role.edit.delete.error.title": "Failed to delete the '{{ role }}' role's group", "comcol-role.edit.delete.error.title": "Error al borrar el grupo del rol '{{ role }}'", - // "comcol-role.edit.community-admin.name": "Administrators", "comcol-role.edit.community-admin.name": "Administradores", // "comcol-role.edit.collection-admin.name": "Administrators", "comcol-role.edit.collection-admin.name": "Administradores", - // "comcol-role.edit.community-admin.description": "Community administrators can create sub-communities or collections, and manage or assign management for those sub-communities or collections. In addition, they decide who can submit items to any sub-collections, edit item metadata (after submission), and add (map) existing items from other collections (subject to authorization).", "comcol-role.edit.community-admin.description": "Los administradores de la comunidad pueden crear subcomunidades o colecciones y gestionar o asignar la gestión para esas subcomunidades o colecciones. Además, deciden quién puede enviar ítems a las subcolecciones, editar los metadatos del ítem (después del envío) y agregar (mapear) ítems existentes de otras colecciones (sujeto a autorización).", // "comcol-role.edit.collection-admin.description": "Collection administrators decide who can submit items to the collection, edit item metadata (after submission), and add (map) existing items from other collections to this collection (subject to authorization for that collection).", "comcol-role.edit.collection-admin.description": "Los administradores de la colección deciden quién puede enviar ítems a la colección, editar los metadatos del ítem (después del envío) y agregar (mapear) ítems existentes de otras colecciones a esta colección (sujeto a autorización para esa colección).", - // "comcol-role.edit.submitters.name": "Submitters", "comcol-role.edit.submitters.name": "Remitentes", // "comcol-role.edit.submitters.description": "The E-People and Groups that have permission to submit new items to this collection.", "comcol-role.edit.submitters.description": "Los Usuarios y Grupos que tienen permiso para enviar nuevos ítems a esta colección.", - // "comcol-role.edit.item_read.name": "Default item read access", "comcol-role.edit.item_read.name": "Acceso de lectura predeterminado del ítem", @@ -1858,7 +1881,6 @@ // "comcol-role.edit.item_read.anonymous-group": "Default read for incoming items is currently set to Anonymous.", "comcol-role.edit.item_read.anonymous-group": "La lectura predeterminada para los ítems entrantes está configurada actualmente como Anónimo.", - // "comcol-role.edit.bitstream_read.name": "Default bitstream read access", "comcol-role.edit.bitstream_read.name": "Acceso de lectura predeterminado de archivos", @@ -1868,28 +1890,24 @@ // "comcol-role.edit.bitstream_read.anonymous-group": "Default read for incoming bitstreams is currently set to Anonymous.", "comcol-role.edit.bitstream_read.anonymous-group": "La lectura predeterminada para los archivos entrantes se establece actualmente en Anónimo.", - // "comcol-role.edit.editor.name": "Editors", "comcol-role.edit.editor.name": "Editores", // "comcol-role.edit.editor.description": "Editors are able to edit the metadata of incoming submissions, and then accept or reject them.", "comcol-role.edit.editor.description": "Los editores pueden editar los metadatos de los envíos entrantes y luego aceptarlos o rechazarlos.", - // "comcol-role.edit.finaleditor.name": "Final editors", "comcol-role.edit.finaleditor.name": "Editores finales", // "comcol-role.edit.finaleditor.description": "Final editors are able to edit the metadata of incoming submissions, but will not be able to reject them.", "comcol-role.edit.finaleditor.description": "Los editores finales pueden editar los metadatos de los envíos entrantes, pero no podrán rechazarlos.", - // "comcol-role.edit.reviewer.name": "Reviewers", "comcol-role.edit.reviewer.name": "Revisores", // "comcol-role.edit.reviewer.description": "Reviewers are able to accept or reject incoming submissions. However, they are not able to edit the submission's metadata.", "comcol-role.edit.reviewer.description": "Los revisores pueden aceptar o rechazar envíos entrantes. Sin embargo, no pueden editar los metadatos del envío.", - // "comcol-role.edit.scorereviewers.name": "Score Reviewers", "comcol-role.edit.scorereviewers.name": "Revisores de puntuación", @@ -1929,14 +1947,12 @@ // "community.all-lists.head": "Subcommunities and Collections", "community.all-lists.head": "Subcomunidades y colecciones", - // "community.sub-collection-list.head": "Collections of this Community", + // "community.sub-collection-list.head": "Collections in this Community", "community.sub-collection-list.head": "Colecciones de esta comunidad", - // "community.sub-community-list.head": "Communities of this Community", + // "community.sub-community-list.head": "Communities in this Community", "community.sub-community-list.head": "Comunidades de esta comunidad", - - // "cookies.consent.accept-all": "Accept all", "cookies.consent.accept-all": "Aceptar todo", @@ -2015,38 +2031,30 @@ // "cookies.consent.app.description.authentication": "Required for signing you in", "cookies.consent.app.description.authentication": "Requerido para iniciar sesión", - // "cookies.consent.app.title.preferences": "Preferences", "cookies.consent.app.title.preferences": "Preferencias", // "cookies.consent.app.description.preferences": "Required for saving your preferences", "cookies.consent.app.description.preferences": "Requerido para guardar sus preferencias", - - // "cookies.consent.app.title.acknowledgement": "Acknowledgement", "cookies.consent.app.title.acknowledgement": "Reconocimiento", // "cookies.consent.app.description.acknowledgement": "Required for saving your acknowledgements and consents", "cookies.consent.app.description.acknowledgement": "Requerido para guardar sus reconocimientos y consentimientos", - - // "cookies.consent.app.title.google-analytics": "Google Analytics", "cookies.consent.app.title.google-analytics": "Google Analytics", // "cookies.consent.app.description.google-analytics": "Allows us to track statistical data", "cookies.consent.app.description.google-analytics": "Nos permite rastrear datos estadísticos", - - // "cookies.consent.app.title.google-recaptcha": "Google reCaptcha", "cookies.consent.app.title.google-recaptcha": "Google reCaptcha", // "cookies.consent.app.description.google-recaptcha": "We use google reCAPTCHA service during registration and password recovery", "cookies.consent.app.description.google-recaptcha": "Utilizamos el servicio google reCAPTCHA durante el registro y la recuperación de contraseña", - // "cookies.consent.purpose.functional": "Functional", "cookies.consent.purpose.functional": "Funcional", @@ -2059,10 +2067,10 @@ // "cookies.consent.purpose.sharing": "Sharing", "cookies.consent.purpose.sharing": "Compartición", - // "curation-task.task.citationpage.label": "Generate Citation Page", + // "curation-task.task.citationpage.label": "Generate Citation Page", "curation-task.task.citationpage.label": "Generar página de cita", - // "curation-task.task.checklinks.label": "Check Links in Metadata", + // "curation-task.task.checklinks.label": "Check Links in Metadata", "curation-task.task.checklinks.label": "Comprobar enlaces en metadatos", // "curation-task.task.noop.label": "NOOP", @@ -2083,8 +2091,6 @@ // "curation-task.task.registerdoi.label": "Register DOI", "curation-task.task.registerdoi.label": "Registro DOI", - - // "curation.form.task-select.label": "Task:", "curation.form.task-select.label": "Tarea:", @@ -2112,10 +2118,8 @@ // "curation.form.handle.hint": "Hint: Enter [your-handle-prefix]/0 to run a task across entire site (not all tasks may support this capability)", "curation.form.handle.hint": "Sugerencia: Introduzca [su-prefijo-handle]/0 para ejecutar una tarea en toda su instalación (no todas las tareas permiten esta opción)", - - // "deny-request-copy.email.message": "Dear {{ recipientName }},\nIn response to your request I regret to inform you that it's not possible to send you a copy of the file(s) you have requested, concerning the document: \"{{ itemUrl }}\" ({{ itemName }}), of which I am an author.\n\nBest regards,\n{{ authorName }} <{{ authorEmail }}>", - "deny-request-copy.email.message": "Estimado {{ recipientName }},\nEn respuesta a su solicitud, lamento informarle que no es posible enviarle una copia de los archivos que ha solicitado, en relación con el documento: \"{{ itemUrl }}\" ({{ itemName }}), del cual soy autor.\n\nSaludos cordiales,\n{{ authorName }} <{{ authorEmail }}>", + "deny-request-copy.email.message": "Estimado {{ recipientName }},\nEn respuesta a su solicitud, lamento informarle de que no es posible enviarle una copia de los archivos que ha solicitado, en relación con el documento: \"{{ itemUrl }}\" ({{ itemName }}), del cual soy autor.\n\nSaludos cordiales,\n{{ authorName }} <{{ authorEmail }}>", // "deny-request-copy.email.subject": "Request copy of document", "deny-request-copy.email.subject": "Solicitar una copia del documento", @@ -2127,17 +2131,16 @@ "deny-request-copy.header": "Denegar copia del documento", // "deny-request-copy.intro": "This message will be sent to the applicant of the request", - "deny-request-copy.intro": "Éste es el texto que será enviado al solicitante.", + "deny-request-copy.intro": "Éste es el texto que será enviado al solicitante", // "deny-request-copy.success": "Successfully denied item request", "deny-request-copy.success": "Solicitud de copia de documento denegada", - - // "dso.name.untitled": "Untitled", "dso.name.untitled": "Sin título", - + // "dso.name.unnamed": "Unnamed", + "dso.name.unnamed": "Sin nombre", // "dso-selector.create.collection.head": "New collection", "dso-selector.create.collection.head": "Nueva colección", @@ -2259,7 +2262,7 @@ // "supervision-group-selector.notification.create.failure.title": "Error", "supervision-group-selector.notification.create.failure.title": "Error", - // "supervision-group-selector.notification.create.already-existing" : "A supervision order already exists on this item for selected group", + // "supervision-group-selector.notification.create.already-existing": "A supervision order already exists on this item for selected group", "supervision-group-selector.notification.create.already-existing": "Ya existe una orden de supervisión para este ítem en el grupo selecionado", // "confirmation-modal.export-metadata.header": "Export metadata for {{ dsoName }}", @@ -2374,7 +2377,7 @@ "error.top-level-communities": "Error al recuperar las comunidades de primer nivel", // "error.validation.license.notgranted": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission.", - "error.validation.license.notgranted": "Debe conceda esta licencia de depósito para completar el envío. Si no puede conceder esta licencia en este momento, puede guardar su trabajo y regresar más tarde o bien eliminar el envío.", + "error.validation.license.notgranted": "Debe conceder esta licencia de depósito para completar el envío. Si no puede conceder esta licencia en este momento, puede guardar su trabajo y regresar más tarde o bien eliminar el envío.", // "error.validation.pattern": "This input is restricted by the current pattern: {{ pattern }}.", "error.validation.pattern": "Esta entrada está restringida por este patrón: {{ pattern }}.", @@ -2394,16 +2397,33 @@ // "error.validation.groupExists": "This group already exists", "error.validation.groupExists": "Este grupo ya existe", + // "error.validation.metadata.name.invalid-pattern": "This field cannot contain dots, commas or spaces. Please use the Element & Qualifier fields instead", + "error.validation.metadata.name.invalid-pattern": "Este campo no puede contener puntos, comas o espacios. Use preferiblemente los campos Elemento y Cualificador", + + // "error.validation.metadata.name.max-length": "This field may not contain more than 32 characters", + "error.validation.metadata.name.max-length": "Este campo no puede contener mas de 32 caracteres", + + // "error.validation.metadata.namespace.max-length": "This field may not contain more than 256 characters", + "error.validation.metadata.namespace.max-length": "Este campo no puede contener mas de 256 caracteres", + + // "error.validation.metadata.element.invalid-pattern": "This field cannot contain dots, commas or spaces. Please use the Qualifier field instead", + "error.validation.metadata.element.invalid-pattern": "Este campo no puede contener puntos, comas o espacios. Use preferiblemente el campo Cualificador", + + // "error.validation.metadata.element.max-length": "This field may not contain more than 64 characters", + "error.validation.metadata.element.max-length": "Este campo no puede contener mas de 64 caracteres", + + // "error.validation.metadata.qualifier.invalid-pattern": "This field cannot contain dots, commas or spaces", + "error.validation.metadata.qualifier.invalid-pattern": "This field cannot contain dots, commas or spaces", + + // "error.validation.metadata.qualifier.max-length": "This field may not contain more than 64 characters", + "error.validation.metadata.qualifier.max-length": "Este campo no puede contener mas de 64 caracteres", // "feed.description": "Syndication feed", "feed.description": "Hilo de sindicación", - // "file-section.error.header": "Error obtaining files for this item", "file-section.error.header": "Error al obtener archivos para este ítem", - - // "footer.copyright": "copyright © 2002-{{ year }}", "footer.copyright": "copyright © 2002-{{ year }}", @@ -2419,14 +2439,12 @@ // "footer.link.privacy-policy": "Privacy policy", "footer.link.privacy-policy": "Política de privacidad", - // "footer.link.end-user-agreement":"End User Agreement", + // "footer.link.end-user-agreement": "End User Agreement", "footer.link.end-user-agreement": "Acuerdo de usuario final", - // "footer.link.feedback":"Send Feedback", + // "footer.link.feedback": "Send Feedback", "footer.link.feedback": "Enviar Sugerencias", - - // "forgot-email.form.header": "Forgot Password", "forgot-email.form.header": "Olvido de contraseña", @@ -2460,8 +2478,6 @@ // "forgot-email.form.error.content": "An error occured when attempting to reset the password for the account associated with the following email address: {{ email }}", "forgot-email.form.error.content": "Ha ocurrido una error intentando restablecer la contraseña para la cuenta asociada al correo electrónico: {{ email }}", - - // "forgot-password.title": "Forgot Password", "forgot-password.title": "Olvido de contraseña", @@ -2504,7 +2520,6 @@ // "forgot-password.form.submit": "Submit password", "forgot-password.form.submit": "Enviar contraseña", - // "form.add": "Add more", "form.add": "Añadir más", @@ -2565,6 +2580,24 @@ // "form.no-value": "No value entered", "form.no-value": "No se introdujo ningún valor", + // "form.other-information.email": "Email", + "form.other-information.email": "Correo electrónico", + + // "form.other-information.first-name": "First Name", + "form.other-information.first-name": "Nombre", + + // "form.other-information.insolr": "In Solr Index", + "form.other-information.insolr": "en el índice Solr", + + // "form.other-information.institution": "Institution", + "form.other-information.institution": "Institución", + + // "form.other-information.last-name": "Last Name", + "form.other-information.last-name": "Apellido", + + // "form.other-information.orcid": "ORCID", + "form.other-information.orcid": "ORCID", + // "form.remove": "Remove", "form.remove": "Eliminar", @@ -2589,16 +2622,14 @@ // "form.repeatable.sort.tip": "Drop the item in the new position", "form.repeatable.sort.tip": "Suelte el ítem en la nueva posición", - - // "grant-deny-request-copy.deny": "Don't send copy", "grant-deny-request-copy.deny": "No envíe copia", // "grant-deny-request-copy.email.back": "Back", "grant-deny-request-copy.email.back": "Atrás", - // "grant-deny-request-copy.email.message": "Message", - "grant-deny-request-copy.email.message": "Mensaje", + // "grant-deny-request-copy.email.message": "Optional additional message", + "grant-deny-request-copy.email.message": "Mensaje adicional (opcional)", // "grant-deny-request-copy.email.message.empty": "Please enter a message", "grant-deny-request-copy.email.message.empty": "Por favor, introduzca un mensaje", @@ -2636,11 +2667,6 @@ // "grant-deny-request-copy.processed": "This request has already been processed. You can use the button below to get back to the home page.", "grant-deny-request-copy.processed": "Esta solicitud ya fue procesada. Puede usar los botones inferiores para regresas a la página de inicio", - - - // "grant-request-copy.email.message": "Dear {{ recipientName }},\nIn response to your request I have the pleasure to send you in attachment a copy of the file(s) concerning the document: \"{{ itemUrl }}\" ({{ itemName }}), of which I am an author.\n\nBest regards,\n{{ authorName }} <{{ authorEmail }}>", - "grant-request-copy.email.message": "Estimado {{ recipientName }},\nRespondiendo a su solicitud, le envío anexada una copia del fichero correspondiente al documento: \"{{ itemUrl }}\" ({{ itemName }}), del que soy autor.\n\nUn cordial saludo,\n{{ authorName }} <{{ authorEmail }}>", - // "grant-request-copy.email.subject": "Request copy of document", "grant-request-copy.email.subject": "Solicitar copia de documento", @@ -2650,24 +2676,23 @@ // "grant-request-copy.header": "Grant document copy request", "grant-request-copy.header": "Conceder solicitud de copia de documento", - // "grant-request-copy.intro": "This message will be sent to the applicant of the request. The requested document(s) will be attached.", - "grant-request-copy.intro": "Este mensaje se enviará al solicitante de la copia. Se le anexará una copia del documento.", + // "grant-request-copy.intro": "A message will be sent to the applicant of the request. The requested document(s) will be attached.", + "grant-request-copy.intro": "Este mensaje se enviará al solicitante de la copia. Se le anexará una copia del documento.", // "grant-request-copy.success": "Successfully granted item request", "grant-request-copy.success": "Solicitud de ítem concedida exitosamente", - // "health.breadcrumbs": "Health", "health.breadcrumbs": "Chequeos", - // "health-page.heading" : "Health", - "health-page.heading": "Chequeos", + // "health-page.heading": "Health", + "health-page.heading": "Chequeos", - // "health-page.info-tab" : "Info", - "health-page.info-tab": "Información", + // "health-page.info-tab": "Info", + "health-page.info-tab": "Información", - // "health-page.status-tab" : "Status", - "health-page.status-tab": "Estado", + // "health-page.status-tab": "Status", + "health-page.status-tab": "Estado", // "health-page.error.msg": "The health check service is temporarily unavailable", "health-page.error.msg": "El servicio de comprobación no se encuentra temporalmente disponible", @@ -2717,7 +2742,6 @@ // "health-page.section.no-issues": "No issues detected", "health-page.section.no-issues": "No se detectaron problemas", - // "home.description": "", "home.description": "", @@ -2736,8 +2760,6 @@ // "home.top-level-communities.help": "Select a community to browse its collections.", "home.top-level-communities.help": "Seleccione una comunidad para explorar sus colecciones.", - - // "info.end-user-agreement.accept": "I have read and I agree to the End User Agreement", "info.end-user-agreement.accept": "He leído y acepto el Acuerdo de usuario final.", @@ -2762,6 +2784,9 @@ // "info.end-user-agreement.title": "End User Agreement", "info.end-user-agreement.title": "Acuerdo de usuario final", + // "info.end-user-agreement.hosting-country": "the United States", + "info.end-user-agreement.hosting-country": "los Estados Unidos de América", + // "info.privacy.breadcrumbs": "Privacy Statement", "info.privacy.breadcrumbs": "Declaracion de privacidad", @@ -2795,47 +2820,39 @@ // "info.feedback.email-label": "Your Email", "info.feedback.email-label": "Su correo electrónico", - // "info.feedback.create.success" : "Feedback Sent Successfully!", + // "info.feedback.create.success": "Feedback Sent Successfully!", "info.feedback.create.success": "Envío exitoso de sugerencia", - // "info.feedback.error.email.required" : "A valid email address is required", + // "info.feedback.error.email.required": "A valid email address is required", "info.feedback.error.email.required": "se requiere una dirección válida de correo electrónico", - // "info.feedback.error.message.required" : "A comment is required", + // "info.feedback.error.message.required": "A comment is required", "info.feedback.error.message.required": "Se requiere un comentario", - // "info.feedback.page-label" : "Page", + // "info.feedback.page-label": "Page", "info.feedback.page-label": "Página", - // "info.feedback.page_help" : "Tha page related to your feedback", + // "info.feedback.page_help": "Tha page related to your feedback", "info.feedback.page_help": "La página relacionada con su sugerencia", - - // "item.alerts.private": "This item is non-discoverable", "item.alerts.private": "Este ítem es privado", // "item.alerts.withdrawn": "This item has been withdrawn", "item.alerts.withdrawn": "Este ítem ha sido retirado", - - // "item.edit.authorizations.heading": "With this editor you can view and alter the policies of an item, plus alter policies of individual item components: bundles and bitstreams. Briefly, an item is a container of bundles, and bundles are containers of bitstreams. Containers usually have ADD/REMOVE/READ/WRITE policies, while bitstreams only have READ/WRITE policies.", "item.edit.authorizations.heading": "Con este editor puede ver y modificar las políticas de un ítem, además de modificar las políticas de los componentes individuales del ítem: paquetes y archivos. Brevemente, un ítem es un contenedor de paquetes y los paquetes son contenedores de archivos. Los contenedores suelen tener políticas AGREGAR/ELIMINAR/LEER/ESCRIBIR, mientras que los archivos solo tienen políticas LEER/ESCRIBIR.", // "item.edit.authorizations.title": "Edit item's Policies", "item.edit.authorizations.title": "Editar las políticas del ítem", - - // "item.badge.private": "Non-discoverable", "item.badge.private": "Privado", // "item.badge.withdrawn": "Withdrawn", "item.badge.withdrawn": "Retirado", - - // "item.bitstreams.upload.bundle": "Bundle", "item.bitstreams.upload.bundle": "Bloque", @@ -2869,8 +2886,6 @@ // "item.bitstreams.upload.title": "Upload bitstream", "item.bitstreams.upload.title": "Subir archivo", - - // "item.edit.bitstreams.bundle.edit.buttons.upload": "Upload", "item.edit.bitstreams.bundle.edit.buttons.upload": "Subir", @@ -2961,8 +2976,6 @@ // "item.edit.bitstreams.upload-button": "Upload", "item.edit.bitstreams.upload-button": "Subir", - - // "item.edit.delete.cancel": "Cancel", "item.edit.delete.cancel": "Cancelar", @@ -2990,7 +3003,6 @@ // "item.edit.tabs.disabled.tooltip": "You're not authorized to access this tab", "item.edit.tabs.disabled.tooltip": "No tienes autorización para acceder a esta pestaña", - // "item.edit.tabs.mapper.head": "Collection Mapper", "item.edit.tabs.mapper.head": "Mapeador de colecciones", @@ -3114,8 +3126,6 @@ // "item.edit.item-mapper.tabs.map": "Map new collections", "item.edit.item-mapper.tabs.map": "Mapear nuevas colecciones", - - // "item.edit.metadata.add-button": "Add", "item.edit.metadata.add-button": "Agregar", @@ -3200,8 +3210,6 @@ // "item.edit.metadata.save-button": "Save", "item.edit.metadata.save-button": "Guardar", - - // "item.edit.modify.overview.field": "Field", "item.edit.modify.overview.field": "Campo", @@ -3211,8 +3219,6 @@ // "item.edit.modify.overview.value": "Value", "item.edit.modify.overview.value": "Valor", - - // "item.edit.move.cancel": "Back", "item.edit.move.cancel": "Atrás", @@ -3252,8 +3258,6 @@ // "item.edit.move.title": "Move item", "item.edit.move.title": "Mover ítem", - - // "item.edit.private.cancel": "Cancel", "item.edit.private.cancel": "Cancelar", @@ -3272,8 +3276,6 @@ // "item.edit.private.success": "The item is now non-discoverable", "item.edit.private.success": "El ítem ahora es privado", - - // "item.edit.public.cancel": "Cancel", "item.edit.public.cancel": "Cancelar", @@ -3292,8 +3294,6 @@ // "item.edit.public.success": "The item is now discoverable", "item.edit.public.success": "El ítem ahora es público", - - // "item.edit.reinstate.cancel": "Cancel", "item.edit.reinstate.cancel": "Cancelar", @@ -3312,8 +3312,6 @@ // "item.edit.reinstate.success": "The item was reinstated successfully", "item.edit.reinstate.success": "El ítem se reintegró correctamente", - - // "item.edit.relationships.discard-button": "Discard", "item.edit.relationships.discard-button": "Descartar", @@ -3359,11 +3357,9 @@ // "item.edit.relationships.no-entity-type": "Add 'dspace.entity.type' metadata to enable relationships for this item", "item.edit.relationships.no-entity-type": "Agregue metadatos 'dspace.entity.type' para habilitar las relaciones para este ítem", - // "item.edit.return": "Back", "item.edit.return": "Atrás", - // "item.edit.tabs.bitstreams.head": "Bitstreams", "item.edit.tabs.bitstreams.head": "Archivos", @@ -3376,6 +3372,15 @@ // "item.edit.tabs.curate.title": "Item Edit - Curate", "item.edit.tabs.curate.title": "Edición de ítem: Curar", + // "item.edit.curate.title": "Curate Item: {{item}}", + "item.edit.curate.title": "Curar ítem: {{item}}", + + // "item.edit.tabs.access-control.head": "Access Control", + "item.edit.tabs.access-control.head": "Control de acceso", + + // "item.edit.tabs.access-control.title": "Item Edit - Access Control", + "item.edit.tabs.access-control.title": "Edición de ítem: Control de acceso", + // "item.edit.tabs.metadata.head": "Metadata", "item.edit.tabs.metadata.head": "Metadatos", @@ -3407,7 +3412,7 @@ "item.edit.tabs.status.buttons.mappedCollections.label": "Administrar colecciones mapeadas", // "item.edit.tabs.status.buttons.move.button": "Move this Item to a different Collection", - "item.edit.tabs.status.buttons.move.button": "Mover éste ítem a una colección diferente", + "item.edit.tabs.status.buttons.move.button": "Mover este ítem a una colección diferente", // "item.edit.tabs.status.buttons.move.label": "Move item to another collection", "item.edit.tabs.status.buttons.move.label": "Mover ítem a otra colección", @@ -3434,7 +3439,7 @@ "item.edit.tabs.status.buttons.unauthorized": "No estás autorizado para realizar esta acción.", // "item.edit.tabs.status.buttons.withdraw.button": "Withdraw this item", - "item.edit.tabs.status.buttons.withdraw.button": "Retirar éste ítem", + "item.edit.tabs.status.buttons.withdraw.button": "Retirar este ítem", // "item.edit.tabs.status.buttons.withdraw.label": "Withdraw item from the repository", "item.edit.tabs.status.buttons.withdraw.label": "Retirar ítem del repositorio", @@ -3475,8 +3480,6 @@ // "item.edit.tabs.view.title": "Item Edit - View", "item.edit.tabs.view.title": "Edición de ítem - Ver", - - // "item.edit.withdraw.cancel": "Cancel", "item.edit.withdraw.cancel": "Cancelar", @@ -3498,7 +3501,6 @@ // "item.orcid.return": "Back", "item.orcid.return": "Atrás", - // "item.listelement.badge": "Item", "item.listelement.badge": "Ítem", @@ -3556,8 +3558,6 @@ // "workflow-item.search.result.list.element.supervised.remove-tooltip": "Remove supervision group", "workflow-item.search.result.list.element.supervised.remove-tooltip": "Borrar grupo de supervisión", - - // "item.page.abstract": "Abstract", "item.page.abstract": "Resumen", @@ -3648,10 +3648,10 @@ // "item.page.bitstreams.collapse": "Collapse", "item.page.bitstreams.collapse": "Contraer", - // "item.page.filesection.original.bundle" : "Original bundle", + // "item.page.filesection.original.bundle": "Original bundle", "item.page.filesection.original.bundle": "Bloque original", - // "item.page.filesection.license.bundle" : "License bundle", + // "item.page.filesection.license.bundle": "License bundle", "item.page.filesection.license.bundle": "Bloque de licencias", // "item.page.return": "Back", @@ -3696,27 +3696,30 @@ // "item.preview.dc.type": "Type:", "item.preview.dc.type": "Tipo:", - // "item.preview.oaire.citation.issue" : "Issue", + // "item.preview.oaire.citation.issue": "Issue", "item.preview.oaire.citation.issue": "Número", - // "item.preview.oaire.citation.volume" : "Volume", + // "item.preview.oaire.citation.volume": "Volume", "item.preview.oaire.citation.volume": "Volumen", - // "item.preview.dc.relation.issn" : "ISSN", + // "item.preview.dc.relation.issn": "ISSN", "item.preview.dc.relation.issn": "ISSN", - // "item.preview.dc.identifier.isbn" : "ISBN", + // "item.preview.dc.identifier.isbn": "ISBN", "item.preview.dc.identifier.isbn": "ISBN", // "item.preview.dc.identifier": "Identifier:", "item.preview.dc.identifier": "Identificador:", - // "item.preview.dc.relation.ispartof" : "Journal or Serie", + // "item.preview.dc.relation.ispartof": "Journal or Series", "item.preview.dc.relation.ispartof": "Revista o Serie", - // "item.preview.dc.identifier.doi" : "DOI", + // "item.preview.dc.identifier.doi": "DOI", "item.preview.dc.identifier.doi": "DOI", + // "item.preview.dc.publisher": "Publisher:", + "item.preview.dc.publisher": "Editor:", + // "item.preview.person.familyName": "Surname:", "item.preview.person.familyName": "Apellido:", @@ -3744,8 +3747,6 @@ // "item.preview.oaire.fundingStream": "Funding Stream:", "item.preview.oaire.fundingStream": "Línea de financiación:", - - // "item.select.confirm": "Confirm selected", "item.select.confirm": "Confirmar seleccionado", @@ -3761,7 +3762,6 @@ // "item.select.table.title": "Title", "item.select.table.title": "Título", - // "item.version.history.empty": "There are no other versions for this item yet.", "item.version.history.empty": "Aún no hay otras versiones para este ítem.", @@ -3822,11 +3822,9 @@ // "item.version.history.table.action.hasDraft": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.history.table.action.hasDraft": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente", - // "item.version.notice": "This is not the latest version of this item. The latest version can be found here.", "item.version.notice": "Esta no es la última versión de este ítem. La última versión se puede encontrar aquí.", - // "item.version.create.modal.header": "New version", "item.version.create.modal.header": "Nueva versión", @@ -3860,21 +3858,20 @@ // "item.version.create.modal.submitted.text": "The new version is being created. This may take some time if the item has a lot of relationships.", "item.version.create.modal.submitted.text": "Se está creando la nueva versión. Si el ítem tiene muchas relaciones, este proceso podría tardar.", - // "item.version.create.notification.success" : "New version has been created with version number {{version}}", + // "item.version.create.notification.success": "New version has been created with version number {{version}}", "item.version.create.notification.success": "Se ha creado una nueva versión con número {{version}}", - // "item.version.create.notification.failure" : "New version has not been created", + // "item.version.create.notification.failure": "New version has not been created", "item.version.create.notification.failure": "No se ha creado una nueva versión", - // "item.version.create.notification.inProgress" : "A new version cannot be created because there is an inprogress submission in the version history", + // "item.version.create.notification.inProgress": "A new version cannot be created because there is an inprogress submission in the version history", "item.version.create.notification.inProgress": "No es posible crear una nueva versión puesto que existe en el historial de versiones un envío pendiente", - // "item.version.delete.modal.header": "Delete version", "item.version.delete.modal.header": "Borrar versión", // "item.version.delete.modal.text": "Do you want to delete version {{version}}?", - "item.version.delete.modal.text": "Quiere borrar la versión {{version}}?", + "item.version.delete.modal.text": "¿Quiere borrar la versión {{version}}?", // "item.version.delete.modal.button.confirm": "Delete", "item.version.delete.modal.button.confirm": "Borrar", @@ -3888,21 +3885,18 @@ // "item.version.delete.modal.button.cancel.tooltip": "Do not delete this version", "item.version.delete.modal.button.cancel.tooltip": "No borrar esta versión", - // "item.version.delete.notification.success" : "Version number {{version}} has been deleted", + // "item.version.delete.notification.success": "Version number {{version}} has been deleted", "item.version.delete.notification.success": "Se ha borrado la versión número {{version}}", - // "item.version.delete.notification.failure" : "Version number {{version}} has not been deleted", + // "item.version.delete.notification.failure": "Version number {{version}} has not been deleted", "item.version.delete.notification.failure": "No se ha borrado la versión número {{version}}", + // "item.version.edit.notification.success": "The summary of version number {{version}} has been changed", + "item.version.edit.notification.success": "Se ha cambiado el resumen de la versión número {{version}}", - // "item.version.edit.notification.success" : "The summary of version number {{version}} has been changed", - "item.version.edit.notification.success": "Ha cambiado el resumen de la versión número {{version}}", - - // "item.version.edit.notification.failure" : "The summary of version number {{version}} has not been changed", + // "item.version.edit.notification.failure": "The summary of version number {{version}} has not been changed", "item.version.edit.notification.failure": "No ha cambiado el resumen de la versión número {{version}}", - - // "itemtemplate.edit.metadata.add-button": "Add", "itemtemplate.edit.metadata.add-button": "Agregar", @@ -3984,8 +3978,6 @@ // "itemtemplate.edit.metadata.save-button": "Save", "itemtemplate.edit.metadata.save-button": "Guardar", - - // "journal.listelement.badge": "Journal", "journal.listelement.badge": "Revista", @@ -4016,8 +4008,6 @@ // "journal.search.title": "Journal Search", "journal.search.title": "Búsqueda de revistas", - - // "journalissue.listelement.badge": "Journal Issue", "journalissue.listelement.badge": "Número de la revista", @@ -4045,8 +4035,6 @@ // "journalissue.page.titleprefix": "Journal Issue: ", "journalissue.page.titleprefix": "Número de la revista: ", - - // "journalvolume.listelement.badge": "Journal Volume", "journalvolume.listelement.badge": "Volumen de la revista", @@ -4065,7 +4053,6 @@ // "journalvolume.page.volume": "Volume", "journalvolume.page.volume": "Volumen", - // "iiifsearchable.listelement.badge": "Document Media", "iiifsearchable.listelement.badge": "Soporte (media) del documento", @@ -4099,7 +4086,6 @@ // "iiif.page.description": "Description: ", "iiif.page.description": "Descripción: ", - // "loading.bitstream": "Loading bitstream...", "loading.bitstream": "Cargando archivo...", @@ -4154,8 +4140,6 @@ // "loading.top-level-communities": "Loading top-level communities...", "loading.top-level-communities": "Cargando comunidades de primer nivel...", - - // "login.form.email": "Email address", "login.form.email": "Correo electrónico", @@ -4192,8 +4176,6 @@ // "login.breadcrumbs": "Login", "login.breadcrumbs": "Acceso", - - // "logout.form.header": "Log out from DSpace", "logout.form.header": "Cerrar sesión en DSpace", @@ -4203,8 +4185,6 @@ // "logout.title": "Logout", "logout.title": "Cerrar sesión", - - // "menu.header.admin": "Management", "menu.header.admin": "Gestión", @@ -4214,27 +4194,24 @@ // "menu.header.admin.description": "Management menu", "menu.header.admin.description": "Menú de gestión", - - // "menu.section.access_control": "Access Control", "menu.section.access_control": "Control de acceso", // "menu.section.access_control_authorizations": "Authorizations", "menu.section.access_control_authorizations": "Autorizaciones", + // "menu.section.access_control_bulk": "Bulk Access Management", + "menu.section.access_control_bulk": "Gestión de Acceso Masivo", + // "menu.section.access_control_groups": "Groups", "menu.section.access_control_groups": "Grupos", // "menu.section.access_control_people": "People", "menu.section.access_control_people": "Usuarios", - - // "menu.section.admin_search": "Admin Search", "menu.section.admin_search": "Búsqueda de administrador", - - // "menu.section.browse_community": "This Community", "menu.section.browse_community": "Esta comunidad", @@ -4259,22 +4236,21 @@ // "menu.section.browse_global_by_subject": "By Subject", "menu.section.browse_global_by_subject": "Por tema", + // "menu.section.browse_global_by_srsc": "By Subject Category", + "menu.section.browse_global_by_srsc": "Por categoría", + // "menu.section.browse_global_by_title": "By Title", "menu.section.browse_global_by_title": "Por titulo", // "menu.section.browse_global_communities_and_collections": "Communities & Collections", "menu.section.browse_global_communities_and_collections": "Comunidades", - - // "menu.section.control_panel": "Control Panel", "menu.section.control_panel": "Panel de control", // "menu.section.curation_task": "Curation Task", "menu.section.curation_task": "Tareas de curación", - - // "menu.section.edit": "Edit", "menu.section.edit": "Editar", @@ -4287,8 +4263,6 @@ // "menu.section.edit_item": "Item", "menu.section.edit_item": "Ítem", - - // "menu.section.export": "Export", "menu.section.export": "Exportar", @@ -4307,7 +4281,6 @@ // "menu.section.export_batch": "Batch Export (ZIP)", "menu.section.export_batch": "Exportación por lotes (ZIP)", - // "menu.section.icon.access_control": "Access Control menu section", "menu.section.icon.access_control": "Sección del menú de control de acceso", @@ -4356,8 +4329,6 @@ // "menu.section.icon.unpin": "Unpin sidebar", "menu.section.icon.unpin": "Desanclar la barra lateral", - - // "menu.section.import": "Import", "menu.section.import": "Importar", @@ -4367,8 +4338,6 @@ // "menu.section.import_metadata": "Metadata", "menu.section.import_metadata": "Metadatos", - - // "menu.section.new": "New", "menu.section.new": "Nuevo", @@ -4387,24 +4356,18 @@ // "menu.section.new_process": "Process", "menu.section.new_process": "Proceso", - - // "menu.section.pin": "Pin sidebar", "menu.section.pin": "Anclar barra lateral", // "menu.section.unpin": "Unpin sidebar", "menu.section.unpin": "Desanclar la barra lateral", - - // "menu.section.processes": "Processes", "menu.section.processes": "Procesos", // "menu.section.health": "Health", "menu.section.health": "Chequeo", - - // "menu.section.registries": "Registries", "menu.section.registries": "Registros", @@ -4414,16 +4377,12 @@ // "menu.section.registries_metadata": "Metadata", "menu.section.registries_metadata": "Metadatos", - - // "menu.section.statistics": "Statistics", "menu.section.statistics": "Estadísticas", // "menu.section.statistics_task": "Statistics Task", "menu.section.statistics_task": "Tarea de estadísticas", - - // "menu.section.toggle.access_control": "Toggle Access Control section", "menu.section.toggle.access_control": "Alternar sección de control de acceso", @@ -4454,19 +4413,18 @@ // "menu.section.toggle.statistics_task": "Toggle Statistics Task section", "menu.section.toggle.statistics_task": "Alternar sección de Tarea de estadísticas", - // "menu.section.workflow": "Administer Workflow", "menu.section.workflow": "Administrar flujo de trabajo", - // "metadata-export-search.tooltip": "Export search results as CSV", "metadata-export-search.tooltip": "Exportar los resultados de búsqueda a CSV", + // "metadata-export-search.submit.success": "The export was started successfully", "metadata-export-search.submit.success": "La exportación ha comenzado satisfactoriamente", + // "metadata-export-search.submit.error": "Starting the export has failed", "metadata-export-search.submit.error": "Ha fallado el comienzo de la exportación", - // "mydspace.breadcrumbs": "MyDSpace", "mydspace.breadcrumbs": "Mi DSpace", @@ -4593,8 +4551,6 @@ // "mydspace.view-btn": "View", "mydspace.view-btn": "Ver", - - // "nav.browse.header": "All of DSpace", "nav.browse.header": "Todo DSpace", @@ -4628,25 +4584,27 @@ // "nav.search": "Search", "nav.search": "Buscar", + // "nav.search.button": "Submit search", + "nav.search.button": "Buscar", + // "nav.statistics.header": "Statistics", "nav.statistics.header": "Estadísticas", // "nav.stop-impersonating": "Stop impersonating EPerson", - "nav.stop-impersonating": "Dejar de hacerse pasar por usuario", + "nav.stop-impersonating": "Dejar de impersonar al usuario", - // "nav.subscriptions" : "Subscriptions", + // "nav.subscriptions": "Subscriptions", "nav.subscriptions": "Suscripciones", - // "nav.toggle" : "Toggle navigation", + // "nav.toggle": "Toggle navigation", "nav.toggle": "Alternar navegación", - // "nav.user.description" : "User profile bar", + // "nav.user.description": "User profile bar", "nav.user.description": "Barra de perfil de usuario", // "none.listelement.badge": "Item", "none.listelement.badge": "Ítem", - // "orgunit.listelement.badge": "Organizational Unit", "orgunit.listelement.badge": "Unidad organizativa", @@ -4674,8 +4632,6 @@ // "orgunit.page.titleprefix": "Organizational Unit: ", "orgunit.page.titleprefix": "Unidad organizativa: ", - - // "pagination.options.description": "Pagination options", "pagination.options.description": "Opciones de paginación", @@ -4691,8 +4647,6 @@ // "pagination.sort-direction": "Sort Options", "pagination.sort-direction": "Opciones de ordenación", - - // "person.listelement.badge": "Person", "person.listelement.badge": "Persona", @@ -4741,8 +4695,6 @@ // "person.search.title": "Person Search", "person.search.title": "Búsqueda de personas", - - // "process.new.select-parameters": "Parameters", "process.new.select-parameters": "Parámetros", @@ -4791,6 +4743,9 @@ // "process.new.notification.error.content": "An error occurred while creating this process", "process.new.notification.error.content": "Se produjo un error al crear este proceso.", + // "process.new.notification.error.max-upload.content": "The file exceeds the maximum upload size", + "process.new.notification.error.max-upload.content": "El fichero sobrepasa el límte máximo de subida", + // "process.new.header": "Create a new process", "process.new.header": "Crea un nuevo proceso", @@ -4800,18 +4755,16 @@ // "process.new.breadcrumbs": "Create a new process", "process.new.breadcrumbs": "Crea un nuevo proceso", - - - // "process.detail.arguments" : "Arguments", + // "process.detail.arguments": "Arguments", "process.detail.arguments": "Argumentos", - // "process.detail.arguments.empty" : "This process doesn't contain any arguments", + // "process.detail.arguments.empty": "This process doesn't contain any arguments", "process.detail.arguments.empty": "Este proceso no contiene ningún argumento", - // "process.detail.back" : "Back", + // "process.detail.back": "Back", "process.detail.back": "Atrás", - // "process.detail.output" : "Process Output", + // "process.detail.output": "Process Output", "process.detail.output": "Salida del proceso", // "process.detail.logs.button": "Retrieve process output", @@ -4823,28 +4776,29 @@ // "process.detail.logs.none": "This process has no output", "process.detail.logs.none": "Este proceso no tiene salida", - // "process.detail.output-files" : "Output Files", + // "process.detail.output-files": "Output Files", "process.detail.output-files": "Archivos de salida", - // "process.detail.output-files.empty" : "This process doesn't contain any output files", + // "process.detail.output-files.empty": "This process doesn't contain any output files", "process.detail.output-files.empty": "Este proceso no contiene ningún archivo de salida", - // "process.detail.script" : "Script", + // "process.detail.script": "Script", "process.detail.script": "Secuencia de comandos", - // "process.detail.title" : "Process: {{ id }} - {{ name }}", + // "process.detail.title": "Process: {{ id }} - {{ name }}", + "process.detail.title": "Proceso: {{ id }} - {{ name }}", - // "process.detail.start-time" : "Start time", + // "process.detail.start-time": "Start time", "process.detail.start-time": "Hora de inicio", - // "process.detail.end-time" : "Finish time", + // "process.detail.end-time": "Finish time", "process.detail.end-time": "Hora de finalización", - // "process.detail.status" : "Status", + // "process.detail.status": "Status", "process.detail.status": "Estado", - // "process.detail.create" : "Create similar process", + // "process.detail.create": "Create similar process", "process.detail.create": "Crear un proceso similar", // "process.detail.actions": "Actions", @@ -4871,24 +4825,22 @@ // "process.detail.delete.error": "Something went wrong when deleting the process", "process.detail.delete.error": "Algo falló eliminando el proceso", - - - // "process.overview.table.finish" : "Finish time (UTC)", + // "process.overview.table.finish": "Finish time (UTC)", "process.overview.table.finish": "Hora de finalización (UTC)", - // "process.overview.table.id" : "Process ID", + // "process.overview.table.id": "Process ID", "process.overview.table.id": "ID de proceso", - // "process.overview.table.name" : "Name", + // "process.overview.table.name": "Name", "process.overview.table.name": "Nombre", - // "process.overview.table.start" : "Start time (UTC)", + // "process.overview.table.start": "Start time (UTC)", "process.overview.table.start": "Hora de inicio (UTC)", - // "process.overview.table.status" : "Status", + // "process.overview.table.status": "Status", "process.overview.table.status": "Estado", - // "process.overview.table.user" : "User", + // "process.overview.table.user": "User", "process.overview.table.user": "Usuario", // "process.overview.title": "Processes Overview", @@ -4927,8 +4879,6 @@ // "process.bulk.delete.success": "{{count}} process(es) have been succesfully deleted", "process.bulk.delete.success": "{{count}} proceso(s) se han eliminado correctamente", - - // "profile.breadcrumbs": "Update Profile", "profile.breadcrumbs": "Actualización del perfil", @@ -5058,8 +5008,6 @@ // "project-relationships.search.results.head": "Project Search Results", "project-relationships.search.results.head": "Resultados de búsqueda de proyectos", - - // "publication.listelement.badge": "Publication", "publication.listelement.badge": "Publicación", @@ -5093,7 +5041,6 @@ // "publication.search.title": "Publication Search", "publication.search.title": "Búsqueda de publicaciones", - // "media-viewer.next": "Next", "media-viewer.next": "Siguiente", @@ -5103,7 +5050,6 @@ // "media-viewer.playlist": "Playlist", "media-viewer.playlist": "Lista de reproducción", - // "register-email.title": "New user registration", "register-email.title": "Registro de nuevo usuario", @@ -5167,7 +5113,6 @@ // "register-page.create-profile.submit.success.head": "Registration completed", "register-page.create-profile.submit.success.head": "Registro completado", - // "register-page.registration.header": "New user registration", "register-page.registration.header": "Registro de nuevo usuario", @@ -5209,6 +5154,7 @@ // "register-page.registration.google-recaptcha.must-accept-cookies": "In order to register you must accept the Registration and Password recovery (Google reCaptcha) cookies.", "register-page.registration.google-recaptcha.must-accept-cookies": "Para registrarse debe aceptar las cookies de Registro y recuperación de contraseña (Google reCaptcha).", + // "register-page.registration.error.maildomain": "This email address is not on the list of domains who can register. Allowed domains are {{ domains }}", "register-page.registration.error.maildomain": "Este correo electrónico no esta en la lista de dominios que pueden registrarse. Los dominios permitidos son {{ domains }}", @@ -5223,6 +5169,7 @@ // "register-page.registration.google-recaptcha.notification.message.expired": "Verification expired. Please verify again.", "register-page.registration.google-recaptcha.notification.message.expired": "Verificación caducada. Verifique de nuevo.", + // "register-page.registration.info.maildomain": "Accounts can be registered for mail addresses of the domains", "register-page.registration.info.maildomain": "Las cuentas pueden registrarse para las direcciones de correo de los dominios", @@ -5289,16 +5236,14 @@ // "relationships.isFundingAgencyOf.OrgUnit": "Funder", "relationships.isFundingAgencyOf.OrgUnit": "Financiador", - // "repository.image.logo": "Repository logo", "repository.image.logo": "Logotipo del repositorio", - // "repository.title.prefix": "DSpace Angular :: ", - "repository.title.prefix": "DSpace Angular :: ", - - // "repository.title.prefixDSpace": "DSpace Angular ::", - "repository.title.prefixDSpace": "DSpace Angular ::", + // "repository.title": "DSpace Repository", + "repository.title": "Repositorio DSpace", + // "repository.title.prefix": "DSpace Repository :: ", + "repository.title.prefix": "Repositorio DSpace :: ", // "resource-policies.add.button": "Add", "resource-policies.add.button": "Agregar", @@ -5471,8 +5416,6 @@ // "resource-policies.table.headers.title.for.collection": "Policies for Collection", "resource-policies.table.headers.title.for.collection": "Políticas para la colección", - - // "search.description": "", "search.description": "", @@ -5488,7 +5431,6 @@ // "search.search-form.placeholder": "Search the repository ...", "search.search-form.placeholder": "Buscar en el repositorio ...", - // "search.filters.applied.f.author": "Author", "search.filters.applied.f.author": "Autor", @@ -5537,8 +5479,6 @@ // "search.filters.applied.f.withdrawn": "Withdrawn", "search.filters.applied.f.withdrawn": "Retirado", - - // "search.filters.filter.author.head": "Author", "search.filters.filter.author.head": "Autor", @@ -5758,8 +5698,6 @@ // "search.filters.filter.supervisedBy.label": "Search Supervised By", "search.filters.filter.supervisedBy.label": "Búsqueda Supervisada Por", - - // "search.filters.entityType.JournalIssue": "Journal Issue", "search.filters.entityType.JournalIssue": "Número de la revista", @@ -5787,7 +5725,6 @@ // "search.filters.withdrawn.false": "No", "search.filters.withdrawn.false": "No", - // "search.filters.head": "Filters", "search.filters.head": "Filtros", @@ -5797,8 +5734,6 @@ // "search.filters.search.submit": "Submit", "search.filters.search.submit": "Enviar", - - // "search.form.search": "Search", "search.form.search": "Buscar", @@ -5808,8 +5743,6 @@ // "search.form.scope.all": "All of DSpace", "search.form.scope.all": "Todo DSpace", - - // "search.results.head": "Search Results", "search.results.head": "Resultados de la búsqueda", @@ -5834,7 +5767,6 @@ // "default-relationships.search.results.head": "Search Results", "default-relationships.search.results.head": "Resultados de la búsqueda", - // "search.sidebar.close": "Back to results", "search.sidebar.close": "Volver a resultados", @@ -5856,8 +5788,6 @@ // "search.sidebar.settings.title": "Settings", "search.sidebar.settings.title": "Ajustes", - - // "search.view-switch.show-detail": "Show detail", "search.view-switch.show-detail": "Mostrar detalle", @@ -5867,8 +5797,6 @@ // "search.view-switch.show-list": "Show as list", "search.view-switch.show-list": "Mostrar como lista", - - // "sorting.ASC": "Ascending", "sorting.ASC": "Ascendente", @@ -5905,7 +5833,6 @@ // "sorting.lastModified.DESC": "Last modified Descending", "sorting.lastModified.DESC": "Última modificación Descendente", - // "statistics.title": "Statistics", "statistics.title": "Estadísticas", @@ -5942,7 +5869,6 @@ // "statistics.table.no-name": "(object name could not be loaded)", "statistics.table.no-name": "(el nombre del objeto no pudo ser cargado)", - // "submission.edit.breadcrumbs": "Edit Submission", "submission.edit.breadcrumbs": "Editar envío", @@ -5952,7 +5878,7 @@ // "submission.general.cancel": "Cancel", "submission.general.cancel": "Cancelar", - // "submission.general.cannot_submit": "You have not the privilege to make a new submission.", + // "submission.general.cannot_submit": "You don't have permission to make a new submission.", "submission.general.cannot_submit": "No tiene los permisos para realizar un nuevo envío.", // "submission.general.deposit": "Deposit", @@ -5985,7 +5911,6 @@ // "submission.general.save-later": "Save for later", "submission.general.save-later": "Guardar para más adelante", - // "submission.import-external.page.title": "Import metadata from an external source", "submission.import-external.page.title": "Importar metadatos desde una fuente externa", @@ -6297,6 +6222,7 @@ // "submission.sections.describe.relationship-lookup.search-tab.tab-title.isJournalOfPublication": "Local Journals ({{ count }})", "submission.sections.describe.relationship-lookup.search-tab.tab-title.isJournalOfPublication": "Revistas locales ({{ count }})", + // "submission.sections.describe.relationship-lookup.search-tab.tab-title.Project": "Local Projects ({{ count }})", "submission.sections.describe.relationship-lookup.search-tab.tab-title.Project": "Proyectos locales ({{ count }})", @@ -6320,16 +6246,18 @@ // "submission.sections.describe.relationship-lookup.search-tab.tab-title.isJournalIssueOfPublication": "Local Journal Issues ({{ count }})", "submission.sections.describe.relationship-lookup.search-tab.tab-title.isJournalIssueOfPublication": "Números de revista locales ({{ count }})", + // "submission.sections.describe.relationship-lookup.search-tab.tab-title.JournalIssue": "Local Journal Issues ({{ count }})", "submission.sections.describe.relationship-lookup.search-tab.tab-title.JournalIssue": "Números de revista locales ({{ count }})", // "submission.sections.describe.relationship-lookup.search-tab.tab-title.isJournalVolumeOfPublication": "Local Journal Volumes ({{ count }})", "submission.sections.describe.relationship-lookup.search-tab.tab-title.isJournalVolumeOfPublication": "Volúmenes de revista locales ({{ count }})", + // "submission.sections.describe.relationship-lookup.search-tab.tab-title.JournalVolume": "Local Journal Volumes ({{ count }})", "submission.sections.describe.relationship-lookup.search-tab.tab-title.JournalVolume": "Volúmenes de revista locales ({{ count }})", // "submission.sections.describe.relationship-lookup.search-tab.tab-title.sherpaJournal": "Sherpa Journals ({{ count }})", - "submission.sections.describe.relationship-lookup.search-tab.tab-title.sherpaJournal": "Revistas Sherpa ({{ count }})", + "submission.sections.describe.relationship-lookup.search-tab.tab-title.sherpaJournal": "Revistas Sherpa ({{ count }})", // "submission.sections.describe.relationship-lookup.search-tab.tab-title.sherpaPublisher": "Sherpa Publishers ({{ count }})", "submission.sections.describe.relationship-lookup.search-tab.tab-title.sherpaPublisher": "Editores Sherpa ({{ count }})", @@ -6379,9 +6307,6 @@ // "submission.sections.describe.relationship-lookup.title.isFundingAgencyOfProject": "Funder of the Project", "submission.sections.describe.relationship-lookup.title.isFundingAgencyOfProject": "Financiador del Proyecto", - - - // "submission.sections.describe.relationship-lookup.selection-tab.search-form.placeholder": "Search...", "submission.sections.describe.relationship-lookup.selection-tab.search-form.placeholder": "Buscar...", @@ -6390,11 +6315,13 @@ // "submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Journal Issues", "submission.sections.describe.relationship-lookup.title.isJournalIssueOfPublication": "Números de revista", + // "submission.sections.describe.relationship-lookup.title.JournalIssue": "Journal Issues", "submission.sections.describe.relationship-lookup.title.JournalIssue": "Números de revista", // "submission.sections.describe.relationship-lookup.title.isJournalVolumeOfPublication": "Journal Volumes", "submission.sections.describe.relationship-lookup.title.isJournalVolumeOfPublication": "Volúmenes de la revista", + // "submission.sections.describe.relationship-lookup.title.JournalVolume": "Journal Volumes", "submission.sections.describe.relationship-lookup.title.JournalVolume": "Volúmenes de la revista", @@ -6406,6 +6333,7 @@ // "submission.sections.describe.relationship-lookup.title.isFundingAgencyOfPublication": "Funding Agency", "submission.sections.describe.relationship-lookup.title.isFundingAgencyOfPublication": "Agencia financiadora", + // "submission.sections.describe.relationship-lookup.title.Project": "Projects", "submission.sections.describe.relationship-lookup.title.Project": "Proyectos", @@ -6453,6 +6381,7 @@ // "submission.sections.describe.relationship-lookup.selection-tab.title.isJournalVolumeOfPublication": "Selected Journal Volume", "submission.sections.describe.relationship-lookup.selection-tab.title.isJournalVolumeOfPublication": "Volumen de revista seleccionada", + // "submission.sections.describe.relationship-lookup.selection-tab.title.Project": "Selected Projects", "submission.sections.describe.relationship-lookup.selection-tab.title.Project": "Proyectos seleccionados", @@ -6476,6 +6405,7 @@ // "submission.sections.describe.relationship-lookup.selection-tab.title.isJournalIssueOfPublication": "Selected Issue", "submission.sections.describe.relationship-lookup.selection-tab.title.isJournalIssueOfPublication": "Número de revista seleccionados", + // "submission.sections.describe.relationship-lookup.selection-tab.title.JournalVolume": "Selected Journal Volume", "submission.sections.describe.relationship-lookup.selection-tab.title.JournalVolume": "Volúmenes de revista seleccionados", @@ -6484,6 +6414,7 @@ // "submission.sections.describe.relationship-lookup.selection-tab.title.isFundingOfPublication": "Selected Funding", "submission.sections.describe.relationship-lookup.selection-tab.title.isFundingOfPublication": "Financiamientos seleccionados", + // "submission.sections.describe.relationship-lookup.selection-tab.title.JournalIssue": "Selected Issue", "submission.sections.describe.relationship-lookup.selection-tab.title.JournalIssue": "Número seleccionado", @@ -6658,7 +6589,6 @@ // "submission.sections.submit.progressbar.sherpaPolicies": "Publisher open access policy information", "submission.sections.submit.progressbar.sherpaPolicies": "Información sobre políticas editoriales de acceso abierto", - // "submission.sections.sherpa-policy.title-empty": "No publisher policy information available. If your work has an associated ISSN, please enter it above to see any related publisher open access policies.", "submission.sections.sherpa-policy.title-empty": "No se encuentra disponible la información sobre política editorial. Si tiene un ISSN asociado, introdúzcalo arriba para ver información sobre políticas editoriales de acceso abierto.", @@ -6839,10 +6769,9 @@ // "submission.sections.license.required": "You must accept the license", "submission.sections.license.required": "Debe aceptar la licencia", - // "submission.sections.license.notgranted": "You must accept the license", + // "submission.sections.license.notgranted": "You must accept the license", "submission.sections.license.notgranted": "Debe aceptar la licencia", - // "submission.sections.sherpa.publication.information": "Publication information", "submission.sections.sherpa.publication.information": "Información de la Publicación", @@ -6868,7 +6797,7 @@ "submission.sections.sherpa.publisher.policy": "Política editorial", // "submission.sections.sherpa.publisher.policy.description": "The below information was found via Sherpa Romeo. Based on the policies of your publisher, it provides advice regarding whether an embargo may be necessary and/or which files you are allowed to upload. If you have questions, please contact your site administrator via the feedback form in the footer.", - "submission.sections.sherpa.publisher.policy.description": "La siguiente informacióm se encontró via Sherpa Romeo. En base a esas políticas, se proporcionan consejos sobre las necesidad de un embargo y de aquellos ficheros que puede utilizar. Si tiene dudas, por favor, contacte con el administrador del repositorio mediante el formulario de sugerencias.", + "submission.sections.sherpa.publisher.policy.description": "La siguiente informacióm se encontró vía Sherpa Romeo. En base a esas políticas, se proporcionan consejos sobre las necesidad de un embargo y de aquellos ficheros que puede utilizar. Si tiene dudas, por favor, contacte con el administrador del repositorio mediante el formulario de sugerencias.", // "submission.sections.sherpa.publisher.policy.openaccess": "Open Access pathways permitted by this journal's policy are listed below by article version. Click on a pathway for a more detailed view", "submission.sections.sherpa.publisher.policy.openaccess": "Los caminos hacia el Acceso Abierto que esta revista permite se relacionan, por versión de artículo, abajo. Pulse en un camino para una visión mas detallada", @@ -6921,16 +6850,12 @@ // "submission.sections.sherpa.error.message": "There was an error retrieving sherpa informations", "submission.sections.sherpa.error.message": "Hubo un error recuperando la información de Sherpa", - - // "submission.submit.breadcrumbs": "New submission", "submission.submit.breadcrumbs": "Nuevo envío", // "submission.submit.title": "New submission", "submission.submit.title": "Nuevo envío", - - // "submission.workflow.generic.delete": "Delete", "submission.workflow.generic.delete": "Eliminar", @@ -6949,21 +6874,18 @@ // "submission.workflow.generic.view-help": "Select this option to view the item's metadata.", "submission.workflow.generic.view-help": "Seleccione esta opción para ver los metadatos del ítem.", - // "submission.workflow.generic.submit_select_reviewer": "Select Reviewer", "submission.workflow.generic.submit_select_reviewer": "Seleccionar revisor", // "submission.workflow.generic.submit_select_reviewer-help": "", "submission.workflow.generic.submit_select_reviewer-help": "", - // "submission.workflow.generic.submit_score": "Rate", "submission.workflow.generic.submit_score": "Evaluar", // "submission.workflow.generic.submit_score-help": "", "submission.workflow.generic.submit_score-help": "", - // "submission.workflow.tasks.claimed.approve": "Approve", "submission.workflow.tasks.claimed.approve": "Aprobar", @@ -7006,8 +6928,6 @@ // "submission.workflow.tasks.claimed.return_help": "Return the task to the pool so that another user may perform the task.", "submission.workflow.tasks.claimed.return_help": "Devuelva la tarea al pool para que otro usuario pueda realizarla.", - - // "submission.workflow.tasks.generic.error": "Error occurred during operation...", "submission.workflow.tasks.generic.error": "Ocurrió un error durante la operación...", @@ -7020,8 +6940,6 @@ // "submission.workflow.tasks.generic.success": "Operation successful", "submission.workflow.tasks.generic.success": "Operación exitosa", - - // "submission.workflow.tasks.pool.claim": "Claim", "submission.workflow.tasks.pool.claim": "Asumir tarea", @@ -7034,13 +6952,14 @@ // "submission.workflow.tasks.pool.show-detail": "Show detail", "submission.workflow.tasks.pool.show-detail": "Mostrar detalle", - // "submission.workspace.generic.view": "View", "submission.workspace.generic.view": "Ver", // "submission.workspace.generic.view-help": "Select this option to view the item's metadata.", "submission.workspace.generic.view-help": "Seleccione esta opción para ver los metadatos del ítem.", + // "submitter.empty": "N/A", + "submitter.empty": "N/A", // "subscriptions.title": "Subscriptions", "subscriptions.title": "Suscripciones", @@ -7147,7 +7066,6 @@ // "subscriptions.table.empty.message": "You do not have any subscriptions at this time. To subscribe to email updates for a Community or Collection, use the subscription button on the object's page.", "subscriptions.table.empty.message": "Usted no tiene suscripciones. Para subscribirse a las actualizaciones por correo electrónico de una Comunidad o Colección, utilice el botón de suscripción en la página del objeto.", - // "thumbnail.default.alt": "Thumbnail Image", "thumbnail.default.alt": "Miniatura", @@ -7172,13 +7090,9 @@ // "thumbnail.person.placeholder": "No Profile Picture Available", "thumbnail.person.placeholder": "No hay imagen de perfil disponible", - - // "title": "DSpace", "title": "DSpace", - - // "vocabulary-treeview.header": "Hierarchical tree view", "vocabulary-treeview.header": "Vista de árbol jerárquico", @@ -7230,8 +7144,6 @@ // "virtual-metadata.delete-relationship.modal-head": "Select the items for which you want to save the virtual metadata as real metadata", "virtual-metadata.delete-relationship.modal-head": "Seleccione los ítems para los que desea guardar los metadatos virtuales como metadatos reales", - - // "supervisedWorkspace.search.results.head": "Supervised Items", "supervisedWorkspace.search.results.head": "Ítems supervisados", @@ -7247,8 +7159,6 @@ // "supervision.search.results.head": "Workflow and Workspace tasks", "supervision.search.results.head": "Tareas del flujo de trabajo y del espacio de trabajo", - - // "workflow-item.edit.breadcrumbs": "Edit workflowitem", "workflow-item.edit.breadcrumbs": "Editar ítem del flujo de trabajo", @@ -7279,7 +7189,6 @@ // "workflow-item.delete.button.confirm": "Delete", "workflow-item.delete.button.confirm": "Borrar", - // "workflow-item.send-back.notification.success.title": "Sent back to submitter", "workflow-item.send-back.notification.success.title": "Devolver al remitente", @@ -7313,11 +7222,33 @@ // "workspace-item.view.title": "Workspace View", "workspace-item.view.title": "Vista del flujo de trabajo", + // "workspace-item.delete.breadcrumbs": "Workspace Delete", + "workspace-item.delete.breadcrumbs": "Borrar espacio de trabajo", + + // "workspace-item.delete.header": "Delete workspace item", + "workspace-item.delete.header": "Borrar ítem del espacio de trabajo", + + // "workspace-item.delete.button.confirm": "Delete", + "workspace-item.delete.button.confirm": "Borrar", + + // "workspace-item.delete.button.cancel": "Cancel", + "workspace-item.delete.button.cancel": "Cancelar", + + // "workspace-item.delete.notification.success.title": "Deleted", + "workspace-item.delete.notification.success.title": "Borrado", + + // "workspace-item.delete.title": "This workspace item was successfully deleted", + "workspace-item.delete.title": "Este ítem del espacio de trabajo se eliminó correctamente", + + // "workspace-item.delete.notification.error.title": "Something went wrong", + "workspace-item.delete.notification.error.title": "Algo salió mal", + + // "workspace-item.delete.notification.error.content": "The workspace item could not be deleted", + "workspace-item.delete.notification.error.content": "Este ítem del espacio de trabajo no pudo borrarse", // "workflow-item.advanced.title": "Advanced workflow", "workflow-item.advanced.title": "Flujo de trabajo avanzado", - // "workflow-item.selectrevieweraction.notification.success.title": "Selected reviewer", "workflow-item.selectrevieweraction.notification.success.title": "Revisor seleccionado", @@ -7342,7 +7273,6 @@ // "workflow-item.selectrevieweraction.button.confirm": "Confirm", "workflow-item.selectrevieweraction.button.confirm": "Confirmar", - // "workflow-item.scorereviewaction.notification.success.title": "Rating review", "workflow-item.scorereviewaction.notification.success.title": "Revisión de evaluación", @@ -7379,7 +7309,7 @@ // "idle-modal.extend-session": "Extend session", "idle-modal.extend-session": "Prolongar la sesión", - // "researcher.profile.action.processing" : "Processing...", + // "researcher.profile.action.processing": "Processing...", "researcher.profile.action.processing": "Procesando...", // "researcher.profile.associated": "Researcher profile associated", @@ -7412,10 +7342,10 @@ // "researcher.profile.view": "View", "researcher.profile.view": "Ver", - // "researcher.profile.private.visibility" : "PRIVATE", + // "researcher.profile.private.visibility": "PRIVATE", "researcher.profile.private.visibility": "PRIVADO", - // "researcher.profile.public.visibility" : "PUBLIC", + // "researcher.profile.public.visibility": "PUBLIC", "researcher.profile.public.visibility": "PÚBLICO", // "researcher.profile.status": "Status:", @@ -7424,16 +7354,16 @@ // "researcherprofile.claim.not-authorized": "You are not authorized to claim this item. For more details contact the administrator(s).", "researcherprofile.claim.not-authorized": "No está autorizado pare reclamar este ítem. Contacte con el administrador para mas detalles.", - // "researcherprofile.error.claim.body" : "An error occurred while claiming the profile, please try again later", + // "researcherprofile.error.claim.body": "An error occurred while claiming the profile, please try again later", "researcherprofile.error.claim.body": "Hubo un error reclamando el perfil, por favor, inténtelo mas tarde", - // "researcherprofile.error.claim.title" : "Error", + // "researcherprofile.error.claim.title": "Error", "researcherprofile.error.claim.title": "Error", - // "researcherprofile.success.claim.body" : "Profile claimed with success", + // "researcherprofile.success.claim.body": "Profile claimed with success", "researcherprofile.success.claim.body": "Perfil reclamado con éxito", - // "researcherprofile.success.claim.title" : "Success", + // "researcherprofile.success.claim.title": "Success", "researcherprofile.success.claim.title": "Éxito", // "person.page.orcid.create": "Create an ORCID ID", @@ -7442,7 +7372,7 @@ // "person.page.orcid.granted-authorizations": "Granted authorizations", "person.page.orcid.granted-authorizations": "Autorizaciones concedidas", - // "person.page.orcid.grant-authorizations" : "Grant authorizations", + // "person.page.orcid.grant-authorizations": "Grant authorizations", "person.page.orcid.grant-authorizations": "Conceder autorizaciones", // "person.page.orcid.link": "Connect to ORCID ID", @@ -7458,7 +7388,7 @@ "person.page.orcid.orcid-not-linked-message": "El ORCID iD de este perfil ({{ orcid }}) no se ha conectado aún con una cuenta en el registro ORCID o la conexión caducó.", // "person.page.orcid.unlink": "Disconnect from ORCID", - "person.page.orcid.unlink": "Desconectar de ORCID", + "person.page.orcid.unlink": "Desconectar de ORCID", // "person.page.orcid.unlink.processing": "Processing...", "person.page.orcid.unlink.processing": "Procesando...", @@ -7490,44 +7420,44 @@ // "person.page.orcid.save.preference.changes": "Update settings", "person.page.orcid.save.preference.changes": "Actualizar configuración", - // "person.page.orcid.sync-profile.affiliation" : "Affiliation", + // "person.page.orcid.sync-profile.affiliation": "Affiliation", "person.page.orcid.sync-profile.affiliation": "Afiliación", - // "person.page.orcid.sync-profile.biographical" : "Biographical data", + // "person.page.orcid.sync-profile.biographical": "Biographical data", "person.page.orcid.sync-profile.biographical": "Biografía", - // "person.page.orcid.sync-profile.education" : "Education", + // "person.page.orcid.sync-profile.education": "Education", "person.page.orcid.sync-profile.education": "Grados", - // "person.page.orcid.sync-profile.identifiers" : "Identifiers", + // "person.page.orcid.sync-profile.identifiers": "Identifiers", "person.page.orcid.sync-profile.identifiers": "Identificadores", - // "person.page.orcid.sync-fundings.all" : "All fundings", + // "person.page.orcid.sync-fundings.all": "All fundings", "person.page.orcid.sync-fundings.all": "Todas las financiaciones", - // "person.page.orcid.sync-fundings.mine" : "My fundings", + // "person.page.orcid.sync-fundings.mine": "My fundings", "person.page.orcid.sync-fundings.mine": "Mi financiación", - // "person.page.orcid.sync-fundings.my_selected" : "Selected fundings", + // "person.page.orcid.sync-fundings.my_selected": "Selected fundings", "person.page.orcid.sync-fundings.my_selected": "Financiaciones seleccionadas", - // "person.page.orcid.sync-fundings.disabled" : "Disabled", + // "person.page.orcid.sync-fundings.disabled": "Disabled", "person.page.orcid.sync-fundings.disabled": "Deshabilitado", - // "person.page.orcid.sync-publications.all" : "All publications", + // "person.page.orcid.sync-publications.all": "All publications", "person.page.orcid.sync-publications.all": "Todas las publicaciones", - // "person.page.orcid.sync-publications.mine" : "My publications", + // "person.page.orcid.sync-publications.mine": "My publications", "person.page.orcid.sync-publications.mine": "Mis publicaciones", - // "person.page.orcid.sync-publications.my_selected" : "Selected publications", + // "person.page.orcid.sync-publications.my_selected": "Selected publications", "person.page.orcid.sync-publications.my_selected": "Publicaciones seleccionadas", - // "person.page.orcid.sync-publications.disabled" : "Disabled", + // "person.page.orcid.sync-publications.disabled": "Disabled", "person.page.orcid.sync-publications.disabled": "Deshabilitado", - // "person.page.orcid.sync-queue.discard" : "Discard the change and do not synchronize with the ORCID registry", - "person.page.orcid.sync-queue.discard": "Deshechar el cambio y no sincronizar con ORCID", + // "person.page.orcid.sync-queue.discard": "Discard the change and do not synchronize with the ORCID registry", + "person.page.orcid.sync-queue.discard": "Deshechar el cambio y no sincronizar con el registro ORCID", // "person.page.orcid.sync-queue.discard.error": "The discarding of the ORCID queue record failed", "person.page.orcid.sync-queue.discard.error": "Falló el borrado del registro ORCID en la cola", @@ -7538,13 +7468,13 @@ // "person.page.orcid.sync-queue.empty-message": "The ORCID queue registry is empty", "person.page.orcid.sync-queue.empty-message": "La cola del registro de ORCID está vacía", - // "person.page.orcid.sync-queue.table.header.type" : "Type", + // "person.page.orcid.sync-queue.table.header.type": "Type", "person.page.orcid.sync-queue.table.header.type": "Tipo", - // "person.page.orcid.sync-queue.table.header.description" : "Description", + // "person.page.orcid.sync-queue.table.header.description": "Description", "person.page.orcid.sync-queue.table.header.description": "Descripción", - // "person.page.orcid.sync-queue.table.header.action" : "Action", + // "person.page.orcid.sync-queue.table.header.action": "Action", "person.page.orcid.sync-queue.table.header.action": "Acción", // "person.page.orcid.sync-queue.description.affiliation": "Affiliations", @@ -7610,7 +7540,7 @@ // "person.page.orcid.sync-queue.tooltip.researcher_urls": "Researcher url", "person.page.orcid.sync-queue.tooltip.researcher_urls": "URL del investigador", - // "person.page.orcid.sync-queue.send" : "Synchronize with ORCID registry", + // "person.page.orcid.sync-queue.send": "Synchronize with ORCID registry", "person.page.orcid.sync-queue.send": "Sincronizar con el registro ORCID", // "person.page.orcid.sync-queue.send.unauthorized-error.title": "The submission to ORCID failed for missing authorizations.", @@ -7620,13 +7550,13 @@ "person.page.orcid.sync-queue.send.unauthorized-error.content": "Pulse aquí para conceder de nuevo los permisos requeridos. Si el problema continuase, contacte con el administrador", // "person.page.orcid.sync-queue.send.bad-request-error": "The submission to ORCID failed because the resource sent to ORCID registry is not valid", - "person.page.orcid.sync-queue.send.bad-request-error": "El envío a ORCID falló debido a que el recurso que se envión no era válido", + "person.page.orcid.sync-queue.send.bad-request-error": "El envío a ORCID falló debido a que el recurso que se envión no era válido", // "person.page.orcid.sync-queue.send.error": "The submission to ORCID failed", "person.page.orcid.sync-queue.send.error": "Falló el envío a ORCID", // "person.page.orcid.sync-queue.send.conflict-error": "The submission to ORCID failed because the resource is already present on the ORCID registry", - "person.page.orcid.sync-queue.send.conflict-error": "El envío a ORCID falló debido a que el recurso ya existía en el registro ORCID", + "person.page.orcid.sync-queue.send.conflict-error": "El envío a ORCID falló debido a que el recurso ya existía en el registro ORCID", // "person.page.orcid.sync-queue.send.not-found-warning": "The resource does not exists anymore on the ORCID registry.", "person.page.orcid.sync-queue.send.not-found-warning": "El recurso no existe ya en el registro ORCID.", @@ -7664,8 +7594,8 @@ // "person.page.orcid.sync-queue.send.validation-error.organization.name-required": "The organization's name is required", "person.page.orcid.sync-queue.send.validation-error.organization.name-required": "Se requiere el nombre de la organización", - // "person.page.orcid.sync-queue.send.validation-error.publication.date-invalid" : "The publication date must be one year after 1900", - "person.page.orcid.sync-queue.send.validation-error.publication.date-invalid": "la fecha de la publicación debe ser posterior a 1900", + // "person.page.orcid.sync-queue.send.validation-error.publication.date-invalid": "The publication date must be one year after 1900", + "person.page.orcid.sync-queue.send.validation-error.publication.date-invalid": "La fecha de publicación debe ser posterior a 1900", // "person.page.orcid.sync-queue.send.validation-error.organization.address-required": "The organization to be sent requires an address", "person.page.orcid.sync-queue.send.validation-error.organization.address-required": "Se requiere la dirección de la organización", @@ -7698,7 +7628,7 @@ "person.page.orcid.synchronization-mode.label": "Modo sincronización", // "person.page.orcid.synchronization-mode-message": "Please select how you would like synchronization to ORCID to occur. The options include \"Manual\" (you must send your data to ORCID manually), or \"Batch\" (the system will send your data to ORCID via a scheduled script).", - "person.page.orcid.synchronization-mode-message": "Seleccione cómo prefiere realizar la sincronización con ORCID. Puede escoger \"Manual\" (usted envía los datos a ORCID manualmente), o \"Batch\" (el sistema enviará sus datos a ORCID via un programa planificado).", + "person.page.orcid.synchronization-mode-message": "Seleccione cómo prefiere realizar la sincronización con ORCID. Puede escoger \"Manual\" (usted envía los datos a ORCID manualmente), o \"Batch\" (el sistema enviará sus datos a ORCID vía un programa planificado).", // "person.page.orcid.synchronization-mode-funding-message": "Select whether to send your linked Project entities to your ORCID record's list of funding information.", "person.page.orcid.synchronization-mode-funding-message": "Seleccione si enviará información de sus entidades conectadas de tipo Proyecto a la información de financiación de ORCID.", @@ -7744,13 +7674,13 @@ // "person.orcid.registry.auth": "ORCID Authorizations", "person.orcid.registry.auth": "Autorizaciones ORCID", + // "home.recent-submissions.head": "Recent Submissions", "home.recent-submissions.head": "Envíos recientes", // "listable-notification-object.default-message": "This object couldn't be retrieved", "listable-notification-object.default-message": "Este objeto no se pudo recuperar", - // "system-wide-alert-banner.retrieval.error": "Something went wrong retrieving the system-wide alert banner", "system-wide-alert-banner.retrieval.error": "Algo salió mal al recuperar el banner de alerta del sistema", @@ -7766,8 +7696,6 @@ // "system-wide-alert-banner.countdown.minutes": "{{minutes}} minute(s):", "system-wide-alert-banner.countdown.minutes": "{{minutes}} minuto(s):", - - // "menu.section.system-wide-alert": "System-wide Alert", "menu.section.system-wide-alert": "Alerta del Sistema", @@ -7822,5 +7750,81 @@ // "admin.system-wide-alert.title": "System-wide Alerts", "admin.system-wide-alert.title": "Alertas del sistema", + // "item-access-control-title": "This form allows you to perform changes to the access conditions of the item's metadata or its bitstreams.", + "item-access-control-title": "Esta pantalla le permite realizar cambios en las condiciones de acceso a los metadatos o a los archivos del ítem.", + + // "collection-access-control-title": "This form allows you to perform changes to the access conditions of all the items owned by this collection. Changes may be performed to either all Item metadata or all content (bitstreams).", + "collection-access-control-title": "Esta pantalla le permite realizar cambios en las condiciones de acceso de todos los ítems de la colección. Puede realizar los cambios a los metadatos o a los archivos de todos los ítems.", + + // "community-access-control-title": "This form allows you to perform changes to the access conditions of all the items owned by any collection under this community. Changes may be performed to either all Item metadata or all content (bitstreams).", + "community-access-control-title": "Esta pantalla le permite realizar cambios en las condiciones de acceso de todos los ítems de todas las colecciones de esta comunidad. Puede realizar los cambios a los metadatos o a los archivos de todos los ítems.", + + // "access-control-item-header-toggle": "Item's Metadata", + "access-control-item-header-toggle": "Metadatos del ítem", + + // "access-control-bitstream-header-toggle": "Bitstreams", + "access-control-bitstream-header-toggle": "Archivos", + + // "access-control-mode": "Mode", + "access-control-mode": "Modo", + + // "access-control-access-conditions": "Access conditions", + "access-control-access-conditions": "Condiciones de accceso", + + // "access-control-no-access-conditions-warning-message": "Currently, no access conditions are specified below. If executed, this will replace the current access conditions with the default access conditions inherited from the owning collection.", + "access-control-no-access-conditions-warning-message": "No ha especificado condiciones de acceso. Si lo ejecuta, se sustituirán las condiciones actuales con las condiones heredadas de la colección de pertenencia.", + + // "access-control-replace-all": "Replace access conditions", + "access-control-replace-all": "Sustituir condiciones de accceso", + + // "access-control-add-to-existing": "Add to existing ones", + "access-control-add-to-existing": "Añadir a las existentes", + + // "access-control-limit-to-specific": "Limit the changes to specific bitstreams", + "access-control-limit-to-specific": "Limitar los cambios a ficheros específicos", + + // "access-control-process-all-bitstreams": "Update all the bitstreams in the item", + "access-control-process-all-bitstreams": "Actualizar todos los archivos del ítem", + + // "access-control-bitstreams-selected": "bitstreams selected", + "access-control-bitstreams-selected": "archivos seleccionados", + + // "access-control-cancel": "Cancel", + "access-control-cancel": "Cancelar", + + // "access-control-execute": "Execute", + "access-control-execute": "Ejecutar", + + // "access-control-add-more": "Add more", + "access-control-add-more": "Añadir mas", + + // "access-control-select-bitstreams-modal.title": "Select bitstreams", + "access-control-select-bitstreams-modal.title": "Seleccionar archivos", + + // "access-control-select-bitstreams-modal.no-items": "No items to show.", + "access-control-select-bitstreams-modal.no-items": "No hay ítems para mostrar.", + + // "access-control-select-bitstreams-modal.close": "Close", + "access-control-select-bitstreams-modal.close": "Cerrar", + + // "access-control-option-label": "Access condition type", + "access-control-option-label": "Tipo de condición de acceso", + + // "access-control-option-note": "Choose an access condition to apply to selected objects.", + "access-control-option-note": "Seleccione una condición de acceso para aplicar a los objetos seleccionados.", + + // "access-control-option-start-date": "Grant access from", + "access-control-option-start-date": "Establecer acceso desde", + + // "access-control-option-start-date-note": "Select the date from which the related access condition is applied", + "access-control-option-start-date-note": "Escoja la fecha desde la cuál se aplicarán las condiciones de acceso especificadas", + + // "access-control-option-end-date": "Grant access until", + "access-control-option-end-date": "Establecer acceso hasta", + + // "access-control-option-end-date-note": "Select the date until which the related access condition is applied", + "access-control-option-end-date-note": "Escoja la fecha hasta la cuál se aplicarán las condiciones de acceso especificadas", + + } From a4eaf02a4749142828245f58c2ab82fa36f196cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Fern=C3=A1ndez=20Celorio?= Date: Tue, 22 Aug 2023 12:57:08 +0200 Subject: [PATCH 0052/1529] Some lint errors fixed (cherry picked from commit 1885638ba6fadca4c99043db4ce52646bce435a3) --- src/assets/i18n/es.json5 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/assets/i18n/es.json5 b/src/assets/i18n/es.json5 index 24ce7159e3..0d5b27473c 100644 --- a/src/assets/i18n/es.json5 +++ b/src/assets/i18n/es.json5 @@ -854,7 +854,7 @@ // "admin.batch-import.page.toggle.help": "It is possible to perform import either with file upload or via URL, use above toggle to set the input source", "admin.batch-import.page.toggle.help": "Es posible realizar una importación tanto mediante una subida de fichero como a través de una URL. Use el selector de arriba para especificar la fuente de entrada.", - + // "admin.metadata-import.page.dropMsg": "Drop a metadata CSV to import", "admin.metadata-import.page.dropMsg": "Suelta un CSV de metadatos para importar", @@ -2677,7 +2677,7 @@ "grant-request-copy.header": "Conceder solicitud de copia de documento", // "grant-request-copy.intro": "A message will be sent to the applicant of the request. The requested document(s) will be attached.", - "grant-request-copy.intro": "Este mensaje se enviará al solicitante de la copia. Se le anexará una copia del documento.", + "grant-request-copy.intro": "Este mensaje se enviará al solicitante de la copia. Se le anexará una copia del documento.", // "grant-request-copy.success": "Successfully granted item request", "grant-request-copy.success": "Solicitud de ítem concedida exitosamente", @@ -2686,13 +2686,13 @@ "health.breadcrumbs": "Chequeos", // "health-page.heading": "Health", - "health-page.heading": "Chequeos", + "health-page.heading": "Chequeos", // "health-page.info-tab": "Info", - "health-page.info-tab": "Información", + "health-page.info-tab": "Información", // "health-page.status-tab": "Status", - "health-page.status-tab": "Estado", + "health-page.status-tab": "Estado", // "health-page.error.msg": "The health check service is temporarily unavailable", "health-page.error.msg": "El servicio de comprobación no se encuentra temporalmente disponible", @@ -4744,7 +4744,7 @@ "process.new.notification.error.content": "Se produjo un error al crear este proceso.", // "process.new.notification.error.max-upload.content": "The file exceeds the maximum upload size", - "process.new.notification.error.max-upload.content": "El fichero sobrepasa el límte máximo de subida", + "process.new.notification.error.max-upload.content": "El fichero sobrepasa el límte máximo de subida", // "process.new.header": "Create a new process", "process.new.header": "Crea un nuevo proceso", From 9afbd8d746738c2b766267a8fac0da9d9f096d2e Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Fri, 18 Aug 2023 13:20:19 -0600 Subject: [PATCH 0053/1529] =?UTF-8?q?=F0=9F=90=9B=20fix=20when=20navbar=20?= =?UTF-8?q?expands=20on=20firefox?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 60706720e47abc19b7528719e63676b9b5fa50be) --- src/themes/dspace/app/navbar/navbar.component.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/themes/dspace/app/navbar/navbar.component.scss b/src/themes/dspace/app/navbar/navbar.component.scss index d3aea9f078..2bcd38d5f4 100644 --- a/src/themes/dspace/app/navbar/navbar.component.scss +++ b/src/themes/dspace/app/navbar/navbar.component.scss @@ -7,7 +7,7 @@ nav.navbar { /** Mobile menu styling **/ @media screen and (max-width: map-get($grid-breakpoints, md)-0.02) { .navbar { - width: 100%; + width: 100vw; background-color: var(--bs-white); position: absolute; overflow: hidden; From f88638e9fee32b820c2d983dd112ea65cecb6540 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Sun, 13 Aug 2023 12:10:25 -0600 Subject: [PATCH 0054/1529] =?UTF-8?q?=F0=9F=90=9B=20Fix=20Value=20of=20dro?= =?UTF-8?q?pdown=20changes=20automatically=20on=20item=20submission=20page?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 651305952d706f6c45eb47ff37dfb94f91979760) --- .../dynamic-scrollable-dropdown.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.html index 6e2d29b789..1ac38e9943 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.html +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.html @@ -43,7 +43,7 @@
diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html index b84ef6f6a8..cc12b5dea6 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html @@ -15,15 +15,23 @@
- {{entry.value | dsTruncate:['150']}} + {{entry.value | dsTruncate:['150']}} - {{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}} + {{'submission.sections.upload.no-entry' | translate}} {{fileDescrKey}} + +
+ {{'admin.registries.bitstream-formats.edit.head' | translate:{format: fileFormat} }} +
+
+ Checksum {{fileCheckSum.checkSumAlgorithm}}: {{fileCheckSum.value}} +
diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index bb2fea20f8..b0ea2487e1 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -1,9 +1,11 @@ -import { Component, Input, OnInit } from '@angular/core'; +import {Component, Input, OnInit} from '@angular/core'; -import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; -import { isNotEmpty } from '../../../../../shared/empty.util'; -import { Metadata } from '../../../../../core/shared/metadata.utils'; -import { MetadataMap, MetadataValue } from '../../../../../core/shared/metadata.models'; +import { + WorkspaceitemSectionUploadFileObject +} from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; +import {isNotEmpty} from '../../../../../shared/empty.util'; +import {Metadata} from '../../../../../core/shared/metadata.utils'; +import {MetadataMap, MetadataValue} from '../../../../../core/shared/metadata.models'; /** * This component allow to show bitstream's metadata @@ -38,6 +40,13 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit { */ public fileDescrKey = 'Description'; + public fileFormat!: string; + + public fileCheckSum!: { + checkSumAlgorithm: string; + value: string; + }; + /** * Initialize instance variables */ @@ -46,6 +55,8 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit { this.metadata[this.fileTitleKey] = Metadata.all(this.fileData.metadata, 'dc.title'); this.metadata[this.fileDescrKey] = Metadata.all(this.fileData.metadata, 'dc.description'); } + this.fileCheckSum = this.fileData.checkSum; + this.fileFormat = this.fileData.format.shortDescription; } /** From 5daf993451d8d75c3fe2260f70d2171184a0f1c9 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Fri, 8 Sep 2023 11:51:42 -0600 Subject: [PATCH 0063/1529] =?UTF-8?q?=F0=9F=8E=A8revert=20unnecessary=20fo?= =?UTF-8?q?rmat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 13e4052c4da07014a1c01087bfc6d293a8bb71c5) --- .../workspaceitem-section-upload-file.model.ts | 4 ++-- .../file/view/section-upload-file-view.component.ts | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts index 59a8faf634..785d7c402f 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts @@ -1,5 +1,5 @@ -import {SubmissionUploadFileAccessConditionObject} from './submission-upload-file-access-condition.model'; -import {WorkspaceitemSectionFormObject} from './workspaceitem-section-form.model'; +import { SubmissionUploadFileAccessConditionObject } from './submission-upload-file-access-condition.model'; +import { WorkspaceitemSectionFormObject } from './workspaceitem-section-form.model'; /** * An interface to represent submission's upload section file entry. diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index b0ea2487e1..b15b0ab321 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -1,11 +1,9 @@ -import {Component, Input, OnInit} from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; -import { - WorkspaceitemSectionUploadFileObject -} from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; -import {isNotEmpty} from '../../../../../shared/empty.util'; -import {Metadata} from '../../../../../core/shared/metadata.utils'; -import {MetadataMap, MetadataValue} from '../../../../../core/shared/metadata.models'; +import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; +import { isNotEmpty } from '../../../../../shared/empty.util'; +import { Metadata } from '../../../../../core/shared/metadata.utils'; +import { MetadataMap, MetadataValue } from '../../../../../core/shared/metadata.models'; /** * This component allow to show bitstream's metadata From 22538f30dc5d615675fc1eb444c803fef80bbb5f Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Fri, 8 Sep 2023 14:28:23 -0500 Subject: [PATCH 0064/1529] Update workspaceitem-section-upload-file.model.ts Fix code comment (cherry picked from commit 01c8a4d9c3347cb5b30d4d912a3f7e18b81f989a) --- .../models/workspaceitem-section-upload-file.model.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts index 785d7c402f..725e646d76 100644 --- a/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts +++ b/src/app/core/submission/models/workspaceitem-section-upload-file.model.ts @@ -30,7 +30,7 @@ export class WorkspaceitemSectionUploadFileObject { }; /** - * The file check sum + * The file format information */ format: { shortDescription: string, From 8d295419c7f9b0f30194d4302c739d4e0b5d2658 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Sat, 19 Aug 2023 14:40:28 -0600 Subject: [PATCH 0065/1529] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor=20chain?= =?UTF-8?q?=20of=20observables=20to=20avoid=20async=20issues?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 2dc9fd44d7e151f7e96bff16665edf0a09226249) --- .../metadata-schema-form.component.ts | 179 ++++++++++-------- 1 file changed, 100 insertions(+), 79 deletions(-) diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts index 1992289ff7..f5fcdef78d 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts @@ -1,4 +1,10 @@ -import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core'; +import { + Component, + EventEmitter, + OnDestroy, + OnInit, + Output, +} from '@angular/core'; import { DynamicFormControlModel, DynamicFormGroupModel, @@ -8,20 +14,19 @@ import { import { UntypedFormGroup } from '@angular/forms'; import { RegistryService } from '../../../../core/registry/registry.service'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; -import { take } from 'rxjs/operators'; +import { switchMap, take } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; -import { combineLatest } from 'rxjs'; +import { Observable, combineLatest } from 'rxjs'; import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; @Component({ selector: 'ds-metadata-schema-form', - templateUrl: './metadata-schema-form.component.html' + templateUrl: './metadata-schema-form.component.html', }) /** * A form used for creating and editing metadata schemas */ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { - /** * A unique id used for ds-form */ @@ -53,14 +58,14 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { formLayout: DynamicFormLayout = { name: { grid: { - host: 'col col-sm-6 d-inline-block' - } + host: 'col col-sm-6 d-inline-block', + }, }, namespace: { grid: { - host: 'col col-sm-6 d-inline-block' - } - } + host: 'col col-sm-6 d-inline-block', + }, + }, }; /** @@ -73,63 +78,67 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { */ @Output() submitForm: EventEmitter = new EventEmitter(); - constructor(public registryService: RegistryService, private formBuilderService: FormBuilderService, private translateService: TranslateService) { - } + constructor( + public registryService: RegistryService, + private formBuilderService: FormBuilderService, + private translateService: TranslateService + ) {} ngOnInit() { combineLatest([ this.translateService.get(`${this.messagePrefix}.name`), - this.translateService.get(`${this.messagePrefix}.namespace`) + this.translateService.get(`${this.messagePrefix}.namespace`), ]).subscribe(([name, namespace]) => { this.name = new DynamicInputModel({ - id: 'name', - label: name, - name: 'name', - validators: { - required: null, - pattern: '^[^. ,]*$', - maxLength: 32, - }, - required: true, - errorMessages: { - pattern: 'error.validation.metadata.name.invalid-pattern', - maxLength: 'error.validation.metadata.name.max-length', - }, - }); + id: 'name', + label: name, + name: 'name', + validators: { + required: null, + pattern: '^[^. ,]*$', + maxLength: 32, + }, + required: true, + errorMessages: { + pattern: 'error.validation.metadata.name.invalid-pattern', + maxLength: 'error.validation.metadata.name.max-length', + }, + }); this.namespace = new DynamicInputModel({ - id: 'namespace', - label: namespace, - name: 'namespace', - validators: { - required: null, - maxLength: 256, - }, - required: true, - errorMessages: { - maxLength: 'error.validation.metadata.namespace.max-length', - }, - }); + id: 'namespace', + label: namespace, + name: 'namespace', + validators: { + required: null, + maxLength: 256, + }, + required: true, + errorMessages: { + maxLength: 'error.validation.metadata.namespace.max-length', + }, + }); this.formModel = [ - new DynamicFormGroupModel( - { - id: 'metadatadataschemagroup', - group:[this.namespace, this.name] - }) + new DynamicFormGroupModel({ + id: 'metadatadataschemagroup', + group: [this.namespace, this.name], + }), ]; this.formGroup = this.formBuilderService.createFormGroup(this.formModel); - this.registryService.getActiveMetadataSchema().subscribe((schema: MetadataSchema) => { - if (schema == null) { - this.clearFields(); - } else { - this.formGroup.patchValue({ - metadatadataschemagroup: { - name: schema.prefix, - namespace: schema.namespace, - }, - }); - this.name.disabled = true; - } - }); + this.registryService + .getActiveMetadataSchema() + .subscribe((schema: MetadataSchema) => { + if (schema == null) { + this.clearFields(); + } else { + this.formGroup.patchValue({ + metadatadataschemagroup: { + name: schema.prefix, + namespace: schema.namespace, + }, + }); + this.name.disabled = true; + } + }); }); } @@ -147,30 +156,42 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { * Emit the updated/created schema using the EventEmitter submitForm */ onSubmit(): void { - this.registryService.clearMetadataSchemaRequests().subscribe(); - this.registryService.getActiveMetadataSchema().pipe(take(1)).subscribe( - (schema: MetadataSchema) => { - const values = { - prefix: this.name.value, - namespace: this.namespace.value - }; - if (schema == null) { - this.registryService.createOrUpdateMetadataSchema(Object.assign(new MetadataSchema(), values)).subscribe((newSchema) => { - this.submitForm.emit(newSchema); - }); - } else { - this.registryService.createOrUpdateMetadataSchema(Object.assign(new MetadataSchema(), schema, { - id: schema.id, - prefix: schema.prefix, - namespace: values.namespace, - })).subscribe((updatedSchema: MetadataSchema) => { - this.submitForm.emit(updatedSchema); - }); - } + const clearMetadataSchemaRequests$ = + this.registryService.clearMetadataSchemaRequests(); + + clearMetadataSchemaRequests$ + .pipe( + switchMap(() => + this.registryService.getActiveMetadataSchema().pipe(take(1)) + ), + switchMap((schema: MetadataSchema) => { + const metadataValues = { + prefix: this.name.value, + namespace: this.namespace.value, + }; + + let createOrUpdate$: Observable; + + if (schema == null) { + createOrUpdate$ = this.registryService.createOrUpdateMetadataSchema( + Object.assign(new MetadataSchema(), metadataValues) + ); + } else { + const updatedSchema = Object.assign(new MetadataSchema(), schema, { + namespace: metadataValues.namespace, + }); + createOrUpdate$ = + this.registryService.createOrUpdateMetadataSchema(updatedSchema); + } + + return createOrUpdate$; + }) + ) + .subscribe((updatedOrCreatedSchema: MetadataSchema) => { + this.submitForm.emit(updatedOrCreatedSchema); this.clearFields(); this.registryService.cancelEditMetadataSchema(); - } - ); + }); } /** From e3ea2cb2b001ccf08c28b1dd863bfaa0b82da146 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Sat, 19 Aug 2023 15:59:33 -0600 Subject: [PATCH 0066/1529] =?UTF-8?q?=F0=9F=90=9B=20fix=20bug=20of=20cachi?= =?UTF-8?q?ng=20when=20add=20new=20schema?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 9fb9e5848c70274b7917bead52643e3611308174) --- .../metadata-schema-form.component.ts | 74 ++++++++++--------- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts index f5fcdef78d..61766a4a10 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts @@ -14,7 +14,7 @@ import { import { UntypedFormGroup } from '@angular/forms'; import { RegistryService } from '../../../../core/registry/registry.service'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; -import { switchMap, take } from 'rxjs/operators'; +import { switchMap, take, tap } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; import { Observable, combineLatest } from 'rxjs'; import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; @@ -156,42 +156,48 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { * Emit the updated/created schema using the EventEmitter submitForm */ onSubmit(): void { - const clearMetadataSchemaRequests$ = - this.registryService.clearMetadataSchemaRequests(); + this.registryService + .getActiveMetadataSchema() + .pipe( + take(1), + switchMap((schema: MetadataSchema) => { + const metadataValues = { + prefix: this.name.value, + namespace: this.namespace.value, + }; - clearMetadataSchemaRequests$ - .pipe( - switchMap(() => - this.registryService.getActiveMetadataSchema().pipe(take(1)) - ), - switchMap((schema: MetadataSchema) => { - const metadataValues = { - prefix: this.name.value, - namespace: this.namespace.value, - }; + let createOrUpdate$: Observable; - let createOrUpdate$: Observable; + if (schema == null) { + createOrUpdate$ = + this.registryService.createOrUpdateMetadataSchema( + Object.assign(new MetadataSchema(), metadataValues) + ); + } else { + const updatedSchema = Object.assign( + new MetadataSchema(), + schema, + { + namespace: metadataValues.namespace, + } + ); + createOrUpdate$ = + this.registryService.createOrUpdateMetadataSchema( + updatedSchema + ); + } - if (schema == null) { - createOrUpdate$ = this.registryService.createOrUpdateMetadataSchema( - Object.assign(new MetadataSchema(), metadataValues) - ); - } else { - const updatedSchema = Object.assign(new MetadataSchema(), schema, { - namespace: metadataValues.namespace, - }); - createOrUpdate$ = - this.registryService.createOrUpdateMetadataSchema(updatedSchema); - } - - return createOrUpdate$; - }) - ) - .subscribe((updatedOrCreatedSchema: MetadataSchema) => { - this.submitForm.emit(updatedOrCreatedSchema); - this.clearFields(); - this.registryService.cancelEditMetadataSchema(); - }); + return createOrUpdate$; + }), + tap(() => { + this.registryService.clearMetadataSchemaRequests().subscribe(); + }) + ) + .subscribe((updatedOrCreatedSchema: MetadataSchema) => { + this.submitForm.emit(updatedOrCreatedSchema); + this.clearFields(); + this.registryService.cancelEditMetadataSchema(); + }); } /** From 161d7e069bcc074163ca5ab53c2e343742f3c719 Mon Sep 17 00:00:00 2001 From: Hugo Dominguez Date: Fri, 8 Sep 2023 11:31:26 -0600 Subject: [PATCH 0067/1529] =?UTF-8?q?=F0=9F=8E=A8=20revert=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 3e5524de69fa09808e3a7d0ab4042e5e3ffc98e0) --- .../metadata-schema-form.component.ts | 119 ++++++++---------- 1 file changed, 55 insertions(+), 64 deletions(-) diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts index 61766a4a10..24bf430661 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts @@ -1,10 +1,4 @@ -import { - Component, - EventEmitter, - OnDestroy, - OnInit, - Output, -} from '@angular/core'; +import { Component, EventEmitter, OnDestroy, OnInit, Output } from '@angular/core'; import { DynamicFormControlModel, DynamicFormGroupModel, @@ -21,12 +15,13 @@ import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model' @Component({ selector: 'ds-metadata-schema-form', - templateUrl: './metadata-schema-form.component.html', + templateUrl: './metadata-schema-form.component.html' }) /** * A form used for creating and editing metadata schemas */ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { + /** * A unique id used for ds-form */ @@ -58,14 +53,14 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { formLayout: DynamicFormLayout = { name: { grid: { - host: 'col col-sm-6 d-inline-block', - }, + host: 'col col-sm-6 d-inline-block' + } }, namespace: { grid: { - host: 'col col-sm-6 d-inline-block', - }, - }, + host: 'col col-sm-6 d-inline-block' + } + } }; /** @@ -78,67 +73,63 @@ export class MetadataSchemaFormComponent implements OnInit, OnDestroy { */ @Output() submitForm: EventEmitter = new EventEmitter(); - constructor( - public registryService: RegistryService, - private formBuilderService: FormBuilderService, - private translateService: TranslateService - ) {} + constructor(public registryService: RegistryService, private formBuilderService: FormBuilderService, private translateService: TranslateService) { + } ngOnInit() { combineLatest([ this.translateService.get(`${this.messagePrefix}.name`), - this.translateService.get(`${this.messagePrefix}.namespace`), + this.translateService.get(`${this.messagePrefix}.namespace`) ]).subscribe(([name, namespace]) => { this.name = new DynamicInputModel({ - id: 'name', - label: name, - name: 'name', - validators: { - required: null, - pattern: '^[^. ,]*$', - maxLength: 32, - }, - required: true, - errorMessages: { - pattern: 'error.validation.metadata.name.invalid-pattern', - maxLength: 'error.validation.metadata.name.max-length', - }, - }); + id: 'name', + label: name, + name: 'name', + validators: { + required: null, + pattern: '^[^. ,]*$', + maxLength: 32, + }, + required: true, + errorMessages: { + pattern: 'error.validation.metadata.name.invalid-pattern', + maxLength: 'error.validation.metadata.name.max-length', + }, + }); this.namespace = new DynamicInputModel({ - id: 'namespace', - label: namespace, - name: 'namespace', - validators: { - required: null, - maxLength: 256, - }, - required: true, - errorMessages: { - maxLength: 'error.validation.metadata.namespace.max-length', - }, - }); + id: 'namespace', + label: namespace, + name: 'namespace', + validators: { + required: null, + maxLength: 256, + }, + required: true, + errorMessages: { + maxLength: 'error.validation.metadata.namespace.max-length', + }, + }); this.formModel = [ - new DynamicFormGroupModel({ - id: 'metadatadataschemagroup', - group: [this.namespace, this.name], - }), + new DynamicFormGroupModel( + { + id: 'metadatadataschemagroup', + group:[this.namespace, this.name] + }) ]; this.formGroup = this.formBuilderService.createFormGroup(this.formModel); - this.registryService - .getActiveMetadataSchema() - .subscribe((schema: MetadataSchema) => { - if (schema == null) { - this.clearFields(); - } else { - this.formGroup.patchValue({ - metadatadataschemagroup: { - name: schema.prefix, - namespace: schema.namespace, - }, - }); - this.name.disabled = true; - } - }); + this.registryService.getActiveMetadataSchema().subscribe((schema: MetadataSchema) => { + if (schema == null) { + this.clearFields(); + } else { + this.formGroup.patchValue({ + metadatadataschemagroup: { + name: schema.prefix, + namespace: schema.namespace, + }, + }); + this.name.disabled = true; + } + }); }); } From b423b49cac0e33232782c580459946e0238adf41 Mon Sep 17 00:00:00 2001 From: Tim Donohue Date: Tue, 12 Sep 2023 13:57:26 -0500 Subject: [PATCH 0068/1529] Correct text of help info on edit group page (cherry picked from commit 49247430e50a708996bef1790c7cc2af2271113a) --- src/assets/i18n/en.json5 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index d12a45b8a8..ecbc43a660 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -508,9 +508,9 @@ "admin.access-control.groups.form.tooltip.editGroupPage": "On this page, you can modify the properties and members of a group. In the top section, you can edit the group name and description, unless this is an admin group for a collection or community, in which case the group name and description are auto-generated and cannot be edited. In the following sections, you can edit group membership. See [the wiki](https://wiki.lyrasis.org/display/DSDOC7x/Create+or+manage+a+user+group) for more details.", - "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "To add or remove an EPerson to/from this group, either click the 'Browse All' button or use the search bar below to search for users (use the dropdown to the left of the search bar to choose whether to search by metadata or by email). Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", + "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "To add or remove an EPerson to/from this group, either click the 'Browse All' button or use the search bar below to search for users (use the dropdown to the left of the search bar to choose whether to search by metadata or by email). Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages.", - "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "To add or remove a Subgroup to/from this group, either click the 'Browse All' button or use the search bar below to search for users. Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", + "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "To add or remove a Subgroup to/from this group, either click the 'Browse All' button or use the search bar below to search for groups. Then click the plus icon for each group you wish to add in the list below, or the trash can icon for each group you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages.", "admin.search.breadcrumbs": "Administrative Search", From 15c2af5fbf64bdbf1c55aa1ad85ea222544cfa39 Mon Sep 17 00:00:00 2001 From: "Mark H. Wood" Date: Tue, 22 Aug 2023 14:38:04 -0400 Subject: [PATCH 0069/1529] Graceful shutdown on SIGINT (e.g. from 'pm2 stop'). (cherry picked from commit 6709c3bb5ffe4f4c056debb1295ce499a6ea6932) --- package.json | 1 + server.ts | 23 +++++++++-- yarn.lock | 107 ++++++++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 122 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 9aec4e0823..69fff84bb4 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,7 @@ "fast-json-patch": "^3.1.1", "filesize": "^6.1.0", "http-proxy-middleware": "^1.0.5", + "http-terminator": "^3.2.0", "isbot": "^3.6.10", "js-cookie": "2.2.1", "js-yaml": "^4.1.0", diff --git a/server.ts b/server.ts index 4feda5209a..0fbec1beae 100644 --- a/server.ts +++ b/server.ts @@ -32,6 +32,7 @@ import isbot from 'isbot'; import { createCertificate } from 'pem'; import { createServer } from 'https'; import { json } from 'body-parser'; +import { createHttpTerminator } from 'http-terminator'; import { readFileSync } from 'fs'; import { join } from 'path'; @@ -488,7 +489,7 @@ function saveToCache(req, page: any) { */ function hasNotSucceeded(statusCode) { const rgx = new RegExp(/^20+/); - return !rgx.test(statusCode) + return !rgx.test(statusCode); } function retrieveHeaders(response) { @@ -526,12 +527,20 @@ function serverStarted() { * @param keys SSL credentials */ function createHttpsServer(keys) { - createServer({ + const listener = createServer({ key: keys.serviceKey, cert: keys.certificate }, app).listen(environment.ui.port, environment.ui.host, () => { serverStarted(); }); + + // Graceful shutdown when signalled + const terminator = createHttpTerminator({server: listener}); + process.on('SIGINT', ()=> { + console.debug('Closing HTTPS server on signal'); + terminator.terminate().catch(e => { console.error(e); }); + console.debug('HTTPS server closed'); + }); } function run() { @@ -540,9 +549,17 @@ function run() { // Start up the Node server const server = app(); - server.listen(port, host, () => { + const listener = server.listen(port, host, () => { serverStarted(); }); + + // Graceful shutdown when signalled + const terminator = createHttpTerminator({server: listener}); + process.on('SIGINT', ()=> { + console.debug('Closing HTTP server on signal'); + terminator.terminate().catch(e => { console.error(e); }); + console.debug('HTTP server closed.'); + }); } function start() { diff --git a/yarn.lock b/yarn.lock index 44625c4bd0..c5a82d9e75 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1761,6 +1761,11 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.39.0.tgz#58b536bcc843f4cd1e02a7e6171da5c040f4d44b" integrity sha512-kf9RB0Fg7NZfap83B3QOqOGg9QmD9yBudqQXzzOtn3i4y7ZUXe5ONeW34Gwi+TxhH4mvj72R1Zc300KUMa9Bng== +"@fastify/deepmerge@^1.0.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@fastify/deepmerge/-/deepmerge-1.3.0.tgz#8116858108f0c7d9fd460d05a7d637a13fe3239a" + integrity sha512-J8TOSBq3SoZbDhM9+R/u77hP93gz/rajSA+K2kGyijPpORPWUXHUpTaleoj+92As0S9uPRP7Oi8IqMf0u+ro6A== + "@fortawesome/fontawesome-free@^6.4.0": version "6.4.0" resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-6.4.0.tgz#1ee0c174e472c84b23cb46c995154dc383e3b4fe" @@ -3066,9 +3071,9 @@ ajv-keywords@^5.0.0: dependencies: fast-deep-equal "^3.1.3" -ajv@8.12.0, ajv@^8.8.0: +ajv@8.12.0, ajv@^8.10.0, ajv@^8.8.0: version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== dependencies: fast-deep-equal "^3.1.1" @@ -3543,6 +3548,11 @@ boolbase@^1.0.0: resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== +boolean@^3.1.4: + version "3.2.0" + resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.2.0.tgz#9e5294af4e98314494cbb17979fa54ca159f116b" + integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw== + bootstrap@^4.6.1: version "4.6.2" resolved "https://registry.npmjs.org/bootstrap/-/bootstrap-4.6.2.tgz" @@ -4647,6 +4657,11 @@ del@^2.2.0: pinkie-promise "^2.0.0" rimraf "^2.2.8" +delay@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/delay/-/delay-5.0.0.tgz#137045ef1b96e5071060dd5be60bf9334436bd1d" + integrity sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw== + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" @@ -5585,6 +5600,18 @@ fast-json-stable-stringify@2.1.0, fast-json-stable-stringify@^2.0.0: resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-json-stringify@^5.8.0: + version "5.8.0" + resolved "https://registry.yarnpkg.com/fast-json-stringify/-/fast-json-stringify-5.8.0.tgz#b229ed01ac5f92f3b82001a916c31324652f46d7" + integrity sha512-VVwK8CFMSALIvt14U8AvrSzQAwN/0vaVRiFFUVlpnXSnDGrSkOAO5MtzyN8oQNjLd5AqTW5OZRgyjoNuAuR3jQ== + dependencies: + "@fastify/deepmerge" "^1.0.0" + ajv "^8.10.0" + ajv-formats "^2.1.1" + fast-deep-equal "^3.1.3" + fast-uri "^2.1.0" + rfdc "^1.2.0" + fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" @@ -5595,6 +5622,18 @@ fast-memoize@^2.5.1: resolved "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz" integrity sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw== +fast-printf@^1.6.9: + version "1.6.9" + resolved "https://registry.yarnpkg.com/fast-printf/-/fast-printf-1.6.9.tgz#212f56570d2dc8ccdd057ee93d50dd414d07d676" + integrity sha512-FChq8hbz65WMj4rstcQsFB0O7Cy++nmbNfLYnD9cYv2cRn8EG6k/MGn9kO/tjO66t09DLDugj3yL+V2o6Qftrg== + dependencies: + boolean "^3.1.4" + +fast-uri@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/fast-uri/-/fast-uri-2.2.0.tgz#519a0f849bef714aad10e9753d69d8f758f7445a" + integrity sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg== + fastest-levenshtein@^1.0.12: version "1.0.16" resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz" @@ -6027,9 +6066,9 @@ globals@^13.19.0: dependencies: type-fest "^0.20.2" -globalthis@^1.0.3: +globalthis@^1.0.2, globalthis@^1.0.3: version "1.0.3" - resolved "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== dependencies: define-properties "^1.1.3" @@ -6378,6 +6417,16 @@ http-signature@~1.3.6: jsprim "^2.0.2" sshpk "^1.14.1" +http-terminator@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/http-terminator/-/http-terminator-3.2.0.tgz#bc158d2694b733ca4fbf22a35065a81a609fb3e9" + integrity sha512-JLjck1EzPaWjsmIf8bziM3p9fgR1Y3JoUKAkyYEbZmFrIvJM6I8vVJfBGWlEtV9IWOvzNnaTtjuwZeBY2kwB4g== + dependencies: + delay "^5.0.0" + p-wait-for "^3.2.0" + roarr "^7.0.4" + type-fest "^2.3.3" + https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0, https-proxy-agent@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" @@ -8617,6 +8666,11 @@ ospath@^1.2.2: resolved "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz" integrity sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA== +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== + p-limit@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" @@ -8660,11 +8714,25 @@ p-retry@^4.5.0: "@types/retry" "0.12.0" retry "^0.13.1" +p-timeout@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-3.2.0.tgz#c7e17abc971d2a7962ef83626b35d635acf23dfe" + integrity sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg== + dependencies: + p-finally "^1.0.0" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +p-wait-for@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/p-wait-for/-/p-wait-for-3.2.0.tgz#640429bcabf3b0dd9f492c31539c5718cb6a3f1f" + integrity sha512-wpgERjNkLrBiFmkMEjuZJEWKKDrNfHCKA1OhyN1wg1FrLkULbviEy6py1AyJUgZ72YWFbZ38FIpnqvVqAlDUwA== + dependencies: + p-timeout "^3.0.0" + pacote@15.1.0: version "15.1.0" resolved "https://registry.npmjs.org/pacote/-/pacote-15.1.0.tgz" @@ -9907,9 +9975,9 @@ reusify@^1.0.4: resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rfdc@^1.3.0: +rfdc@^1.2.0, rfdc@^1.3.0: version "1.3.0" - resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.6.3: @@ -9926,6 +9994,18 @@ rimraf@^3.0.0, rimraf@^3.0.2: dependencies: glob "^7.1.3" +roarr@^7.0.4: + version "7.15.1" + resolved "https://registry.yarnpkg.com/roarr/-/roarr-7.15.1.tgz#e4d93105c37b5ea7dd1200d96a3500f757ddc39f" + integrity sha512-0ExL9rjOXeQPvQvQo8IcV8SR2GTXmDr1FQFlY2HiAV+gdVQjaVZNOx9d4FI2RqFFsd0sNsiw2TRS/8RU9g0ZfA== + dependencies: + boolean "^3.1.4" + fast-json-stringify "^5.8.0" + fast-printf "^1.6.9" + globalthis "^1.0.2" + safe-stable-stringify "^2.4.3" + semver-compare "^1.0.0" + rtl-css-js@^1.13.1: version "1.16.1" resolved "https://registry.npmjs.org/rtl-css-js/-/rtl-css-js-1.16.1.tgz" @@ -10008,6 +10088,11 @@ safe-regex-test@^1.0.0: get-intrinsic "^1.1.3" is-regex "^1.1.4" +safe-stable-stringify@^2.4.3: + version "2.4.3" + resolved "https://registry.yarnpkg.com/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz#138c84b6f6edb3db5f8ef3ef7115b8f55ccbf886" + integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== + "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" @@ -10127,6 +10212,11 @@ selfsigned@^2.1.1: dependencies: node-forge "^1" +semver-compare@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" + integrity sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow== + semver@7.3.8: version "7.3.8" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798" @@ -11081,6 +11171,11 @@ type-fest@^0.21.3: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== +type-fest@^2.3.3: + version "2.19.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b" + integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA== + type-is@~1.6.18: version "1.6.18" resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" From 46e2f4e22cc469beb2408e6857a6d5711a4d6b2a Mon Sep 17 00:00:00 2001 From: "Mark H. Wood" Date: Tue, 22 Aug 2023 15:46:55 -0400 Subject: [PATCH 0070/1529] Properly await termination. (cherry picked from commit 4449737aed9b96c13ba6a34e2ff72feb1aaebe92) --- server.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/server.ts b/server.ts index 0fbec1beae..baa7321503 100644 --- a/server.ts +++ b/server.ts @@ -536,10 +536,12 @@ function createHttpsServer(keys) { // Graceful shutdown when signalled const terminator = createHttpTerminator({server: listener}); - process.on('SIGINT', ()=> { - console.debug('Closing HTTPS server on signal'); - terminator.terminate().catch(e => { console.error(e); }); - console.debug('HTTPS server closed'); + process.on('SIGINT', () => { + void (async ()=> { + console.debug('Closing HTTPS server on signal'); + await terminator.terminate().catch(e => { console.error(e); }); + console.debug('HTTPS server closed'); + })(); }); } @@ -555,10 +557,12 @@ function run() { // Graceful shutdown when signalled const terminator = createHttpTerminator({server: listener}); - process.on('SIGINT', ()=> { - console.debug('Closing HTTP server on signal'); - terminator.terminate().catch(e => { console.error(e); }); - console.debug('HTTP server closed.'); + process.on('SIGINT', () => { + void (async () => { + console.debug('Closing HTTP server on signal'); + await terminator.terminate().catch(e => { console.error(e); }); + console.debug('HTTP server closed.');return undefined; + })(); }); } From d6cabd1d01209655a1b6a1a8e468a4924b7243fb Mon Sep 17 00:00:00 2001 From: "Mark H. Wood" Date: Tue, 22 Aug 2023 17:07:20 -0400 Subject: [PATCH 0071/1529] Document a modified method as required by PR guidelines. (cherry picked from commit bf9b2b82e1d1d6cd7a901b674d8df92af073794c) --- server.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.ts b/server.ts index baa7321503..da085f372f 100644 --- a/server.ts +++ b/server.ts @@ -545,6 +545,9 @@ function createHttpsServer(keys) { }); } +/** + * Create an HTTP server with the configured port and host. + */ function run() { const port = environment.ui.port || 4000; const host = environment.ui.host || '/'; From 3e8d180f1b92adc2c69a4f74d864d165150611ea Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Mon, 18 Sep 2023 16:43:32 +0200 Subject: [PATCH 0072/1529] 106974: Angular SSR menu issues --- src/app/core/core.effects.ts | 2 ++ src/app/shared/menu/menu.actions.ts | 11 ++++++- src/app/shared/menu/menu.effects.spec.ts | 41 ++++++++++++++++++++++++ src/app/shared/menu/menu.effects.ts | 23 +++++++++++++ src/app/shared/menu/menu.reducer.spec.ts | 13 +++++++- src/app/shared/menu/menu.reducer.ts | 19 ++++++----- src/app/shared/menu/menu.service.spec.ts | 27 ++++++++++++++-- src/app/shared/menu/menu.service.ts | 3 +- 8 files changed, 126 insertions(+), 13 deletions(-) create mode 100644 src/app/shared/menu/menu.effects.spec.ts create mode 100644 src/app/shared/menu/menu.effects.ts diff --git a/src/app/core/core.effects.ts b/src/app/core/core.effects.ts index b569df290d..1724e88743 100644 --- a/src/app/core/core.effects.ts +++ b/src/app/core/core.effects.ts @@ -7,6 +7,7 @@ import { ServerSyncBufferEffects } from './cache/server-sync-buffer.effects'; import { ObjectUpdatesEffects } from './data/object-updates/object-updates.effects'; import { RouteEffects } from './services/route.effects'; import { RouterEffects } from './router/router.effects'; +import { MenuEffects } from '../shared/menu/menu.effects'; export const coreEffects = [ RequestEffects, @@ -18,4 +19,5 @@ export const coreEffects = [ ObjectUpdatesEffects, RouteEffects, RouterEffects, + MenuEffects, ]; diff --git a/src/app/shared/menu/menu.actions.ts b/src/app/shared/menu/menu.actions.ts index f02fd73292..268c149c5b 100644 --- a/src/app/shared/menu/menu.actions.ts +++ b/src/app/shared/menu/menu.actions.ts @@ -18,6 +18,7 @@ export const MenuActionTypes = { EXPAND_MENU: type('dspace/menu/EXPAND_MENU'), SHOW_MENU: type('dspace/menu/SHOW_MENU'), HIDE_MENU: type('dspace/menu/HIDE_MENU'), + REINIT_MENUS: type('dspace/menu/REINIT_MENUS'), COLLAPSE_MENU_PREVIEW: type('dspace/menu/COLLAPSE_MENU_PREVIEW'), EXPAND_MENU_PREVIEW: type('dspace/menu/EXPAND_MENU_PREVIEW'), ADD_SECTION: type('dspace/menu-section/ADD_SECTION'), @@ -115,6 +116,13 @@ export class ExpandMenuPreviewAction implements Action { } } +/** + * Action used to re-initialise the menus + */ +export class ReinitMenuAction implements Action { + type = MenuActionTypes.REINIT_MENUS; +} + // MENU SECTION ACTIONS /** * Action used to perform state changes for a section of a certain menu @@ -224,4 +232,5 @@ export type MenuAction = | DeactivateMenuSectionAction | ToggleActiveMenuSectionAction | CollapseMenuPreviewAction - | ExpandMenuPreviewAction; + | ExpandMenuPreviewAction + | ReinitMenuAction; diff --git a/src/app/shared/menu/menu.effects.spec.ts b/src/app/shared/menu/menu.effects.spec.ts new file mode 100644 index 0000000000..5da5328674 --- /dev/null +++ b/src/app/shared/menu/menu.effects.spec.ts @@ -0,0 +1,41 @@ +import { Observable } from 'rxjs'; +import { TestBed, waitForAsync } from '@angular/core/testing'; +import { provideMockActions } from '@ngrx/effects/testing'; +import { cold, hot } from 'jasmine-marbles'; +import { MenuEffects } from './menu.effects'; +import { ReinitMenuAction } from './menu.actions'; +import { StoreAction, StoreActionTypes } from '../../store.actions'; + +describe('MenuEffects', () => { + let menuEffects: MenuEffects; + let actions: Observable; + beforeEach(waitForAsync(() => { + TestBed.configureTestingModule({ + providers: [ + MenuEffects, + provideMockActions(() => actions), + ], + }); + })); + + beforeEach(() => { + menuEffects = TestBed.inject(MenuEffects); + }); + + describe('reinitDSOMenus', () => { + describe('When a REHYDRATE action is triggered', () => { + let action; + beforeEach(() => { + action = new StoreAction(StoreActionTypes.REHYDRATE, null); + }); + it('should return a ReinitMenuAction', () => { + actions = hot('--a-', {a: action}); + const expected = cold('--b-', {b: new ReinitMenuAction}); + + expect(menuEffects.reinitDSOMenus).toBeObservable(expected); + }); + }); + }); + + +}); diff --git a/src/app/shared/menu/menu.effects.ts b/src/app/shared/menu/menu.effects.ts new file mode 100644 index 0000000000..2787f80b78 --- /dev/null +++ b/src/app/shared/menu/menu.effects.ts @@ -0,0 +1,23 @@ +import { map } from 'rxjs/operators'; +import { Injectable } from '@angular/core'; +import { Actions, createEffect, ofType } from '@ngrx/effects'; + +import { StoreActionTypes } from '../../store.actions'; +import { ReinitMenuAction } from './menu.actions'; + +@Injectable() +export class MenuEffects { + + /** + * When the store is rehydrated in the browser, re-initialise the menus to ensure + * the menus with functions are loaded correctly. + */ + reinitDSOMenus = createEffect(() => this.actions$ + .pipe(ofType(StoreActionTypes.REHYDRATE), + map(() => new ReinitMenuAction()) + )); + + constructor(private actions$: Actions) { + } + +} diff --git a/src/app/shared/menu/menu.reducer.spec.ts b/src/app/shared/menu/menu.reducer.spec.ts index 2865e887fc..8f540c016d 100644 --- a/src/app/shared/menu/menu.reducer.spec.ts +++ b/src/app/shared/menu/menu.reducer.spec.ts @@ -9,7 +9,7 @@ import { ExpandMenuAction, ExpandMenuPreviewAction, HideMenuAction, - HideMenuSectionAction, + HideMenuSectionAction, ReinitMenuAction, RemoveMenuSectionAction, ShowMenuAction, ShowMenuSectionAction, @@ -317,6 +317,17 @@ describe('menusReducer', () => { // is mutated, and any uncaught exception will cause the test to fail }); + it('should reset the menu state to the initial state when performing the REINIT_MENUS action without affecting the previous state', () => { + dummyState[MenuID.ADMIN].visible = true; + const state = dummyState; + deepFreeze([state]); + + const action = new ReinitMenuAction(); + const menusState = menusReducer(state, action); + expect(menusState).toEqual(initialMenusState); + + }); + it('should set add a new section for the correct menu in response to the ADD_SECTION action', () => { const state = dummyState; const action = new AddMenuSectionAction(menuID, visibleSection1); diff --git a/src/app/shared/menu/menu.reducer.ts b/src/app/shared/menu/menu.reducer.ts index c7ea017cc2..4c9ee31403 100644 --- a/src/app/shared/menu/menu.reducer.ts +++ b/src/app/shared/menu/menu.reducer.ts @@ -26,36 +26,39 @@ import { MenuID } from './menu-id.model'; * @returns {MenusState} The new, reducer MenusState */ export function menusReducer(state: MenusState = initialMenusState, action: MenuAction): MenusState { - const menuState: MenuState = state[action.menuID]; switch (action.type) { case MenuActionTypes.COLLAPSE_MENU: { - const newMenuState = Object.assign({}, menuState, { collapsed: true }); + const newMenuState = Object.assign({}, state[action.menuID], { collapsed: true }); return Object.assign({}, state, { [action.menuID]: newMenuState }); } case MenuActionTypes.EXPAND_MENU: { - const newMenuState = Object.assign({}, menuState, { collapsed: false }); + const newMenuState = Object.assign({}, state[action.menuID], { collapsed: false }); return Object.assign({}, state, { [action.menuID]: newMenuState }); } case MenuActionTypes.COLLAPSE_MENU_PREVIEW: { - const newMenuState = Object.assign({}, menuState, { previewCollapsed: true }); + const newMenuState = Object.assign({}, state[action.menuID], { previewCollapsed: true }); return Object.assign({}, state, { [action.menuID]: newMenuState }); } case MenuActionTypes.EXPAND_MENU_PREVIEW: { - const newMenuState = Object.assign({}, menuState, { previewCollapsed: false }); + const newMenuState = Object.assign({}, state[action.menuID], { previewCollapsed: false }); return Object.assign({}, state, { [action.menuID]: newMenuState }); } case MenuActionTypes.TOGGLE_MENU: { + const menuState = state[action.menuID]; const newMenuState = Object.assign({}, menuState, { collapsed: !menuState.collapsed }); return Object.assign({}, state, { [action.menuID]: newMenuState }); } case MenuActionTypes.SHOW_MENU: { - const newMenuState = Object.assign({}, menuState, { visible: true }); + const newMenuState = Object.assign({}, state[action.menuID], { visible: true }); return Object.assign({}, state, { [action.menuID]: newMenuState }); } case MenuActionTypes.HIDE_MENU: { - const newMenuState = Object.assign({}, menuState, { visible: false }); + const newMenuState = Object.assign({}, state[action.menuID], { visible: false }); return Object.assign({}, state, { [action.menuID]: newMenuState }); } + case MenuActionTypes.REINIT_MENUS: { + return Object.assign({}, initialMenusState); + } case MenuActionTypes.ADD_SECTION: { return addSection(state, action as AddMenuSectionAction); } @@ -230,7 +233,7 @@ function toggleActiveSection(state: MenusState, action: ToggleActiveMenuSectionA * @param {MenuSection} section The section that will be added or replaced in the state * @returns {MenusState} The new reduced state */ -function putSectionState(state: MenusState, action: MenuAction, section: MenuSection): MenusState { +function putSectionState(state: MenusState, action: MenuSectionAction, section: MenuSection): MenusState { const menuState: MenuState = state[action.menuID]; const newSections = Object.assign({}, menuState.sections, { [section.id]: section diff --git a/src/app/shared/menu/menu.service.spec.ts b/src/app/shared/menu/menu.service.spec.ts index 0d8d669a0a..6af7c54d58 100644 --- a/src/app/shared/menu/menu.service.spec.ts +++ b/src/app/shared/menu/menu.service.spec.ts @@ -41,6 +41,7 @@ describe('MenuService', () => { let routeDataMenuSection: MenuSection; let routeDataMenuSectionResolved: MenuSection; let routeDataMenuChildSection: MenuSection; + let routeDataMenuOverwrittenChildSection: MenuSection; let toBeRemovedMenuSection: MenuSection; let alreadyPresentMenuSection: MenuSection; let route; @@ -127,6 +128,17 @@ describe('MenuService', () => { link: '' } as LinkMenuItemModel }; + routeDataMenuOverwrittenChildSection = { + id: 'mockChildSection', + parentID: 'mockSection', + active: false, + visible: true, + model: { + type: MenuItemType.LINK, + text: 'menu.section.mockChildOverwrittenSection', + link: '' + } as LinkMenuItemModel + }; toBeRemovedMenuSection = { id: 'toBeRemovedSection', active: false, @@ -167,7 +179,17 @@ describe('MenuService', () => { [MenuID.PUBLIC]: routeDataMenuChildSection } } + }, + firstChild: { + snapshot: { + data: { + menu: { + [MenuID.PUBLIC]: routeDataMenuOverwrittenChildSection + } + } + } } + } } }; @@ -541,7 +563,7 @@ describe('MenuService', () => { }); describe('buildRouteMenuSections', () => { - it('should add and remove menu sections depending on the current route', () => { + it('should add and remove menu sections depending on the current route and overwrite menu sections when they have the same ID with the child route version', () => { spyOn(service, 'addSection'); spyOn(service, 'removeSection'); @@ -550,7 +572,8 @@ describe('MenuService', () => { service.buildRouteMenuSections(MenuID.PUBLIC); expect(service.addSection).toHaveBeenCalledWith(MenuID.PUBLIC, routeDataMenuSectionResolved); - expect(service.addSection).toHaveBeenCalledWith(MenuID.PUBLIC, routeDataMenuChildSection); + expect(service.addSection).not.toHaveBeenCalledWith(MenuID.PUBLIC, routeDataMenuChildSection); + expect(service.addSection).toHaveBeenCalledWith(MenuID.PUBLIC, routeDataMenuOverwrittenChildSection); expect(service.addSection).not.toHaveBeenCalledWith(MenuID.PUBLIC, alreadyPresentMenuSection); expect(service.removeSection).toHaveBeenCalledWith(MenuID.PUBLIC, toBeRemovedMenuSection.id); }); diff --git a/src/app/shared/menu/menu.service.ts b/src/app/shared/menu/menu.service.ts index fac3b3fba7..0ec7d67f25 100644 --- a/src/app/shared/menu/menu.service.ts +++ b/src/app/shared/menu/menu.service.ts @@ -399,7 +399,8 @@ export class MenuService { } if (!last) { - return [...menuSections, ...this.resolveRouteMenuSections(route.firstChild, menuID)]; + const childMenuSections = this.resolveRouteMenuSections(route.firstChild, menuID); + return [...menuSections.filter(menu => !(childMenuSections).map(childMenu => childMenu.id).includes(menu.id)), ...childMenuSections]; } else { return [...menuSections]; } From 47029c0a78d14c8e9d0557040223c0490eed42dd Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Mon, 18 Sep 2023 14:40:19 +0300 Subject: [PATCH 0073/1529] src/app/shared/search: don't capitalize metadata values Don't capitalize metadata values for display purposes. --- .../search-facet-selected-option.component.html | 2 +- .../search-labels/search-label/search-label.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.html b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.html index d5f88c5333..42fa7f9e6b 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.html +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.html @@ -4,7 +4,7 @@ [queryParams]="removeQueryParams" queryParamsHandling="merge"> 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 bffb7f9329..17c5a48718 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,4 +1,4 @@ - {{('search.filters.applied.' + key) | translate}}: {{'search.filters.' + filterName + '.' + value | translate: {default: normalizeFilterValue(value)} }} From 742b2d920a58acac444514c13cb7f7d7b16d70a6 Mon Sep 17 00:00:00 2001 From: Sascha Szott Date: Tue, 19 Sep 2023 17:04:10 +0200 Subject: [PATCH 0074/1529] remove obsolete label element in metadata-schema.component.html (cherry picked from commit 6847c30e582773b492747dc5dc88d4406f003a91) --- .../metadata-schema/metadata-schema.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html index 557741df80..a3242bccc0 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html +++ b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html @@ -41,7 +41,7 @@ {{field.id}} - {{schema?.prefix}}.{{field.element}}{{field.qualifier}} + {{schema?.prefix}}.{{field.element}}{{field.qualifier ? '.' + field.qualifier : ''}} {{field.scopeNote}} From c7fe310d81cb87b9692d4c85d35b46b45b890892 Mon Sep 17 00:00:00 2001 From: Sascha Szott Date: Fri, 22 Sep 2023 10:39:17 +0200 Subject: [PATCH 0075/1529] removed trailing whitespaces as suggested by reviewer (cherry picked from commit 43f19e7d918d0457184160744e9f781db9cd491c) --- .../metadata-schema/metadata-schema.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html index a3242bccc0..2fe53dfcd8 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html +++ b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.html @@ -41,7 +41,7 @@ {{field.id}} - {{schema?.prefix}}.{{field.element}}{{field.qualifier ? '.' + field.qualifier : ''}} + {{schema?.prefix}}.{{field.element}}{{field.qualifier ? '.' + field.qualifier : ''}} {{field.scopeNote}} From f77d01c01fc45c81ed530ea560b0e0742c5c049e Mon Sep 17 00:00:00 2001 From: DSpace Bot <68393067+dspace-bot@users.noreply.github.com> Date: Mon, 25 Sep 2023 04:53:45 -0500 Subject: [PATCH 0076/1529] [Port dspace-7_x] Update fi.json5 (#2516) * Update fi.json5 Two last translations to the Finnish file. (cherry picked from commit c3a908bccb5ebb52c08c57efd7d02c91e0e5de02) --- src/assets/i18n/fi.json5 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/assets/i18n/fi.json5 b/src/assets/i18n/fi.json5 index c56fcb6fec..ede41ffb0c 100644 --- a/src/assets/i18n/fi.json5 +++ b/src/assets/i18n/fi.json5 @@ -742,8 +742,7 @@ "admin.access-control.groups.form.tooltip.editGroup.addEpeople": "Voit lisätä tai poistaa ryhmän käyttäjän joko napsauttamalla 'Selaa kaikkia' -painiketta tai käyttämällä alla olevaa hakupalkkia käyttäjien etsimiseen (käytä hakupalkin vasemmalla puolella olevaa pudotusvalikkoa valitaksesi, haetaanko metatietojen vai sähköpostin perusteella). Napsauta sitten plus-kuvaketta jokaisen käyttäjän kohdalla, jonka haluat lisätä alla olevaan luetteloon, tai roskakorikuvaketta jokaisen käyttäjän kohdalla, jonka haluat poistaa. Alla olevassa luettelossa voi olla useita sivuja: voit siirtyä seuraaville sivuille luettelon alapuolella olevilla sivunohjaimilla. Kun olet valmis, tallenna muutokset napsauttamalla yläosassa olevaa Tallenna-painiketta.", // "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "To add or remove a Subgroup to/from this group, either click the 'Browse All' button or use the search bar below to search for users. Then click the plus icon for each user you wish to add in the list below, or the trash can icon for each user you wish to remove. The list below may have several pages: use the page controls below the list to navigate to the next pages. Once you are ready, save your changes by clicking the 'Save' button in the top section.", - // TODO New key - Add a translation - ree made ticket 2321 to DSpace's github - "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "Jos haluat lisätä tai poistaa alaryhmän tähän ryhmään tai tästä ryhmästä, napsauta joko 'Selaa kaikkia' -painiketta tai käytä alla olevaa hakupalkkia käyttäjien etsimiseen. Napsauta sitten luettelossa plus-kuvaketta jokaisen käyttäjän kohdalla, jonka haluat lisätä, tai roskakorikuvaketta jokaisen käyttäjän kohdalla, jonka haluat poistaa. Luettelossa voi olla useita sivuja: voit siirtyä seuraaville sivuille luettelon alapuolella olevilla sivunohjaimilla. Kun olet valmis, tallenna muutokset napsauttamalla yläosassa olevaa Tallenna-painiketta.", + "admin.access-control.groups.form.tooltip.editGroup.addSubgroups": "Jos haluat lisätä tai poistaa alaryhmän tähän ryhmään tai tästä ryhmästä, napsauta joko 'Selaa kaikkia' -painiketta tai käytä alla olevaa hakupalkkia ryhmien etsimiseen. Napsauta sitten luettelossa plus-kuvaketta jokaisen ryhmän kohdalla, jonka haluat lisätä, tai roskakorikuvaketta jokaisen ryhmän kohdalla, jonka haluat poistaa. Luettelossa voi olla useita sivuja: voit siirtyä seuraaville sivuille luettelon alapuolella olevilla sivunohjaimilla. Kun olet valmis, tallenna muutokset napsauttamalla yläosassa olevaa Tallenna-painiketta.", // "admin.search.breadcrumbs": "Administrative Search", "admin.search.breadcrumbs": "Ylläpitäjän haku", @@ -7607,8 +7606,7 @@ "person.page.orcid.scope.authenticate": "Hae ORCID-tunnisteesi", // "person.page.orcid.scope.read-limited": "Read your information with visibility set to Trusted Parties", - // TODO New key - Add a translation - "person.page.orcid.scope.read-limited": "Read your information with visibility set to Trusted Parties", + "person.page.orcid.scope.read-limited": "Lue omat tietosi Trusted Parties -näkyvyysasetuksilla", // "person.page.orcid.scope.activities-update": "Add/update your research activities", "person.page.orcid.scope.activities-update": "Lisää/päivitä tutkimustoimiasi", @@ -7706,4 +7704,4 @@ // "admin.system-wide-alert.title": "System-wide Alerts", "admin.system-wide-alert.title": "Järjestelmänlaajuiset hälytykset", -} \ No newline at end of file +} From 54614c21f0793befb96498af043f5437bb2b6b10 Mon Sep 17 00:00:00 2001 From: Enea Jahollari Date: Mon, 25 Sep 2023 12:43:29 +0200 Subject: [PATCH 0077/1529] feat: migrate everything to standalone and fix build errors --- .eslintrc.json | 1 - .../access-control/access-control.module.ts | 58 ++++---- .../bulk-access-browse.component.spec.ts | 16 +-- .../browse/bulk-access-browse.component.ts | 30 +++- .../bulk-access/bulk-access.component.spec.ts | 16 +-- .../bulk-access/bulk-access.component.ts | 10 +- .../bulk-access-settings.component.spec.ts | 7 +- .../bulk-access-settings.component.ts | 12 +- .../epeople-registry.component.spec.ts | 22 ++- .../epeople-registry.component.ts | 20 ++- .../eperson-form.component.spec.ts | 24 ++-- .../eperson-form/eperson-form.component.ts | 18 ++- .../group-form/group-form.component.spec.ts | 26 ++-- .../group-form/group-form.component.ts | 21 ++- .../members-list.component.spec.ts | 22 ++- .../members-list/members-list.component.ts | 23 ++- .../subgroups-list.component.spec.ts | 22 ++- .../subgroup-list/subgroups-list.component.ts | 22 ++- .../groups-registry.component.spec.ts | 22 ++- .../groups-registry.component.ts | 23 ++- .../admin-curation-tasks.component.spec.ts | 7 +- .../admin-curation-tasks.component.ts | 7 + .../batch-import-page.component.spec.ts | 16 +-- .../batch-import-page.component.ts | 19 ++- .../metadata-import-page.component.spec.ts | 16 +-- .../metadata-import-page.component.ts | 14 +- .../admin-registries.module.ts | 26 ++-- .../add-bitstream-format.component.spec.ts | 28 ++-- .../add-bitstream-format.component.ts | 8 +- .../bitstream-formats.component.spec.ts | 43 +++--- .../bitstream-formats.component.ts | 17 ++- .../bitstream-formats.module.ts | 24 ++-- .../edit-bitstream-format.component.spec.ts | 30 ++-- .../edit-bitstream-format.component.ts | 10 +- .../format-form/format-form.component.spec.ts | 11 +- .../format-form/format-form.component.ts | 9 +- .../metadata-registry.component.spec.ts | 11 +- .../metadata-registry.component.ts | 20 ++- .../metadata-schema-form.component.spec.ts | 11 +- .../metadata-schema-form.component.ts | 13 +- .../metadata-field-form.component.spec.ts | 11 +- .../metadata-field-form.component.ts | 13 +- .../metadata-schema.component.spec.ts | 11 +- .../metadata-schema.component.ts | 22 ++- .../admin-search-page.component.spec.ts | 6 +- .../admin-search-page.component.ts | 9 +- ...arch-result-grid-element.component.spec.ts | 14 +- ...in-search-result-grid-element.component.ts | 10 +- ...arch-result-grid-element.component.spec.ts | 16 +-- ...in-search-result-grid-element.component.ts | 10 +- ...arch-result-grid-element.component.spec.ts | 36 ++--- ...in-search-result-grid-element.component.ts | 9 +- ...arch-result-list-element.component.spec.ts | 14 +- ...in-search-result-list-element.component.ts | 11 +- ...arch-result-list-element.component.spec.ts | 14 +- ...in-search-result-list-element.component.ts | 11 +- ...arch-result-list-element.component.spec.ts | 14 +- ...in-search-result-list-element.component.ts | 10 +- ...in-search-result-actions.component.spec.ts | 12 +- ...m-admin-search-result-actions.component.ts | 11 +- .../admin-search-page/admin-search.module.ts | 18 ++- .../admin-sidebar-section.component.spec.ts | 36 ++--- .../admin-sidebar-section.component.ts | 15 +- .../admin-sidebar.component.spec.ts | 17 ++- .../admin-sidebar/admin-sidebar.component.ts | 13 +- ...le-admin-sidebar-section.component.spec.ts | 14 +- ...andable-admin-sidebar-section.component.ts | 14 +- .../themed-admin-sidebar.component.ts | 7 +- .../admin-workflow-page.component.spec.ts | 6 +- .../admin-workflow-page.component.ts | 9 +- ...m-admin-workflow-actions.component.spec.ts | 12 +- ...w-item-admin-workflow-actions.component.ts | 11 +- ...ion-order-group-selector.component.spec.ts | 11 +- ...ervision-order-group-selector.component.ts | 14 +- ...supervision-order-status.component.spec.ts | 22 +-- .../supervision-order-status.component.ts | 12 +- ...m-admin-workflow-actions.component.spec.ts | 16 +-- ...e-item-admin-workflow-actions.component.ts | 14 +- ...in-workflow-grid-element.component.spec.ts | 32 ++--- ...t-admin-workflow-grid-element.component.ts | 11 +- ...in-workflow-grid-element.component.spec.ts | 34 ++--- ...t-admin-workflow-grid-element.component.ts | 11 +- ...in-workflow-list-element.component.spec.ts | 28 ++-- ...t-admin-workflow-list-element.component.ts | 12 +- ...in-workflow-list-element.component.spec.ts | 30 ++-- ...t-admin-workflow-list-element.component.ts | 12 +- .../admin-workflow.module.ts | 28 ++-- src/app/admin/admin.module.ts | 28 ++-- src/app/app-routing.module.ts | 4 +- src/app/app.component.ts | 13 +- src/app/app.module.ts | 26 ++-- ...bitstream-authorizations.component.spec.ts | 24 ++-- .../bitstream-authorizations.component.ts | 12 +- .../bitstream-download-page.component.spec.ts | 9 +- .../bitstream-download-page.component.ts | 10 +- .../bitstream-page/bitstream-page.module.ts | 24 ++-- .../edit-bitstream-page.component.spec.ts | 103 +++++++------ .../edit-bitstream-page.component.ts | 27 +++- .../themed-edit-bitstream-page.component.ts | 7 +- .../breadcrumbs/breadcrumbs.component.spec.ts | 24 ++-- src/app/breadcrumbs/breadcrumbs.component.ts | 9 +- .../themed-breadcrumbs.component.ts | 7 +- .../browse-by-date-page.component.spec.ts | 11 +- .../browse-by-date-page.component.ts | 32 ++++- .../themed-browse-by-date-page.component.ts | 7 +- .../browse-by-metadata-page.component.spec.ts | 11 +- .../browse-by-metadata-page.component.ts | 32 ++++- ...hemed-browse-by-metadata-page.component.ts | 7 +- .../browse-by-switcher.component.spec.ts | 10 +- .../browse-by-switcher.component.ts | 5 +- .../themed-browse-by-switcher.component.ts | 7 +- .../browse-by-taxonomy-page.component.spec.ts | 11 +- .../browse-by-taxonomy-page.component.ts | 12 +- ...hemed-browse-by-taxonomy-page.component.ts | 7 +- .../browse-by-title-page.component.spec.ts | 11 +- .../browse-by-title-page.component.ts | 36 ++++- .../themed-browse-by-title-page.component.ts | 7 +- src/app/browse-by/browse-by.module.ts | 28 ++-- .../collection-form.component.ts | 20 ++- .../collection-form/collection-form.module.ts | 20 ++- .../collection-item-mapper.component.spec.ts | 9 +- .../collection-item-mapper.component.ts | 17 ++- .../collection-page.component.ts | 40 +++++- .../collection-page/collection-page.module.ts | 44 +++--- .../create-collection-page.component.spec.ts | 17 ++- .../create-collection-page.component.ts | 12 +- .../delete-collection-page.component.spec.ts | 11 +- .../delete-collection-page.component.ts | 13 +- ...ollection-access-control.component.spec.ts | 4 +- .../collection-access-control.component.ts | 10 ++ ...ollection-authorizations.component.spec.ts | 16 +-- .../collection-authorizations.component.ts | 7 + .../collection-curate.component.spec.ts | 15 +- .../collection-curate.component.ts | 9 ++ .../collection-metadata.component.spec.ts | 13 +- .../collection-metadata.component.ts | 16 ++- .../collection-roles.component.spec.ts | 18 ++- .../collection-roles.component.ts | 10 ++ ...llection-source-controls.component.spec.ts | 25 ++-- .../collection-source-controls.component.ts | 11 +- .../collection-source.component.spec.ts | 11 +- .../collection-source.component.ts | 16 ++- .../edit-collection-page.component.spec.ts | 11 +- .../edit-collection-page.component.ts | 16 ++- .../edit-collection-page.module.ts | 38 +++-- .../edit-item-template-page.component.spec.ts | 11 +- .../edit-item-template-page.component.ts | 19 ++- ...hemed-edit-item-template-page.component.ts | 7 +- .../themed-collection-page.component.ts | 7 +- .../community-list-page.component.spec.ts | 22 +-- .../community-list-page.component.ts | 8 +- .../community-list-page.module.ts | 24 ++-- .../community-list.component.spec.ts | 21 +-- .../community-list.component.ts | 12 +- .../themed-community-list.component.ts | 7 +- .../themed-community-list-page.component.ts | 7 +- .../community-form.component.ts | 20 ++- .../community-form/community-form.module.ts | 20 ++- .../community-page.component.ts | 46 +++++- .../community-page/community-page.module.ts | 28 ++-- .../create-community-page.component.spec.ts | 11 +- .../create-community-page.component.ts | 15 +- .../delete-community-page.component.spec.ts | 13 +- .../delete-community-page.component.ts | 13 +- ...community-access-control.component.spec.ts | 4 +- .../community-access-control.component.ts | 10 ++ ...community-authorizations.component.spec.ts | 16 +-- .../community-authorizations.component.ts | 7 + .../community-curate.component.spec.ts | 15 +- .../community-curate.component.ts | 9 ++ .../community-metadata.component.spec.ts | 11 +- .../community-metadata.component.ts | 7 + .../community-roles.component.spec.ts | 18 ++- .../community-roles.component.ts | 10 ++ .../edit-community-page.component.spec.ts | 11 +- .../edit-community-page.component.ts | 16 ++- .../edit-community-page.module.ts | 32 ++--- ...page-sub-collection-list.component.spec.ts | 16 +-- ...nity-page-sub-collection-list.component.ts | 18 ++- ...nity-page-sub-collection-list.component.ts | 7 +- ...-page-sub-community-list.component.spec.ts | 16 +-- ...unity-page-sub-community-list.component.ts | 18 ++- ...unity-page-sub-community-list.component.ts | 7 +- .../themed-community-page.component.ts | 7 +- src/app/core/auth/auth.service.spec.ts | 47 +++--- .../core/eperson/eperson-data.service.spec.ts | 19 ++- .../core/eperson/group-data.service.spec.ts | 19 ++- .../google-recaptcha.module.ts | 7 +- .../core/registry/registry.service.spec.ts | 17 +-- .../core/shared/search/search.service.spec.ts | 90 ++++++------ .../curation-form.component.spec.ts | 13 +- .../curation-form/curation-form.component.ts | 11 +- ...it-metadata-field-values.component.spec.ts | 10 +- ...so-edit-metadata-field-values.component.ts | 13 +- ...so-edit-metadata-headers.component.spec.ts | 10 +- .../dso-edit-metadata-headers.component.ts | 9 +- ...o-edit-metadata-value-headers.component.ts | 9 +- .../dso-edit-metadata-value.component.spec.ts | 11 +- .../dso-edit-metadata-value.component.ts | 17 ++- .../dso-edit-metadata.component.spec.ts | 11 +- .../dso-edit-metadata.component.ts | 17 ++- .../metadata-field-selector.component.spec.ts | 11 +- .../metadata-field-selector.component.ts | 14 +- .../themed-dso-edit-metadata.component.ts | 7 +- src/app/dso-shared/dso-shared.module.ts | 40 +++--- ...urnal-issue-grid-element.component.spec.ts | 11 +- .../journal-issue-grid-element.component.ts | 9 +- ...rnal-volume-grid-element.component.spec.ts | 11 +- .../journal-volume-grid-element.component.ts | 9 +- .../journal-grid-element.component.spec.ts | 11 +- .../journal/journal-grid-element.component.ts | 9 +- ...ue-search-result-grid-element.component.ts | 17 ++- ...me-search-result-grid-element.component.ts | 17 ++- ...al-search-result-grid-element.component.ts | 17 ++- ...urnal-issue-list-element.component.spec.ts | 10 +- .../journal-issue-list-element.component.ts | 9 +- ...rnal-volume-list-element.component.spec.ts | 10 +- .../journal-volume-list-element.component.ts | 9 +- .../journal-list-element.component.spec.ts | 10 +- .../journal/journal-list-element.component.ts | 9 +- ...arch-result-list-element.component.spec.ts | 26 ++-- ...ue-search-result-list-element.component.ts | 14 +- ...arch-result-list-element.component.spec.ts | 26 ++-- ...me-search-result-list-element.component.ts | 14 +- ...arch-result-list-element.component.spec.ts | 26 ++-- ...al-search-result-list-element.component.ts | 14 +- ...e-sidebar-search-list-element.component.ts | 9 +- ...e-sidebar-search-list-element.component.ts | 9 +- ...l-sidebar-search-list-element.component.ts | 9 +- .../journal-issue/journal-issue.component.ts | 18 ++- .../journal-volume.component.ts | 18 ++- .../journal/journal.component.spec.ts | 23 ++- .../item-pages/journal/journal.component.ts | 19 ++- .../journal-entities.module.ts | 18 ++- .../org-unit-grid-element.component.spec.ts | 11 +- .../org-unit-grid-element.component.ts | 9 +- .../person-grid-element.component.spec.ts | 11 +- .../person/person-grid-element.component.ts | 9 +- .../project-grid-element.component.spec.ts | 11 +- .../project/project-grid-element.component.ts | 9 +- ...it-search-result-grid-element.component.ts | 17 ++- ...on-search-result-grid-element.component.ts | 17 ++- ...ct-search-result-grid-element.component.ts | 17 ++- .../org-unit-list-element.component.spec.ts | 10 +- .../org-unit-list-element.component.ts | 9 +- .../person-list-element.component.spec.ts | 10 +- .../person/person-list-element.component.ts | 9 +- .../project-list-element.component.spec.ts | 10 +- .../project/project-list-element.component.ts | 9 +- ...arch-result-list-element.component.spec.ts | 50 +++---- ...it-search-result-list-element.component.ts | 15 +- ...arch-result-list-element.component.spec.ts | 50 +++---- ...on-search-result-list-element.component.ts | 15 +- ...arch-result-list-element.component.spec.ts | 27 ++-- ...ct-search-result-list-element.component.ts | 13 +- ...t-sidebar-search-list-element.component.ts | 9 +- ...n-sidebar-search-list-element.component.ts | 10 +- ...t-sidebar-search-list-element.component.ts | 9 +- .../item-pages/org-unit/org-unit.component.ts | 19 ++- .../item-pages/person/person.component.ts | 19 ++- .../item-pages/project/project.component.ts | 19 ++- ...em-metadata-list-element.component.spec.ts | 12 +- ...it-item-metadata-list-element.component.ts | 9 +- ...em-metadata-list-element.component.spec.ts | 12 +- ...on-item-metadata-list-element.component.ts | 10 +- ...em-metadata-list-element.component.spec.ts | 16 +-- ...ct-item-metadata-list-element.component.ts | 9 +- .../research-entities.module.ts | 20 ++- ...-list-submission-element.component.spec.ts | 7 +- ...entry-list-submission-element.component.ts | 9 +- ...-list-submission-element.component.spec.ts | 11 +- ...esult-list-submission-element.component.ts | 11 +- ...g-unit-input-suggestions.component.spec.ts | 13 +- .../org-unit-input-suggestions.component.ts | 31 ++-- ...-list-submission-element.component.spec.ts | 26 ++-- ...esult-list-submission-element.component.ts | 12 +- .../person-input-suggestions.component.ts | 31 ++-- .../name-variant-modal.component.spec.ts | 7 +- .../name-variant-modal.component.ts | 9 +- src/app/footer/footer.component.spec.ts | 21 ++- src/app/footer/footer.component.ts | 11 +- src/app/footer/themed-footer.component.ts | 7 +- src/app/forbidden/forbidden.component.ts | 10 +- .../forbidden/themed-forbidden.component.ts | 7 +- .../forgot-email.component.spec.ts | 7 +- .../forgot-email.component.ts | 11 +- .../themed-forgot-email.component.ts | 7 +- .../forgot-password-form.component.spec.ts | 23 ++- .../forgot-password-form.component.ts | 15 +- .../themed-forgot-password-form.component.ts | 7 +- .../forgot-password/forgot-password.module.ts | 26 ++-- .../header-navbar-wrapper.component.ts | 11 +- .../themed-header-navbar-wrapper.component.ts | 7 +- .../context-help-toggle.component.spec.ts | 9 +- .../context-help-toggle.component.ts | 10 +- src/app/header/header.component.spec.ts | 15 +- src/app/header/header.component.ts | 16 ++- src/app/header/themed-header.component.ts | 7 +- .../health-info-component.component.spec.ts | 18 ++- .../health-info-component.component.ts | 13 +- .../health-info/health-info.component.spec.ts | 20 ++- .../health-info/health-info.component.ts | 13 +- .../health-page/health-page.component.spec.ts | 22 +-- src/app/health-page/health-page.component.ts | 14 +- src/app/health-page/health-page.module.ts | 28 ++-- .../health-component.component.spec.ts | 20 ++- .../health-component.component.ts | 14 +- .../health-panel.component.spec.ts | 18 ++- .../health-panel/health-panel.component.ts | 15 +- .../health-status.component.spec.ts | 18 +-- .../health-status/health-status.component.ts | 11 +- .../home-news/home-news.component.ts | 7 +- .../home-news/themed-home-news.component.ts | 7 +- src/app/home-page/home-page.component.ts | 15 +- src/app/home-page/home-page.module.ts | 26 ++-- .../recent-item-list.component.spec.ts | 8 +- .../recent-item-list.component.ts | 25 ++-- .../home-page/themed-home-page.component.ts | 7 +- ...emed-top-level-community-list.component.ts | 7 +- ...top-level-community-list.component.spec.ts | 16 +-- .../top-level-community-list.component.ts | 18 ++- .../import-external-page.component.spec.ts | 10 +- .../import-external-page.component.ts | 9 +- .../import-external-page.module.ts | 22 ++- ...d-user-agreement-content.component.spec.ts | 7 +- .../end-user-agreement-content.component.ts | 10 +- .../end-user-agreement.component.spec.ts | 11 +- .../end-user-agreement.component.ts | 12 +- .../themed-end-user-agreement.component.ts | 7 +- .../feedback-form.component.spec.ts | 11 +- .../feedback-form/feedback-form.component.ts | 14 +- .../themed-feedback-form.component.ts | 7 +- .../info/feedback/feedback.component.spec.ts | 7 +- src/app/info/feedback/feedback.component.ts | 9 +- .../feedback/themed-feedback.component.ts | 7 +- src/app/info/info.module.ts | 22 ++- .../privacy-content.component.spec.ts | 7 +- .../privacy-content.component.ts | 10 +- .../info/privacy/privacy.component.spec.ts | 7 +- src/app/info/privacy/privacy.component.ts | 9 +- .../info/privacy/themed-privacy.component.ts | 7 +- .../alerts/item-alerts.component.spec.ts | 7 +- .../item-page/alerts/item-alerts.component.ts | 13 +- .../alerts/themed-item-alerts.component.ts | 7 +- ...ream-request-a-copy-page.component.spec.ts | 27 ++-- ...bitstream-request-a-copy-page.component.ts | 24 +++- .../upload/upload-bitstream.component.spec.ts | 11 +- .../upload/upload-bitstream.component.ts | 20 ++- .../abstract-item-update.component.ts | 5 +- .../edit-item-page.component.spec.ts | 22 ++- .../edit-item-page.component.ts | 18 ++- .../edit-item-page/edit-item-page.module.ts | 102 +++++++------ .../item-access-control.component.spec.ts | 4 +- .../item-access-control.component.ts | 12 +- .../item-authorizations.component.spec.ts | 23 ++- .../item-authorizations.component.ts | 19 ++- .../item-bitstreams.component.spec.ts | 11 +- .../item-bitstreams.component.ts | 21 ++- ...em-edit-bitstream-bundle.component.spec.ts | 9 +- .../item-edit-bitstream-bundle.component.ts | 15 ++ ...-and-drop-bitstream-list.component.spec.ts | 11 +- ...-drag-and-drop-bitstream-list.component.ts | 26 ++++ ...em-edit-bitstream-drag-handle.component.ts | 5 + .../item-edit-bitstream.component.spec.ts | 17 +-- .../item-edit-bitstream.component.ts | 13 ++ .../item-collection-mapper.component.spec.ts | 9 +- .../item-collection-mapper.component.ts | 17 ++- .../item-curate/item-curate.component.spec.ts | 15 +- .../item-curate/item-curate.component.ts | 10 ++ .../item-delete/item-delete.component.spec.ts | 11 +- .../item-delete/item-delete.component.ts | 23 ++- .../item-move/item-move.component.spec.ts | 11 +- .../item-move/item-move.component.ts | 20 ++- .../item-operation.component.spec.ts | 5 +- .../item-operation.component.ts | 13 +- .../item-private.component.spec.ts | 11 +- .../item-private/item-private.component.ts | 13 +- .../item-public/item-public.component.spec.ts | 11 +- .../item-public/item-public.component.ts | 13 +- .../item-register-doi.component.spec.ts | 13 +- .../item-register-doi.component.ts | 17 ++- .../item-reinstate.component.spec.ts | 11 +- .../item-reinstate.component.ts | 13 +- .../edit-relationship-list.component.spec.ts | 11 +- .../edit-relationship-list.component.ts | 19 +++ .../edit-relationship.component.spec.ts | 19 ++- .../edit-relationship.component.ts | 14 ++ .../item-relationships.component.spec.ts | 11 +- .../item-relationships.component.ts | 16 ++- .../item-status/item-status.component.spec.ts | 9 +- .../item-status/item-status.component.ts | 17 ++- .../themed-item-status.component.ts | 7 +- .../item-version-history.component.spec.ts | 11 +- .../item-version-history.component.ts | 12 +- .../item-withdraw.component.spec.ts | 11 +- .../item-withdraw/item-withdraw.component.ts | 13 +- .../modify-item-overview.component.spec.ts | 5 +- .../modify-item-overview.component.ts | 8 +- ...tract-simple-item-action.component.spec.ts | 17 +-- .../abstract-simple-item-action.component.ts | 13 +- .../virtual-metadata.component.spec.ts | 11 +- .../virtual-metadata.component.ts | 17 ++- .../collections/collections.component.spec.ts | 14 +- .../collections/collections.component.ts | 15 +- .../metadata-uri-values.component.spec.ts | 21 ++- .../metadata-uri-values.component.ts | 12 +- .../metadata-values.component.spec.ts | 21 ++- .../metadata-values.component.ts | 13 +- .../full-file-section.component.spec.ts | 22 ++- .../full-file-section.component.ts | 28 +++- .../themed-full-file-section.component.ts | 7 +- .../full/full-item-page.component.spec.ts | 21 ++- .../full/full-item-page.component.ts | 40 +++++- .../full/themed-full-item-page.component.ts | 7 +- src/app/item-page/item-page.module.ts | 43 +++--- src/app/item-page/item-shared.module.ts | 36 +++-- .../media-viewer-image.component.spec.ts | 11 +- .../media-viewer-image.component.ts | 9 +- .../themed-media-viewer-image.component.ts | 7 +- .../media-viewer-video.component.spec.ts | 20 ++- .../media-viewer-video.component.ts | 10 ++ .../themed-media-viewer-video.component.ts | 7 +- .../media-viewer.component.spec.ts | 25 ++-- .../media-viewer/media-viewer.component.ts | 18 +++ .../themed-media-viewer.component.ts | 7 +- .../mirador-viewer.component.spec.ts | 86 ++++++----- .../mirador-viewer.component.ts | 11 +- .../orcid-auth/orcid-auth.component.spec.ts | 24 ++-- .../orcid-auth/orcid-auth.component.ts | 14 +- .../orcid-page/orcid-page.component.html | 2 +- .../orcid-page/orcid-page.component.spec.ts | 25 ++-- .../orcid-page/orcid-page.component.ts | 26 +++- .../orcid-queue/orcid-queue.component.spec.ts | 24 ++-- .../orcid-queue/orcid-queue.component.ts | 18 ++- .../orcid-sync-settings.component.html | 8 +- .../orcid-sync-settings.component.spec.ts | 24 ++-- .../orcid-sync-settings.component.ts | 17 ++- .../abstract-incremental-list.component.ts | 5 +- .../file-section.component.spec.ts | 22 ++- .../file-section/file-section.component.ts | 26 +++- .../themed-file-section.component.ts | 1 + ...item-page-abstract-field.component.spec.ts | 22 +-- .../item-page-abstract-field.component.ts | 11 +- .../item-page-author-field.component.spec.ts | 21 ++- .../item-page-author-field.component.ts | 9 +- .../item-page-date-field.component.spec.ts | 21 ++- .../date/item-page-date-field.component.ts | 11 +- .../generic-item-page-field.component.spec.ts | 21 ++- .../generic-item-page-field.component.ts | 8 +- .../item-page-field.component.spec.ts | 22 +-- .../item-page-field.component.ts | 9 +- .../item-page-title-field.component.spec.ts | 17 ++- .../title/item-page-title-field.component.ts | 8 +- .../title/themed-item-page-field.component.ts | 7 +- .../uri/item-page-uri-field.component.spec.ts | 21 ++- .../uri/item-page-uri-field.component.ts | 9 +- .../simple/item-page.component.spec.ts | 22 ++- .../item-page/simple/item-page.component.ts | 29 +++- .../publication/publication.component.spec.ts | 23 ++- .../publication/publication.component.ts | 55 ++++++- .../item-types/shared/item.component.spec.ts | 135 +++++++++--------- .../item-types/shared/item.component.ts | 5 +- .../untyped-item.component.spec.ts | 22 +-- .../untyped-item/untyped-item.component.ts | 53 ++++++- ...data-representation-list.component.spec.ts | 11 +- .../metadata-representation-list.component.ts | 12 +- ...-metadata-representation-list.component.ts | 7 +- .../related-entities-search.component.spec.ts | 7 +- .../related-entities-search.component.ts | 7 +- ...-related-entities-search.component.spec.ts | 19 ++- ...abbed-related-entities-search.component.ts | 11 +- .../related-items/related-items-component.ts | 15 +- .../related-items.component.spec.ts | 26 ++-- .../simple/themed-item-page.component.ts | 7 +- .../version-page.component.spec.ts | 14 +- .../version-page/version-page.component.ts | 7 +- ...em-versions-delete-modal.component.spec.ts | 9 +- .../item-versions-delete-modal.component.ts | 9 +- ...m-versions-summary-modal.component.spec.ts | 9 +- .../item-versions-summary-modal.component.ts | 12 +- .../versions/item-versions.component.spec.ts | 33 +++-- .../versions/item-versions.component.ts | 18 ++- .../versions/item-versions.module.ts | 16 +-- .../item-versions-notice.component.spec.ts | 11 +- .../notice/item-versions-notice.component.ts | 9 +- .../login-page/login-page.component.spec.ts | 16 +-- src/app/login-page/login-page.component.ts | 10 +- src/app/login-page/login-page.module.ts | 16 +-- .../login-page/themed-login-page.component.ts | 7 +- .../logout-page/logout-page.component.spec.ts | 12 +- src/app/logout-page/logout-page.component.ts | 10 +- src/app/logout-page/logout-page.module.ts | 16 +-- .../themed-logout-page.component.ts | 7 +- src/app/lookup-by-id/lookup-by-id.module.ts | 22 ++- .../objectnotfound.component.spec.ts | 32 ++--- .../objectnotfound.component.ts | 13 +- .../themed-objectnotfound.component.ts | 7 +- src/app/menu.resolver.spec.ts | 17 ++- .../collection-selector.component.spec.ts | 32 ++--- .../collection-selector.component.ts | 11 +- ...ce-new-external-dropdown.component.spec.ts | 66 +++++---- ...-dspace-new-external-dropdown.component.ts | 16 ++- ...-new-submission-dropdown.component.spec.ts | 66 +++++---- ...space-new-submission-dropdown.component.ts | 17 ++- ...my-dspace-new-submission.component.spec.ts | 31 ++-- .../my-dspace-new-submission.component.ts | 16 ++- .../my-dspace-page.component.spec.ts | 11 +- .../my-dspace-page.component.ts | 14 +- .../my-dspace-page/my-dspace-page.module.ts | 28 ++-- .../my-dspace-page/my-dspace-search.module.ts | 20 ++- .../themed-my-dspace-page.component.ts | 7 +- ...xpandable-navbar-section.component.spec.ts | 35 +++-- .../expandable-navbar-section.component.ts | 13 +- ...med-expandable-navbar-section.component.ts | 9 +- .../navbar-section.component.spec.ts | 14 +- .../navbar-section.component.ts | 11 +- src/app/navbar/navbar.component.spec.ts | 15 +- src/app/navbar/navbar.component.ts | 14 +- src/app/navbar/navbar.module.ts | 36 +++-- src/app/navbar/themed-navbar.component.ts | 7 +- .../page-error/page-error.component.spec.ts | 22 +-- src/app/page-error/page-error.component.ts | 11 +- .../page-error/themed-page-error.component.ts | 7 +- .../page-internal-server-error.component.ts | 11 +- ...ed-page-internal-server-error.component.ts | 7 +- .../pagenotfound/pagenotfound.component.ts | 12 +- .../themed-pagenotfound.component.ts | 7 +- .../process-detail-field.component.spec.ts | 10 +- .../process-detail-field.component.ts | 7 +- .../detail/process-detail.component.spec.ts | 15 +- .../detail/process-detail.component.ts | 17 ++- .../form/process-form.component.spec.ts | 23 +-- .../form/process-form.component.ts | 18 ++- .../parameter-select.component.spec.ts | 7 +- .../parameter-select.component.ts | 22 +-- .../boolean-value-input.component.spec.ts | 4 +- .../boolean-value-input.component.ts | 13 +- .../date-value-input.component.spec.ts | 17 +-- .../date-value-input.component.ts | 18 ++- .../file-value-input.component.spec.ts | 20 +-- .../file-value-input.component.ts | 20 ++- .../parameter-value-input.component.spec.ts | 19 ++- .../parameter-value-input.component.ts | 19 ++- .../string-value-input.component.spec.ts | 20 +-- .../string-value-input.component.ts | 18 ++- .../process-parameters.component.spec.ts | 19 +-- .../process-parameters.component.ts | 21 +-- .../script-help/script-help.component.spec.ts | 19 +-- .../form/script-help/script-help.component.ts | 10 +- .../scripts-select.component.spec.ts | 23 +-- .../scripts-select.component.ts | 18 ++- .../new/new-process.component.spec.ts | 23 +-- .../process-page/new/new-process.component.ts | 11 +- .../process-overview.component.spec.ts | 11 +- .../overview/process-overview.component.ts | 11 +- .../process-page-shared.module.ts | 44 +++--- ...profile-claim-item-modal.component.spec.ts | 11 +- .../profile-claim-item-modal.component.ts | 14 +- ...ofile-page-metadata-form.component.spec.ts | 11 +- .../profile-page-metadata-form.component.ts | 9 +- ...ile-page-researcher-form.component.spec.ts | 11 +- .../profile-page-researcher-form.component.ts | 13 +- ...ofile-page-security-form.component.spec.ts | 15 +- .../profile-page-security-form.component.ts | 12 +- .../profile-page.component.spec.ts | 16 +-- .../profile-page/profile-page.component.ts | 21 ++- src/app/profile-page/profile-page.module.ts | 42 +++--- .../themed-profile-page.component.ts | 7 +- .../register-email-form.component.spec.ts | 25 ++-- .../register-email-form.component.ts | 13 +- .../register-email-form.module.ts | 20 ++- .../create-profile.component.spec.ts | 25 ++-- .../create-profile.component.ts | 25 +++- .../themed-create-profile.component.ts | 7 +- .../register-email.component.spec.ts | 7 +- .../register-email.component.ts | 11 +- .../themed-register-email.component.ts | 7 +- src/app/register-page/register-page.module.ts | 26 ++-- .../deny-request-copy.component.spec.ts | 11 +- .../deny-request-copy.component.ts | 14 +- .../themed-deny-request-copy.component.ts | 7 +- .../email-request-copy.component.spec.ts | 11 +- .../email-request-copy.component.ts | 12 +- .../themed-email-request-copy.component.ts | 7 +- .../grant-deny-request-copy.component.spec.ts | 11 +- .../grant-deny-request-copy.component.ts | 14 +- .../grant-request-copy.component.spec.ts | 11 +- .../grant-request-copy.component.ts | 15 +- .../themed-grant-request-copy.component.ts | 7 +- src/app/request-copy/request-copy.module.ts | 34 +++-- src/app/root.module.ts | 24 ++-- src/app/root/root.component.spec.ts | 22 +-- src/app/root/root.component.ts | 20 ++- src/app/root/themed-root.component.ts | 7 +- .../search-navbar.component.spec.ts | 25 ++-- .../search-navbar/search-navbar.component.ts | 15 +- .../themed-search-navbar.component.ts | 7 +- .../configuration-search-page.component.ts | 32 +++-- src/app/search-page/search-page.component.ts | 19 +-- src/app/search-page/search-page.module.ts | 34 ++--- ...med-configuration-search-page.component.ts | 7 +- .../themed-search-page.component.ts | 7 +- ...ccess-control-array-form.component.spec.ts | 5 +- .../access-control-array-form.component.ts | 16 ++- .../access-control-array-form/to-date.pipe.ts | 7 +- ...s-control-form-container.component.spec.ts | 33 +++-- ...access-control-form-container.component.ts | 15 +- .../access-control-form.module.ts | 26 ++-- ...-select-bitstreams-modal.component.spec.ts | 4 +- ...ntrol-select-bitstreams-modal.component.ts | 12 +- src/app/shared/alert/alert.component.spec.ts | 23 +-- src/app/shared/alert/alert.component.ts | 24 ++-- .../auth-nav-menu.component.spec.ts | 74 +++++----- .../auth-nav-menu/auth-nav-menu.component.ts | 17 ++- .../themed-auth-nav-menu.component.ts | 7 +- .../user-menu/user-menu.component.spec.ts | 36 +++-- .../user-menu/user-menu.component.ts | 13 +- .../browse-by/browse-by.component.spec.ts | 26 ++-- .../shared/browse-by/browse-by.component.ts | 24 ++-- .../browse-by/shared-browse-by.module.ts | 26 ++-- .../collection-dropdown.component.spec.ts | 24 ++-- .../collection-dropdown.component.ts | 14 +- .../themed-collection-dropdown.component.ts | 7 +- .../comcol-form/comcol-form.component.spec.ts | 11 +- .../comcol-form/comcol-form.component.ts | 19 ++- .../create-comcol-page.component.ts | 5 +- .../delete-comcol-page.component.ts | 5 +- .../comcol-metadata.component.ts | 5 +- .../comcol-role/comcol-role.component.html | 3 +- .../comcol-role/comcol-role.component.ts | 19 ++- .../edit-comcol-page.component.ts | 5 +- .../comcol-page-browse-by.component.ts | 16 ++- .../themed-comcol-page-browse-by.component.ts | 7 +- .../comcol-page-content.component.ts | 7 +- .../comcol-page-handle.component.spec.ts | 5 +- .../comcol-page-handle.component.ts | 6 +- .../themed-comcol-page-handle.component.ts | 7 +- .../comcol-page-header.component.ts | 7 +- .../comcol-page-logo.component.ts | 7 +- src/app/shared/comcol/comcol.module.ts | 24 ++-- .../confirmation-modal.component.spec.ts | 11 +- .../confirmation-modal.component.ts | 8 +- .../context-help-wrapper.component.spec.ts | 15 +- .../context-help-wrapper.component.ts | 11 +- src/app/shared/context-help.directive.spec.ts | 13 +- src/app/shared/context-help.directive.ts | 3 +- .../ds-select/ds-select.component.spec.ts | 10 +- .../shared/ds-select/ds-select.component.ts | 11 +- .../dso-page/dso-edit-menu.resolver.spec.ts | 31 ++-- ...-menu-expandable-section.component.spec.ts | 22 +-- ...-edit-menu-expandable-section.component.ts | 13 +- .../dso-edit-menu-section.component.spec.ts | 22 +-- .../dso-edit-menu-section.component.ts | 14 +- .../dso-edit-menu.component.spec.ts | 21 ++- .../dso-edit-menu/dso-edit-menu.component.ts | 9 +- ...page-subscription-button.component.spec.ts | 22 +-- .../dso-page-subscription-button.component.ts | 12 +- src/app/shared/dso-page/dso-page.module.ts | 26 ++-- ...ized-collection-selector.component.spec.ts | 11 +- ...uthorized-collection-selector.component.ts | 16 ++- .../dso-selector.component.spec.ts | 11 +- .../dso-selector/dso-selector.component.ts | 17 ++- ...llection-parent-selector.component.spec.ts | 33 +++-- ...te-collection-parent-selector.component.ts | 9 +- ...te-collection-parent-selector.component.ts | 3 +- ...ommunity-parent-selector.component.spec.ts | 33 +++-- ...ate-community-parent-selector.component.ts | 10 +- ...ate-community-parent-selector.component.ts | 3 +- ...ate-item-parent-selector.component.spec.ts | 33 +++-- .../create-item-parent-selector.component.ts | 13 +- ...d-create-item-parent-selector.component.ts | 3 +- ...o-selector-modal-wrapper.component.spec.ts | 38 ++--- ...edit-collection-selector.component.spec.ts | 33 +++-- .../edit-collection-selector.component.ts | 9 +- ...emed-edit-collection-selector.component.ts | 3 +- .../edit-community-selector.component.spec.ts | 33 +++-- .../edit-community-selector.component.ts | 9 +- ...hemed-edit-community-selector.component.ts | 3 +- .../edit-item-selector.component.spec.ts | 33 +++-- .../edit-item-selector.component.ts | 9 +- .../themed-edit-item-selector.component.ts | 3 +- .../export-batch-selector.component.spec.ts | 37 +++-- .../export-batch-selector.component.ts | 10 +- ...export-metadata-selector.component.spec.ts | 37 +++-- .../export-metadata-selector.component.ts | 10 +- .../import-batch-selector.component.spec.ts | 11 +- .../import-batch-selector.component.ts | 9 +- .../entity-dropdown.component.spec.ts | 16 ++- .../entity-dropdown.component.ts | 12 +- .../eperson-group-list.component.spec.ts | 23 ++- .../eperson-group-list.component.ts | 19 ++- .../eperson-search-box.component.spec.ts | 25 ++-- .../eperson-search-box.component.ts | 9 +- .../group-search-box.component.spec.ts | 25 ++-- .../group-search-box.component.ts | 9 +- src/app/shared/error/error.component.spec.ts | 18 +-- src/app/shared/error/error.component.ts | 9 +- .../file-download-link.component.spec.ts | 11 +- .../file-download-link.component.ts | 10 +- .../themed-file-download-link.component.ts | 7 +- ...ynamic-form-control-container.component.ts | 31 +++- .../ds-dynamic-form.component.ts | 10 +- ...ng-metadata-list-element.component.spec.ts | 24 ++-- ...xisting-metadata-list-element.component.ts | 16 ++- ...ng-relation-list-element.component.spec.ts | 10 +- ...xisting-relation-list-element.component.ts | 14 +- .../dynamic-form-array.component.ts | 21 ++- .../custom-switch.component.spec.ts | 11 +- .../custom-switch/custom-switch.component.ts | 8 +- ...namic-date-picker-inline.component.spec.ts | 12 +- .../dynamic-date-picker-inline.component.ts | 14 +- .../date-picker/date-picker.component.spec.ts | 24 ++-- .../date-picker/date-picker.component.ts | 11 +- .../dynamic-disabled.component.spec.ts | 11 +- .../disabled/dynamic-disabled.component.ts | 7 +- .../dynamic-form-group.component.ts | 15 +- .../list/dynamic-list.component.spec.ts | 28 ++-- .../models/list/dynamic-list.component.ts | 14 +- .../lookup/dynamic-lookup.component.spec.ts | 27 ++-- .../models/lookup/dynamic-lookup.component.ts | 25 +++- .../onebox/dynamic-onebox.component.spec.ts | 27 ++-- .../models/onebox/dynamic-onebox.component.ts | 28 +++- .../dynamic-relation-group.component.spec.ts | 26 ++-- .../dynamic-relation-group.components.ts | 30 +++- ...amic-scrollable-dropdown.component.spec.ts | 29 ++-- .../dynamic-scrollable-dropdown.component.ts | 16 ++- .../models/tag/dynamic-tag.component.spec.ts | 26 ++-- .../models/tag/dynamic-tag.component.ts | 15 +- ...ic-lookup-relation-modal.component.spec.ts | 29 ++-- ...dynamic-lookup-relation-modal.component.ts | 28 +++- ...tion-external-source-tab.component.spec.ts | 17 ++- ...-relation-external-source-tab.component.ts | 22 ++- ...ource-entry-import-modal.component.spec.ts | 11 +- ...nal-source-entry-import-modal.component.ts | 13 +- ...nal-source-entry-import-modal.component.ts | 7 +- ...-relation-external-source-tab.component.ts | 7 +- ...okup-relation-search-tab.component.spec.ts | 20 ++- ...ic-lookup-relation-search-tab.component.ts | 16 ++- ...ic-lookup-relation-search-tab.component.ts | 7 +- ...p-relation-selection-tab.component.spec.ts | 21 ++- ...lookup-relation-selection-tab.component.ts | 14 +- .../shared/form/chips/chips.component.spec.ts | 22 +-- src/app/shared/form/chips/chips.component.ts | 18 ++- .../authority-confidence-state.directive.ts | 3 +- src/app/shared/form/form.component.html | 2 +- src/app/shared/form/form.component.spec.ts | 28 ++-- src/app/shared/form/form.component.ts | 24 +++- src/app/shared/form/form.module.ts | 64 ++++----- .../number-picker.component.spec.ts | 26 ++-- .../number-picker/number-picker.component.ts | 8 +- ...ocabulary-treeview-modal.component.spec.ts | 9 +- .../vocabulary-treeview-modal.component.ts | 9 +- .../vocabulary-treeview.component.spec.ts | 22 +-- .../vocabulary-treeview.component.ts | 22 ++- .../google-recaptcha.component.spec.ts | 10 +- .../google-recaptcha.component.ts | 9 +- src/app/shared/hover-class.directive.spec.ts | 7 +- src/app/shared/hover-class.directive.ts | 3 +- .../idle-modal/idle-modal.component.spec.ts | 11 +- .../shared/idle-modal/idle-modal.component.ts | 7 +- .../impersonate-navbar.component.spec.ts | 14 +- .../impersonate-navbar.component.ts | 9 +- .../dso-input-suggestions.component.spec.ts | 9 +- .../dso-input-suggestions.component.ts | 32 +++-- ...filter-input-suggestions.component.spec.ts | 9 +- .../filter-input-suggestions.component.ts | 32 +++-- .../input-suggestions.component.spec.ts | 9 +- .../input-suggestions.component.ts | 11 +- .../validation-suggestions.component.spec.ts | 11 +- .../validation-suggestions.component.ts | 31 ++-- .../lang-switch/lang-switch.component.spec.ts | 38 +++-- .../lang-switch/lang-switch.component.ts | 12 +- .../shared/loading/loading.component.spec.ts | 18 +-- src/app/shared/loading/loading.component.ts | 9 +- .../loading/themed-loading.component.ts | 7 +- .../log-in-container.component.spec.ts | 25 ++-- .../container/log-in-container.component.ts | 9 +- .../shared/log-in/log-in.component.spec.ts | 35 ++--- src/app/shared/log-in/log-in.component.ts | 13 +- ...log-in-external-provider.component.spec.ts | 18 ++- .../log-in-external-provider.component.ts | 9 +- .../log-in-password.component.spec.ts | 22 ++- .../password/log-in-password.component.ts | 16 ++- .../shared/log-out/log-out.component.spec.ts | 30 ++-- src/app/shared/log-out/log-out.component.ts | 13 +- .../external-link-menu-item.component.spec.ts | 11 +- .../external-link-menu-item.component.ts | 8 +- .../link-menu-item.component.spec.ts | 12 +- .../menu-item/link-menu-item.component.ts | 10 +- .../onclick-menu-item.component.spec.ts | 11 +- .../menu-item/onclick-menu-item.component.ts | 10 +- .../text-menu-item.component.spec.ts | 11 +- .../menu-item/text-menu-item.component.ts | 7 +- .../menu-section.component.spec.ts | 11 +- .../menu-section/menu-section.component.ts | 5 +- src/app/shared/menu/menu.component.spec.ts | 11 +- src/app/shared/menu/menu.component.ts | 5 +- src/app/shared/menu/menu.module.ts | 26 ++-- .../metadata-field-wrapper.component.spec.ts | 19 +-- .../metadata-field-wrapper.component.ts | 9 +- ...ta-representation-loader.component.spec.ts | 19 ++- ...etadata-representation-loader.component.ts | 6 +- .../metadata-representation.directive.ts | 3 +- ...med-task-actions-approve.component.spec.ts | 22 +-- .../claimed-task-actions-approve.component.ts | 12 +- .../claimed-task-actions.component.spec.ts | 24 ++-- .../claimed-task-actions.component.ts | 16 ++- ...ask-actions-decline-task.component.spec.ts | 24 ++-- ...med-task-actions-decline-task.component.ts | 12 +- ...sk-actions-edit-metadata.component.spec.ts | 22 +-- ...ed-task-actions-edit-metadata.component.ts | 14 +- ...aimed-task-action-rating.component.spec.ts | 16 +-- ...ed-claimed-task-action-rating.component.ts | 11 +- ...imed-task-actions-reject.component.spec.ts | 22 +-- .../claimed-task-actions-reject.component.ts | 15 +- ...k-actions-return-to-pool.component.spec.ts | 22 +-- ...d-task-actions-return-to-pool.component.ts | 12 +- ...k-action-select-reviewer.component.spec.ts | 18 ++- ...d-task-action-select-reviewer.component.ts | 11 +- ...imed-task-actions-loader.component.spec.ts | 11 +- .../claimed-task-actions-loader.component.ts | 6 +- .../claimed-task-actions.directive.ts | 3 +- .../item/item-actions.component.spec.ts | 24 ++-- .../item/item-actions.component.ts | 13 +- .../mydspace-actions.module.ts | 24 ++-- .../mydspace-reloadable-actions.spec.ts | 22 +-- .../pool-task-actions.component.spec.ts | 22 +-- .../pool-task/pool-task-actions.component.ts | 14 +- .../workflowitem-actions.component.spec.ts | 24 ++-- .../workflowitem-actions.component.ts | 13 +- .../workspaceitem-actions.component.spec.ts | 28 ++-- .../workspaceitem-actions.component.ts | 15 +- .../shared/ng-for-track-by-id.directive.ts | 5 +- .../notification.component.spec.ts | 21 +-- .../notification/notification.component.ts | 35 ++--- .../notifications-board.component.spec.ts | 22 +-- .../notifications-board.component.ts | 14 +- .../notifications.reducers.spec.ts | 12 +- .../notifications.service.spec.ts | 22 +-- .../object-collection.component.spec.ts | 10 +- .../object-collection.component.ts | 13 +- .../access-status-badge.component.spec.ts | 13 +- .../access-status-badge.component.ts | 8 +- .../themed-access-status-badge.component.ts | 7 +- .../shared/badges/badges.component.spec.ts | 8 +- .../shared/badges/badges.component.ts | 13 +- .../my-dspace-status-badge.component.spec.ts | 20 +-- .../my-dspace-status-badge.component.ts | 9 +- ...themed-my-dspace-status-badge.component.ts | 7 +- .../status-badge.component.spec.ts | 7 +- .../status-badge/status-badge.component.ts | 8 +- .../themed-status-badge.component.ts | 7 +- .../shared/badges/themed-badges.component.ts | 7 +- .../type-badge/themed-type-badge.component.ts | 7 +- .../type-badge/type-badge.component.spec.ts | 7 +- .../badges/type-badge/type-badge.component.ts | 8 +- .../importable-list-item-control.component.ts | 7 +- ...-object-component-loader.component.spec.ts | 11 +- ...table-object-component-loader.component.ts | 8 +- .../listable-object.directive.ts | 3 +- .../item-collection.component.ts | 11 +- .../item-submitter.component.spec.ts | 24 ++-- .../item-submitter.component.ts | 10 +- .../abstract-listable-element.component.ts | 5 +- ...ctable-list-item-control.component.spec.ts | 15 +- .../selectable-list-item-control.component.ts | 11 +- ...ch-result-detail-element.component.spec.ts | 11 +- ...-search-result-detail-element.component.ts | 11 +- ...tem-detail-preview-field.component.spec.ts | 24 ++-- .../item-detail-preview-field.component.ts | 9 +- .../item-detail-preview.component.spec.ts | 22 +-- .../item-detail-preview.component.ts | 20 ++- ...ch-result-detail-element.component.spec.ts | 11 +- ...-search-result-detail-element.component.ts | 10 +- ...ch-result-detail-element.component.spec.ts | 11 +- ...-search-result-detail-element.component.ts | 11 +- .../search-result-detail-element.component.ts | 5 +- ...ch-result-detail-element.component.spec.ts | 11 +- ...-search-result-detail-element.component.ts | 10 +- ...ch-result-detail-element.component.spec.ts | 11 +- ...-search-result-detail-element.component.ts | 10 +- .../object-detail.component.spec.ts | 20 +-- .../object-detail/object-detail.component.ts | 20 ++- .../collection-grid-element.component.spec.ts | 17 ++- .../collection-grid-element.component.ts | 12 +- .../community-grid-element.component.spec.ts | 17 ++- .../community-grid-element.component.ts | 12 +- .../item/item-grid-element.component.spec.ts | 11 +- .../item/item-grid-element.component.ts | 11 +- .../object-grid/object-grid.component.ts | 21 ++- ...arch-result-grid-element.component.spec.ts | 17 ++- ...on-search-result-grid-element.component.ts | 13 +- ...arch-result-grid-element.component.spec.ts | 17 ++- ...ty-search-result-grid-element.component.ts | 19 ++- ...arch-result-grid-element.component.spec.ts | 42 +++--- ...em-search-result-grid-element.component.ts | 17 ++- .../search-result-grid-element.component.ts | 5 +- .../bitstream-list-item.component.spec.ts | 7 +- .../bitstream-list-item.component.ts | 7 +- ...rowse-entry-list-element.component.spec.ts | 15 +- .../browse-entry-list-element.component.ts | 11 +- .../bundle-list-element.component.ts | 5 +- .../collection-list-element.component.spec.ts | 11 +- .../collection-list-element.component.ts | 10 +- .../community-list-element.component.spec.ts | 11 +- .../community-list-element.component.ts | 10 +- .../identifier-data.component.html | 8 +- .../identifier-data.component.ts | 10 +- .../item/item-list-element.component.spec.ts | 10 +- .../item/item-list-element.component.ts | 9 +- ...able-notification-object.component.spec.ts | 10 +- .../listable-notification-object.component.ts | 9 +- ...nk-metadata-list-element.component.spec.ts | 7 +- ...se-link-metadata-list-element.component.ts | 8 +- ...em-metadata-list-element.component.spec.ts | 7 +- .../item-metadata-list-element.component.ts | 7 +- ...a-representation-list-element.component.ts | 5 +- ...resentation-list-element.component.spec.ts | 7 +- ...a-representation-list-element.component.ts | 5 +- ...xt-metadata-list-element.component.spec.ts | 7 +- ...in-text-metadata-list-element.component.ts | 8 +- ...arch-result-list-element.component.spec.ts | 14 +- ...ed-search-result-list-element.component.ts | 12 +- ...arch-result-list-element.component.spec.ts | 14 +- ...ed-search-result-list-element.component.ts | 12 +- ...arch-result-list-element.component.spec.ts | 14 +- ...sk-search-result-list-element.component.ts | 12 +- ...arch-result-list-element.component.spec.ts | 11 +- ...ed-search-result-list-element.component.ts | 11 +- .../item-list-preview.component.spec.ts | 56 ++++---- .../item-list-preview.component.ts | 18 ++- .../themed-item-list-preview.component.ts | 7 +- ...-list-element-submission.component.spec.ts | 11 +- ...esult-list-element-submission.component.ts | 11 +- ...arch-result-list-element.component.spec.ts | 11 +- ...ol-search-result-list-element.component.ts | 11 +- ...arch-result-list-element.component.spec.ts | 11 +- ...em-search-result-list-element.component.ts | 12 +- ...arch-result-list-element.component.spec.ts | 11 +- ...em-search-result-list-element.component.ts | 12 +- .../object-list/object-list.component.html | 2 +- .../object-list/object-list.component.spec.ts | 9 +- .../object-list/object-list.component.ts | 20 ++- ...arch-result-list-element.component.spec.ts | 10 +- ...on-search-result-list-element.component.ts | 11 +- ...arch-result-list-element.component.spec.ts | 11 +- ...ty-search-result-list-element.component.ts | 11 +- ...arch-result-list-element.component.spec.ts | 26 ++-- ...em-search-result-list-element.component.ts | 14 +- .../search-result-list-element.component.ts | 5 +- ...n-sidebar-search-list-element.component.ts | 9 +- ...y-sidebar-search-list-element.component.ts | 9 +- ...n-sidebar-search-list-element.component.ts | 9 +- ...ebar-search-list-element.component.spec.ts | 19 ++- .../sidebar-search-list-element.component.ts | 9 +- .../themed-object-list.component.ts | 7 +- .../collection-select.component.spec.ts | 11 +- .../collection-select.component.ts | 16 ++- .../item-select/item-select.component.spec.ts | 11 +- .../item-select/item-select.component.ts | 14 +- .../page-size-selector.component.spec.ts | 19 ++- .../page-size-selector.component.ts | 11 +- .../pagination/pagination.component.spec.ts | 33 +++-- .../shared/pagination/pagination.component.ts | 19 ++- .../resource-policy-create.component.spec.ts | 23 ++- .../resource-policy-create.component.ts | 11 +- .../resource-policy-edit.component.spec.ts | 23 ++- .../edit/resource-policy-edit.component.ts | 11 +- .../resource-policy-entry.component.spec.ts | 19 +-- .../entry/resource-policy-entry.component.ts | 10 ++ .../resource-policy-form.component.spec.ts | 28 ++-- .../form/resource-policy-form.component.ts | 15 +- .../resource-policies.component.spec.ts | 24 ++-- .../resource-policies.component.ts | 13 +- .../resource-policies.module.ts | 30 ++-- .../results-back-button.component.spec.ts | 16 +-- .../results-back-button.component.ts | 11 +- .../results-back-button.module.ts | 20 ++- .../themed-results-back-button.component.ts | 7 +- src/app/shared/roles/role.directive.ts | 3 +- src/app/shared/rss-feed/rss.component.spec.ts | 20 +-- src/app/shared/rss-feed/rss.component.ts | 16 ++- .../scope-selector-modal.component.spec.ts | 33 +++-- .../scope-selector-modal.component.ts | 10 +- .../search-form/search-form.component.spec.ts | 13 +- .../search-form/search-form.component.ts | 14 +- .../themed-search-form.component.ts | 7 +- .../search-export-csv.component.spec.ts | 17 ++- .../search-export-csv.component.ts | 12 +- .../search-authority-filter.component.ts | 16 ++- .../search-boolean-filter.component.ts | 14 +- .../search-facet-option.component.spec.ts | 39 +++-- .../search-facet-option.component.ts | 13 +- ...earch-facet-range-option.component.spec.ts | 37 +++-- .../search-facet-range-option.component.ts | 14 +- ...ch-facet-selected-option.component.spec.ts | 37 +++-- .../search-facet-selected-option.component.ts | 11 +- .../search-facet-filter-wrapper.component.ts | 7 +- .../search-facet-filter.component.spec.ts | 31 ++-- .../search-facet-filter.component.ts | 5 +- .../search-filter.component.spec.ts | 19 ++- .../search-filter/search-filter.component.ts | 14 +- .../search-hierarchy-filter.component.spec.ts | 18 ++- .../search-hierarchy-filter.component.ts | 16 ++- .../search-range-filter.component.spec.ts | 31 ++-- .../search-range-filter.component.ts | 18 ++- .../search-text-filter.component.ts | 16 ++- .../search-filters.component.spec.ts | 12 +- .../search-filters.component.ts | 14 +- .../themed-search-filters.component.ts | 7 +- .../search-label.component.spec.ts | 11 +- .../search-label/search-label.component.ts | 10 +- .../search-labels.component.spec.ts | 11 +- .../search-labels/search-labels.component.ts | 11 +- .../search-results.component.spec.ts | 10 +- .../search-results.component.ts | 21 ++- .../themed-search-results.component.ts | 7 +- .../search-settings.component.spec.ts | 34 +++-- .../search-settings.component.ts | 13 +- .../themed-search-settings.component.ts | 7 +- .../search-sidebar.component.spec.ts | 7 +- .../search-sidebar.component.ts | 14 +- .../themed-search-sidebar.component.ts | 7 +- ...rch-switch-configuration.component.spec.ts | 24 ++-- .../search-switch-configuration.component.ts | 11 +- .../shared/search/search.component.spec.ts | 64 ++++----- src/app/shared/search/search.component.ts | 20 ++- src/app/shared/search/search.module.ts | 28 ++-- .../shared/search/themed-search.component.ts | 7 +- src/app/shared/shared.module.ts | 40 +++--- .../page-with-sidebar.component.spec.ts | 22 ++- .../sidebar/page-with-sidebar.component.ts | 11 +- .../sidebar/sidebar-dropdown.component.ts | 9 +- .../date/starts-with-date.component.spec.ts | 11 +- .../date/starts-with-date.component.ts | 11 +- .../text/starts-with-text.component.spec.ts | 11 +- .../text/starts-with-text.component.ts | 10 +- .../subscription-modal.component.spec.ts | 24 ++-- .../subscription-modal.component.ts | 15 +- .../subscription-view.component.spec.ts | 22 +-- .../subscription-view.component.ts | 14 +- .../subscriptions/subscriptions.module.ts | 26 ++-- src/app/shared/testing/test-module.ts | 3 +- .../theme-support/themed.component.spec.ts | 16 +-- .../abstract-trackable.component.spec.ts | 11 +- .../trackable/abstract-trackable.component.ts | 5 +- .../truncatable-part.component.spec.ts | 44 +++--- .../truncatable-part.component.ts | 11 +- .../truncatable/truncatable.component.spec.ts | 11 +- .../truncatable/truncatable.component.ts | 8 +- .../file-dropzone-no-uploader.component.ts | 16 ++- src/app/shared/upload/upload.module.ts | 28 ++-- .../uploader/uploader.component.spec.ts | 24 ++-- .../upload/uploader/uploader.component.ts | 20 ++- src/app/shared/utils/auto-focus.directive.ts | 3 +- src/app/shared/utils/browser-only.pipe.ts | 3 +- src/app/shared/utils/capitalize.pipe.ts | 3 +- .../shared/utils/click-outside.directive.ts | 3 +- src/app/shared/utils/console.pipe.ts | 3 +- src/app/shared/utils/debounce.directive.ts | 3 +- src/app/shared/utils/drag-click.directive.ts | 3 +- src/app/shared/utils/emphasize.pipe.ts | 5 +- src/app/shared/utils/enum-keys-pipe.ts | 5 +- src/app/shared/utils/file-size-pipe.ts | 5 +- .../utils/file-value-accessor.directive.ts | 7 +- .../utils/in-list-validator.directive.ts | 11 +- src/app/shared/utils/markdown.pipe.ts | 3 +- .../metadatafield-validator.directive.ts | 11 +- src/app/shared/utils/object-keys-pipe.ts | 5 +- src/app/shared/utils/object-ngfor.pipe.ts | 3 +- src/app/shared/utils/object-values-pipe.ts | 5 +- .../shared/utils/require-file.validator.ts | 5 +- src/app/shared/utils/safe-url-pipe.ts | 5 +- src/app/shared/utils/short-number.pipe.ts | 3 +- src/app/shared/utils/truncate.pipe.ts | 3 +- src/app/shared/utils/var.directive.ts | 3 +- .../view-mode-switch.component.spec.ts | 33 ++--- .../view-mode-switch.component.ts | 13 +- ...llection-statistics-page.component.spec.ts | 14 +- .../collection-statistics-page.component.ts | 37 ++--- ...ed-collection-statistics-page.component.ts | 7 +- ...ommunity-statistics-page.component.spec.ts | 14 +- .../community-statistics-page.component.ts | 33 ++--- ...med-community-statistics-page.component.ts | 7 +- .../item-statistics-page.component.spec.ts | 14 +- .../item-statistics-page.component.ts | 37 ++--- .../themed-item-statistics-page.component.ts | 7 +- .../site-statistics-page.component.spec.ts | 14 +- .../site-statistics-page.component.ts | 36 ++--- .../themed-site-statistics-page.component.ts | 7 +- .../statistics-page/statistics-page.module.ts | 22 +-- ...ponent.ts => statistics-page.directive.ts} | 22 ++- .../statistics-table.component.spec.ts | 14 +- .../statistics-table.component.ts | 11 +- .../dspace/view-tracker.component.ts | 7 +- src/app/statistics/statistics.module.ts | 20 ++- .../edit/submission-edit.component.spec.ts | 19 ++- .../edit/submission-edit.component.ts | 7 +- .../edit/themed-submission-edit.component.ts | 7 +- ...bmission-form-collection.component.spec.ts | 24 ++-- .../submission-form-collection.component.ts | 24 +++- .../submission-form-footer.component.spec.ts | 26 ++-- .../submission-form-footer.component.ts | 11 +- ...mission-form-section-add.component.spec.ts | 22 +-- .../submission-form-section-add.component.ts | 9 +- .../form/submission-form.component.html | 4 +- .../form/submission-form.component.spec.ts | 20 ++- .../form/submission-form.component.ts | 17 +++ .../submission-upload-files.component.spec.ts | 22 +-- .../submission-upload-files.component.ts | 7 + ...port-external-collection.component.spec.ts | 21 ++- ...on-import-external-collection.component.ts | 16 ++- ...-import-external-preview.component.spec.ts | 21 ++- ...ssion-import-external-preview.component.ts | 7 +- ...mport-external-searchbar.component.spec.ts | 21 ++- ...ion-import-external-searchbar.component.ts | 15 +- ...bmission-import-external.component.spec.ts | 21 ++- .../submission-import-external.component.ts | 27 +++- ...ed-submission-import-external.component.ts | 7 +- .../section-accesses.component.spec.ts | 80 +++++------ .../accesses/section-accesses.component.ts | 8 +- ...sion-section-cc-licenses.component.spec.ts | 14 +- ...ubmission-section-cc-licenses.component.ts | 17 ++- .../section-container.component.spec.ts | 26 ++-- .../container/section-container.component.ts | 18 ++- .../form/section-form.component.spec.ts | 29 ++-- .../sections/form/section-form.component.ts | 8 ++ .../section-identifiers.component.spec.ts | 26 ++-- .../section-identifiers.component.ts | 14 +- .../license/section-license.component.spec.ts | 25 ++-- .../license/section-license.component.ts | 7 + .../submission/sections/sections.directive.ts | 5 +- .../content-accordion.component.spec.ts | 18 +-- .../content-accordion.component.ts | 13 +- .../metadata-information.component.spec.ts | 16 +-- .../metadata-information.component.ts | 10 +- .../publication-information.component.spec.ts | 16 +-- .../publication-information.component.ts | 10 +- .../publisher-policy.component.spec.ts | 16 +-- .../publisher-policy.component.ts | 13 +- .../section-sherpa-policies.component.spec.ts | 40 +++--- .../section-sherpa-policies.component.ts | 23 ++- ...tion-upload-access-conditions.component.ts | 5 +- ...section-upload-file-edit.component.spec.ts | 25 ++-- .../section-upload-file-edit.component.ts | 8 ++ .../section-upload-file.component.spec.ts | 24 ++-- .../file/section-upload-file.component.ts | 16 +++ .../themed-section-upload-file.component.ts | 3 +- ...section-upload-file-view.component.spec.ts | 21 ++- .../section-upload-file-view.component.ts | 14 ++ .../upload/section-upload.component.html | 2 +- .../upload/section-upload.component.spec.ts | 23 +-- .../upload/section-upload.component.ts | 17 +++ src/app/submission/submission.module.ts | 54 +++---- .../submission-submit.component.spec.ts | 18 +-- .../submit/submission-submit.component.ts | 7 +- .../themed-submission-submit.component.ts | 7 +- .../subscriptions-page.component.spec.ts | 24 ++-- .../subscriptions-page.component.ts | 15 +- .../subscriptions-page.module.ts | 12 +- ...system-wide-alert-banner.component.spec.ts | 13 +- .../system-wide-alert-banner.component.ts | 11 +- .../system-wide-alert-form.component.spec.ts | 17 ++- .../system-wide-alert-form.component.ts | 16 ++- .../system-wide-alert.module.ts | 34 +++-- .../thumbnail/themed-thumbnail.component.ts | 7 +- src/app/thumbnail/thumbnail.component.spec.ts | 13 +- src/app/thumbnail/thumbnail.component.ts | 7 + ...ced-workflow-action-page.component.spec.ts | 28 ++-- ...advanced-workflow-action-page.component.ts | 11 +- ...d-workflow-action-rating.component.spec.ts | 40 +++--- ...vanced-workflow-action-rating.component.ts | 20 ++- ...w-action-select-reviewer.component.spec.ts | 42 +++--- ...rkflow-action-select-reviewer.component.ts | 17 ++- .../reviewers-list.component.spec.ts | 22 ++- .../reviewers-list.component.ts | 25 +++- ...advanced-workflow-action.component.spec.ts | 42 +++--- .../advanced-workflow-action.component.ts | 4 +- ...-workflow-actions-loader.component.spec.ts | 12 +- ...anced-workflow-actions-loader.component.ts | 7 +- .../advanced-workflow-actions.directive.ts | 3 +- ...orkflow-item-action-page.component.spec.ts | 43 +++--- .../workflow-item-action-page.component.ts | 9 +- .../themed-workflow-item-delete.component.ts | 7 +- .../workflow-item-delete.component.spec.ts | 21 ++- .../workflow-item-delete.component.ts | 16 ++- ...hemed-workflow-item-send-back.component.ts | 7 +- .../workflow-item-send-back.component.spec.ts | 21 ++- .../workflow-item-send-back.component.ts | 16 ++- .../workflowitems-edit-page-routing.module.ts | 90 ------------ .../workflowitems-edit-page.module.ts | 44 +++--- .../workflowitems-edit-page.routes.ts | 82 +++++++++++ ...ed-workspaceitems-delete-page.component.ts | 17 ++- .../workspaceitems-delete-page.component.html | 2 +- ...rkspaceitems-delete-page.component.spec.ts | 37 +++-- .../workspaceitems-delete-page.component.ts | 15 +- .../workspaceitems-edit-page.module.ts | 18 ++- .../admin-sidebar/admin-sidebar.component.ts | 7 +- .../edit-bitstream-page.component.ts | 28 +++- .../app/breadcrumbs/breadcrumbs.component.ts | 17 ++- .../browse-by-date-page.component.ts | 40 +++++- .../browse-by-metadata-page.component.ts | 40 +++++- .../browse-by-switcher.component.ts | 9 +- .../browse-by-taxonomy-page.component.ts | 15 +- .../browse-by-title-page.component.ts | 40 +++++- .../collection-page.component.ts | 46 +++++- .../edit-item-template-page.component.ts | 20 +++ .../community-list-page.component.ts | 12 +- .../community-list.component.ts | 17 ++- .../community-page.component.ts | 52 ++++++- ...nity-page-sub-collection-list.component.ts | 18 ++- ...unity-page-sub-community-list.component.ts | 23 ++- .../dso-edit-metadata.component.ts | 25 +++- .../journal-issue/journal-issue.component.ts | 20 +++ .../journal-volume.component.ts | 20 +++ .../item-pages/journal/journal.component.ts | 23 +++ .../custom/app/footer/footer.component.ts | 7 +- .../app/forbidden/forbidden.component.ts | 6 +- .../forgot-email.component.ts | 11 +- .../forgot-password-form.component.ts | 18 ++- .../header-navbar-wrapper.component.ts | 9 +- .../custom/app/header/header.component.ts | 10 ++ .../home-news/home-news.component.ts | 11 +- .../app/home-page/home-page.component.ts | 13 +- .../top-level-community-list.component.ts | 14 +- .../end-user-agreement.component.ts | 13 +- .../feedback-form/feedback-form.component.ts | 6 + .../app/info/feedback/feedback.component.ts | 7 +- .../app/info/privacy/privacy.component.ts | 5 +- .../item-page/alerts/item-alerts.component.ts | 11 ++ .../item-status/item-status.component.ts | 22 ++- .../full-file-section.component.ts | 25 ++++ .../full/full-item-page.component.ts | 42 +++++- .../media-viewer-image.component.ts | 7 + .../media-viewer-video.component.ts | 10 ++ .../media-viewer/media-viewer.component.ts | 22 +++ .../file-section/file-section.component.ts | 33 ++++- .../title/item-page-title-field.component.ts | 4 + .../item-page/simple/item-page.component.ts | 30 +++- .../publication/publication.component.ts | 69 ++++++++- .../untyped-item/untyped-item.component.ts | 59 ++++++++ .../metadata-representation-list.component.ts | 18 ++- .../app/login-page/login-page.component.ts | 6 +- .../app/logout-page/logout-page.component.ts | 8 +- .../objectnotfound.component.ts | 10 +- .../my-dspace-page.component.ts | 21 ++- .../expandable-navbar-section.component.ts | 13 +- .../custom/app/navbar/navbar.component.ts | 8 +- .../pagenotfound/pagenotfound.component.ts | 6 +- .../profile-page/profile-page.component.ts | 25 +++- .../create-profile.component.ts | 21 ++- .../register-email.component.ts | 11 +- .../deny-request-copy.component.ts | 21 ++- .../email-request-copy.component.ts | 17 ++- .../grant-request-copy.component.ts | 26 ++-- src/themes/custom/app/root/root.component.ts | 17 +++ .../search-navbar/search-navbar.component.ts | 8 +- .../configuration-search-page.component.ts | 20 ++- .../app/search-page/search-page.component.ts | 6 +- .../auth-nav-menu/auth-nav-menu.component.ts | 11 +- .../collection-dropdown.component.ts | 8 ++ .../comcol-page-browse-by.component.ts | 19 ++- .../comcol-page-handle.component.ts | 10 +- ...te-collection-parent-selector.component.ts | 7 +- ...ate-community-parent-selector.component.ts | 6 +- .../create-item-parent-selector.component.ts | 19 ++- .../edit-collection-selector.component.ts | 7 +- .../edit-community-selector.component.ts | 7 +- .../edit-item-selector.component.ts | 7 +- .../file-download-link.component.ts | 4 + ...-relation-external-source-tab.component.ts | 36 ++++- ...nal-source-entry-import-modal.component.ts | 21 ++- ...ic-lookup-relation-search-tab.component.ts | 24 +++- .../app/shared/loading/loading.component.ts | 12 +- .../access-status-badge.component.ts | 8 +- .../shared/badges/badges.component.ts | 25 +++- .../my-dspace-status-badge.component.ts | 7 +- .../status-badge/status-badge.component.ts | 8 +- .../badges/type-badge/type-badge.component.ts | 8 +- .../collection-list-element.component.ts | 14 +- .../community-list-element.component.ts | 16 ++- .../object-list/object-list.component.ts | 21 ++- ...em-search-result-list-element.component.ts | 13 ++ ...n-sidebar-search-list-element.component.ts | 11 +- .../results-back-button.component.ts | 5 +- .../search-form/search-form.component.ts | 11 +- .../search-filters.component.ts | 11 +- .../search-results.component.ts | 17 ++- .../search-settings.component.ts | 12 +- .../search-sidebar.component.ts | 18 ++- .../date/starts-with-date.component.ts | 5 + .../text/starts-with-text.component.ts | 14 +- .../collection-statistics-page.component.ts | 15 +- .../community-statistics-page.component.ts | 15 +- .../item-statistics-page.component.ts | 15 +- .../site-statistics-page.component.ts | 15 +- .../edit/submission-edit.component.ts | 7 +- .../submission-import-external.component.ts | 28 +++- .../file/section-upload-file.component.ts | 22 ++- .../submit/submission-submit.component.ts | 11 +- .../app/thumbnail/thumbnail.component.ts | 7 + .../workflow-item-delete.component.ts | 14 +- .../workflow-item-send-back.component.ts | 14 +- .../workspace-items-delete.component.ts | 15 +- src/themes/custom/eager-theme.module.ts | 30 ++-- src/themes/custom/lazy-theme.module.ts | 124 ++++++++-------- .../header-navbar-wrapper.component.ts | 9 +- .../dspace/app/header/header.component.ts | 17 ++- .../home-news/home-news.component.ts | 7 +- .../dspace/app/navbar/navbar.component.ts | 20 ++- src/themes/dspace/eager-theme.module.ts | 24 ++-- 1311 files changed, 13140 insertions(+), 8009 deletions(-) rename src/app/statistics-page/statistics-page/{statistics-page.component.ts => statistics-page.directive.ts} (85%) delete mode 100644 src/app/workflowitems-edit-page/workflowitems-edit-page-routing.module.ts create mode 100644 src/app/workflowitems-edit-page/workflowitems-edit-page.routes.ts diff --git a/.eslintrc.json b/.eslintrc.json index af1b97849b..985126bbc2 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -139,7 +139,6 @@ } ], "@angular-eslint/no-attribute-decorator": "error", - "@angular-eslint/no-forward-ref": "error", "@angular-eslint/no-output-native": "warn", "@angular-eslint/no-output-on-prefix": "warn", "@angular-eslint/no-conflicting-lifecycle": "warn", diff --git a/src/app/access-control/access-control.module.ts b/src/app/access-control/access-control.module.ts index 3dc4b6cedc..4625726765 100644 --- a/src/app/access-control/access-control.module.ts +++ b/src/app/access-control/access-control.module.ts @@ -28,36 +28,34 @@ export const ValidateEmailErrorStateMatcher: DynamicErrorMessagesMatcher = }; @NgModule({ - imports: [ - CommonModule, - SharedModule, - RouterModule, - AccessControlRoutingModule, - FormModule, - NgbAccordionModule, - SearchModule, - AccessControlFormModule, - ], - exports: [ - MembersListComponent, - ], - declarations: [ - EPeopleRegistryComponent, - EPersonFormComponent, - GroupsRegistryComponent, - GroupFormComponent, - SubgroupsListComponent, - MembersListComponent, - BulkAccessComponent, - BulkAccessBrowseComponent, - BulkAccessSettingsComponent, - ], - providers: [ - { - provide: DYNAMIC_ERROR_MESSAGES_MATCHER, - useValue: ValidateEmailErrorStateMatcher - }, - ] + imports: [ + CommonModule, + SharedModule, + RouterModule, + AccessControlRoutingModule, + FormModule, + NgbAccordionModule, + SearchModule, + AccessControlFormModule, + EPeopleRegistryComponent, + EPersonFormComponent, + GroupsRegistryComponent, + GroupFormComponent, + SubgroupsListComponent, + MembersListComponent, + BulkAccessComponent, + BulkAccessBrowseComponent, + BulkAccessSettingsComponent + ], + exports: [ + MembersListComponent, + ], + providers: [ + { + provide: DYNAMIC_ERROR_MESSAGES_MATCHER, + useValue: ValidateEmailErrorStateMatcher + }, + ] }) /** * This module handles all components related to the access control pages diff --git a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts index 87b2a8d568..a42c98cb61 100644 --- a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts +++ b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.spec.ts @@ -28,17 +28,17 @@ describe('BulkAccessBrowseComponent', () => { const selectableListService = jasmine.createSpyObj('SelectableListService', ['getSelectableList', 'deselectAll']); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NgbAccordionModule, NgbNavModule, - TranslateModule.forRoot() - ], - declarations: [BulkAccessBrowseComponent], - providers: [ { provide: SelectableListService, useValue: selectableListService }, ], - schemas: [ + TranslateModule.forRoot(), + BulkAccessBrowseComponent + ], + providers: [{ provide: SelectableListService, useValue: selectableListService },], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts index e806e729c8..8b8e3626cf 100644 --- a/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts +++ b/src/app/access-control/bulk-access/browse/bulk-access-browse.component.ts @@ -14,6 +14,19 @@ import { createSuccessfulRemoteDataObject } from '../../../shared/remote-data.ut import { PageInfo } from '../../../core/shared/page-info.model'; import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model'; import { hasValue } from '../../../shared/empty.util'; +import { PaginationComponent } from '../../../shared/pagination/pagination.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { NgbAccordionModule, NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedSearchComponent } from '../../../shared/search/themed-search.component'; +import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe'; +import { NgxPaginationModule } from 'ngx-pagination'; +import { + SelectableListItemControlComponent +} from '../../../shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component'; +import { + ListableObjectComponentLoaderComponent +} from '../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; @Component({ selector: 'ds-bulk-access-browse', @@ -24,7 +37,22 @@ import { hasValue } from '../../../shared/empty.util'; provide: SEARCH_CONFIG_SERVICE, useClass: SearchConfigurationService } - ] + ], + imports: [ + PaginationComponent, + AsyncPipe, + NgbAccordionModule, + TranslateModule, + NgIf, + NgbNavModule, + ThemedSearchComponent, + BrowserOnlyPipe, + NgForOf, + NgxPaginationModule, + SelectableListItemControlComponent, + ListableObjectComponentLoaderComponent + ], + standalone: true }) export class BulkAccessBrowseComponent implements OnInit, OnDestroy { diff --git a/src/app/access-control/bulk-access/bulk-access.component.spec.ts b/src/app/access-control/bulk-access/bulk-access.component.spec.ts index e9b253147d..562c7427ec 100644 --- a/src/app/access-control/bulk-access/bulk-access.component.spec.ts +++ b/src/app/access-control/bulk-access/bulk-access.component.spec.ts @@ -69,18 +69,18 @@ describe('BulkAccessComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ RouterTestingModule, - TranslateModule.forRoot() - ], - declarations: [ BulkAccessComponent ], - providers: [ + TranslateModule.forRoot(), + BulkAccessComponent + ], + providers: [ { provide: BulkAccessControlService, useValue: bulkAccessControlServiceMock }, { provide: NotificationsService, useValue: NotificationsServiceStub }, { provide: SelectableListService, useValue: selectableListServiceMock } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); }); diff --git a/src/app/access-control/bulk-access/bulk-access.component.ts b/src/app/access-control/bulk-access/bulk-access.component.ts index 04724614cb..85fde3b208 100644 --- a/src/app/access-control/bulk-access/bulk-access.component.ts +++ b/src/app/access-control/bulk-access/bulk-access.component.ts @@ -7,11 +7,19 @@ import { BulkAccessSettingsComponent } from './settings/bulk-access-settings.com import { BulkAccessControlService } from '../../shared/access-control-form-container/bulk-access-control.service'; import { SelectableListState } from '../../shared/object-list/selectable-list/selectable-list.reducer'; import { SelectableListService } from '../../shared/object-list/selectable-list/selectable-list.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { BulkAccessBrowseComponent } from './browse/bulk-access-browse.component'; @Component({ selector: 'ds-bulk-access', templateUrl: './bulk-access.component.html', - styleUrls: ['./bulk-access.component.scss'] + styleUrls: ['./bulk-access.component.scss'], + imports: [ + TranslateModule, + BulkAccessSettingsComponent, + BulkAccessBrowseComponent + ], + standalone: true }) export class BulkAccessComponent implements OnInit { diff --git a/src/app/access-control/bulk-access/settings/bulk-access-settings.component.spec.ts b/src/app/access-control/bulk-access/settings/bulk-access-settings.component.spec.ts index 14e0fdefb2..6917e861d6 100644 --- a/src/app/access-control/bulk-access/settings/bulk-access-settings.component.spec.ts +++ b/src/app/access-control/bulk-access/settings/bulk-access-settings.component.spec.ts @@ -41,10 +41,9 @@ describe('BulkAccessSettingsComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [NgbAccordionModule, TranslateModule.forRoot()], - declarations: [BulkAccessSettingsComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [NgbAccordionModule, TranslateModule.forRoot(), BulkAccessSettingsComponent], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/access-control/bulk-access/settings/bulk-access-settings.component.ts b/src/app/access-control/bulk-access/settings/bulk-access-settings.component.ts index eecc016245..a19adecb34 100644 --- a/src/app/access-control/bulk-access/settings/bulk-access-settings.component.ts +++ b/src/app/access-control/bulk-access/settings/bulk-access-settings.component.ts @@ -2,12 +2,22 @@ import { Component, ViewChild } from '@angular/core'; import { AccessControlFormContainerComponent } from '../../../shared/access-control-form-container/access-control-form-container.component'; +import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; @Component({ selector: 'ds-bulk-access-settings', templateUrl: 'bulk-access-settings.component.html', styleUrls: ['./bulk-access-settings.component.scss'], - exportAs: 'dsBulkSettings' + exportAs: 'dsBulkSettings', + imports: [ + NgbAccordionModule, + TranslateModule, + NgIf, + AccessControlFormContainerComponent + ], + standalone: true }) export class BulkAccessSettingsComponent { diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts b/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts index 4a09913862..db4d350286 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts +++ b/src/app/access-control/epeople-registry/epeople-registry.component.spec.ts @@ -123,16 +123,14 @@ describe('EPeopleRegistryComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, + imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), - ], - declarations: [EPeopleRegistryComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), EPeopleRegistryComponent], + providers: [ { provide: EPersonDataService, useValue: ePersonDataServiceStub }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: AuthorizationDataService, useValue: authorizationService }, @@ -140,9 +138,9 @@ describe('EPeopleRegistryComponent', () => { { provide: Router, useValue: new RouterStub() }, { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) }, { provide: PaginationService, useValue: paginationService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/access-control/epeople-registry/epeople-registry.component.ts b/src/app/access-control/epeople-registry/epeople-registry.component.ts index fb045ebb88..db7fc96963 100644 --- a/src/app/access-control/epeople-registry/epeople-registry.component.ts +++ b/src/app/access-control/epeople-registry/epeople-registry.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; +import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms'; import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest, Observable, Subscription } from 'rxjs'; import { map, switchMap, take } from 'rxjs/operators'; import { buildPaginatedList, PaginatedList } from '../../core/data/paginated-list.model'; @@ -22,10 +22,26 @@ import { PageInfo } from '../../core/shared/page-info.model'; import { NoContent } from '../../core/shared/NoContent.model'; import { PaginationService } from '../../core/pagination/pagination.service'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; +import { EPersonFormComponent } from './eperson-form/eperson-form.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { PaginationComponent } from '../../shared/pagination/pagination.component'; @Component({ selector: 'ds-epeople-registry', templateUrl: './epeople-registry.component.html', + imports: [ + TranslateModule, + AsyncPipe, + NgIf, + EPersonFormComponent, + ReactiveFormsModule, + ThemedLoadingComponent, + PaginationComponent, + NgClass, + NgForOf + ], + standalone: true }) /** * A component used for managing all existing epeople within the repository. diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts index fb911e709c..89643e2c19 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.spec.ts @@ -183,16 +183,14 @@ describe('EPersonFormComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, + imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), - ], - declarations: [EPersonFormComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), EPersonFormComponent], + providers: [ { provide: EPersonDataService, useValue: ePersonDataServiceStub }, { provide: GroupDataService, useValue: groupsDataService }, { provide: FormBuilderService, useValue: builderService }, @@ -200,12 +198,12 @@ describe('EPersonFormComponent', () => { { provide: AuthService, useValue: authService }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: PaginationService, useValue: paginationService }, - { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring'])}, + { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) }, { provide: EpersonRegistrationService, useValue: epersonRegistrationService }, EPeopleRegistryComponent - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); epersonRegistrationService = jasmine.createSpyObj('epersonRegistrationService', { diff --git a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts index d009d56058..23dd42257a 100644 --- a/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts +++ b/src/app/access-control/epeople-registry/eperson-form/eperson-form.component.ts @@ -6,7 +6,7 @@ import { DynamicFormLayout, DynamicInputModel } from '@ng-dynamic-forms/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs'; import { debounceTime, finalize, map, switchMap, take } from 'rxjs/operators'; import { PaginatedList } from '../../../core/data/paginated-list.model'; @@ -38,10 +38,26 @@ import { Registration } from '../../../core/shared/registration.model'; import { EpersonRegistrationService } from '../../../core/data/eperson-registration.service'; import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { FormComponent } from '../../../shared/form/form.component'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; +import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component'; +import { PaginationComponent } from '../../../shared/pagination/pagination.component'; +import { RouterLink } from '@angular/router'; @Component({ selector: 'ds-eperson-form', templateUrl: './eperson-form.component.html', + imports: [ + FormComponent, + NgIf, + AsyncPipe, + TranslateModule, + NgClass, + ThemedLoadingComponent, + PaginationComponent, + RouterLink + ], + standalone: true }) /** * A form used for creating and editing EPeople diff --git a/src/app/access-control/group-registry/group-form/group-form.component.spec.ts b/src/app/access-control/group-registry/group-form/group-form.component.spec.ts index f8c5f3cd87..3c90b20ab3 100644 --- a/src/app/access-control/group-registry/group-form/group-form.component.spec.ts +++ b/src/app/access-control/group-registry/group-form/group-form.component.spec.ts @@ -191,16 +191,14 @@ describe('GroupFormComponent', () => { router = new RouterMock(); notificationService = new NotificationsServiceStub(); return TestBed.configureTestingModule({ - imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, + imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), - ], - declarations: [GroupFormComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), GroupFormComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: EPersonDataService, useValue: ePersonDataServiceStub }, { provide: GroupDataService, useValue: groupsDataServiceStub }, @@ -215,14 +213,14 @@ describe('GroupFormComponent', () => { { provide: RemoteDataBuildService, useValue: {} }, { provide: HALEndpointService, useValue: {} }, { - provide: ActivatedRoute, - useValue: { data: observableOf({ dso: { payload: {} } }), params: observableOf({}) } + provide: ActivatedRoute, + useValue: { data: observableOf({ dso: { payload: {} } }), params: observableOf({}) } }, { provide: Router, useValue: router }, { provide: AuthorizationDataService, useValue: authorizationService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/access-control/group-registry/group-form/group-form.component.ts b/src/app/access-control/group-registry/group-form/group-form.component.ts index 693e283b4a..e75f474436 100644 --- a/src/app/access-control/group-registry/group-form/group-form.component.ts +++ b/src/app/access-control/group-registry/group-form/group-form.component.ts @@ -8,7 +8,7 @@ import { DynamicInputModel, DynamicTextAreaModel } from '@ng-dynamic-forms/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ObservedValueOf, combineLatest as observableCombineLatest, @@ -48,10 +48,27 @@ import { Operation } from 'fast-json-patch'; import { ValidateGroupExists } from './validators/group-exists.validator'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { environment } from '../../../../environments/environment'; +import { FormComponent } from '../../../shared/form/form.component'; +import { AlertComponent } from '../../../shared/alert/alert.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ContextHelpDirective } from '../../../shared/context-help.directive'; +import { MembersListComponent } from './members-list/members-list.component'; +import { SubgroupsListComponent } from './subgroup-list/subgroups-list.component'; @Component({ selector: 'ds-group-form', - templateUrl: './group-form.component.html' + templateUrl: './group-form.component.html', + imports: [ + FormComponent, + AlertComponent, + NgIf, + AsyncPipe, + TranslateModule, + ContextHelpDirective, + MembersListComponent, + SubgroupsListComponent + ], + standalone: true }) /** * A form used for creating and editing groups diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts index 7c8db399bc..06abf0c3f3 100644 --- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts +++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.spec.ts @@ -121,16 +121,14 @@ describe('MembersListComponent', () => { paginationService = new PaginationServiceStub(); return TestBed.configureTestingModule({ - imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, + imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), - ], - declarations: [MembersListComponent], - providers: [MembersListComponent, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), MembersListComponent], + providers: [MembersListComponent, { provide: EPersonDataService, useValue: ePersonDataServiceStub }, { provide: GroupDataService, useValue: groupsDataServiceStub }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -138,9 +136,9 @@ describe('MembersListComponent', () => { { provide: Router, useValue: new RouterMock() }, { provide: PaginationService, useValue: paginationService }, { provide: DSONameService, useValue: new DSONameServiceMock() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts index b3e686c012..d02e77bc3f 100644 --- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts +++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnDestroy, OnInit } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; -import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { Observable, of as observableOf, @@ -28,6 +28,9 @@ import { PaginationComponentOptions } from '../../../../shared/pagination/pagina import { EpersonDtoModel } from '../../../../core/eperson/models/eperson-dto.model'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { ContextHelpDirective } from '../../../../shared/context-help.directive'; +import { PaginationComponent } from '../../../../shared/pagination/pagination.component'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; /** * Keys to keep track of specific subscriptions @@ -69,7 +72,19 @@ export interface EPersonListActionConfig { @Component({ selector: 'ds-members-list', - templateUrl: './members-list.component.html' + templateUrl: './members-list.component.html', + imports: [ + TranslateModule, + ContextHelpDirective, + ReactiveFormsModule, + PaginationComponent, + NgIf, + AsyncPipe, + RouterLink, + NgClass, + NgForOf + ], + standalone: true }) /** * The list of members in the edit group page diff --git a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts index ac5750dcac..013aff4751 100644 --- a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts +++ b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.spec.ts @@ -100,25 +100,23 @@ describe('SubgroupsListComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, + imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), - ], - declarations: [SubgroupsListComponent], - providers: [SubgroupsListComponent, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), SubgroupsListComponent], + providers: [SubgroupsListComponent, { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: GroupDataService, useValue: groupsDataServiceStub }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: FormBuilderService, useValue: builderService }, { provide: Router, useValue: routerStub }, { provide: PaginationService, useValue: paginationService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts index 0cff730c62..f66fb1942a 100644 --- a/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts +++ b/src/app/access-control/group-registry/group-form/subgroup-list/subgroups-list.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnDestroy, OnInit } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; -import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable, of as observableOf, Subscription } from 'rxjs'; import { map, mergeMap, switchMap, take } from 'rxjs/operators'; import { PaginatedList } from '../../../../core/data/paginated-list.model'; @@ -19,6 +19,9 @@ import { NoContent } from '../../../../core/shared/NoContent.model'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { followLink } from '../../../../shared/utils/follow-link-config.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { AsyncPipe, NgForOf, NgIf } from "@angular/common"; +import { ContextHelpDirective } from "../../../../shared/context-help.directive"; +import { PaginationComponent } from "../../../../shared/pagination/pagination.component"; /** * Keys to keep track of specific subscriptions @@ -31,7 +34,18 @@ enum SubKey { @Component({ selector: 'ds-subgroups-list', - templateUrl: './subgroups-list.component.html' + templateUrl: './subgroups-list.component.html', + imports: [ + RouterLink, + AsyncPipe, + NgForOf, + ContextHelpDirective, + TranslateModule, + ReactiveFormsModule, + PaginationComponent, + NgIf + ], + standalone: true }) /** * The list of subgroups in the edit group page diff --git a/src/app/access-control/group-registry/groups-registry.component.spec.ts b/src/app/access-control/group-registry/groups-registry.component.spec.ts index 635ba727c2..df8208f247 100644 --- a/src/app/access-control/group-registry/groups-registry.component.spec.ts +++ b/src/app/access-control/group-registry/groups-registry.component.spec.ts @@ -163,16 +163,14 @@ describe('GroupsRegistryComponent', () => { setIsAuthorized(true, true); paginationService = new PaginationServiceStub(); return TestBed.configureTestingModule({ - imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, + imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), - ], - declarations: [GroupsRegistryComponent], - providers: [GroupsRegistryComponent, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), GroupsRegistryComponent], + providers: [GroupsRegistryComponent, { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: EPersonDataService, useValue: ePersonDataServiceStub }, { provide: GroupDataService, useValue: groupsDataServiceStub }, @@ -183,9 +181,9 @@ describe('GroupsRegistryComponent', () => { { provide: AuthorizationDataService, useValue: authorizationService }, { provide: PaginationService, useValue: paginationService }, { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeByHrefSubstring']) } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/access-control/group-registry/groups-registry.component.ts b/src/app/access-control/group-registry/groups-registry.component.ts index ccfd155e39..d06c69fa64 100644 --- a/src/app/access-control/group-registry/groups-registry.component.ts +++ b/src/app/access-control/group-registry/groups-registry.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; -import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { ReactiveFormsModule, UntypedFormBuilder } from '@angular/forms'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest as observableCombineLatest, @@ -38,10 +38,27 @@ import { NoContent } from '../../core/shared/NoContent.model'; import { PaginationService } from '../../core/pagination/pagination.service'; import { followLink } from '../../shared/utils/follow-link-config.model'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { AsyncPipe, NgIf, NgSwitch, NgSwitchCase } from '@angular/common'; +import { PaginationComponent } from '../../shared/pagination/pagination.component'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'ds-groups-registry', templateUrl: './groups-registry.component.html', + imports: [ + ThemedLoadingComponent, + TranslateModule, + RouterLink, + ReactiveFormsModule, + AsyncPipe, + NgIf, + PaginationComponent, + NgSwitch, + NgSwitchCase, + NgbTooltipModule + ], + standalone: true }) /** * A component used for managing all existing groups within the repository. diff --git a/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.spec.ts b/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.spec.ts index 358bd0d01e..bbbfa106ab 100644 --- a/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.spec.ts +++ b/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.spec.ts @@ -9,10 +9,9 @@ describe('AdminCurationTasksComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [AdminCurationTasksComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), AdminCurationTasksComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.ts b/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.ts index 9a80f341b9..aec23b7641 100644 --- a/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.ts +++ b/src/app/admin/admin-curation-tasks/admin-curation-tasks.component.ts @@ -1,4 +1,6 @@ import { Component } from '@angular/core'; +import { CurationFormComponent } from "../../curation-form/curation-form.component"; +import { TranslateModule } from "@ngx-translate/core"; /** * Component responsible for rendering the system wide Curation Task UI @@ -6,6 +8,11 @@ import { Component } from '@angular/core'; @Component({ selector: 'ds-admin-curation-task', templateUrl: './admin-curation-tasks.component.html', + imports: [ + CurationFormComponent, + TranslateModule + ], + standalone: true }) export class AdminCurationTasksComponent { diff --git a/src/app/admin/admin-import-batch-page/batch-import-page.component.spec.ts b/src/app/admin/admin-import-batch-page/batch-import-page.component.spec.ts index 341aefb704..8fbb02bbbe 100644 --- a/src/app/admin/admin-import-batch-page/batch-import-page.component.spec.ts +++ b/src/app/admin/admin-import-batch-page/batch-import-page.component.spec.ts @@ -45,20 +45,20 @@ describe('BatchImportPageComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [BatchImportPageComponent, FileValueAccessorDirective, FileValidator], - providers: [ + RouterTestingModule.withRoutes([]), + BatchImportPageComponent, FileValueAccessorDirective, FileValidator + ], + providers: [ { provide: NotificationsService, useValue: notificationService }, { provide: ScriptDataService, useValue: scriptService }, { provide: Router, useValue: router }, { provide: Location, useValue: locationStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/admin/admin-import-batch-page/batch-import-page.component.ts b/src/app/admin/admin-import-batch-page/batch-import-page.component.ts index 673e1f23f5..664fdb20e2 100644 --- a/src/app/admin/admin-import-batch-page/batch-import-page.component.ts +++ b/src/app/admin/admin-import-batch-page/batch-import-page.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { Location } from '@angular/common'; -import { TranslateService } from '@ngx-translate/core'; +import { Location, NgIf } from '@angular/common'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { BATCH_IMPORT_SCRIPT_NAME, ScriptDataService } from '../../core/data/processes/script-data.service'; import { Router } from '@angular/router'; @@ -17,10 +17,23 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { take } from 'rxjs/operators'; import { DSpaceObject } from '../../core/shared/dspace-object.model'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { FormsModule } from "@angular/forms"; +import { UiSwitchModule } from "ngx-ui-switch"; +import { + FileDropzoneNoUploaderComponent +} from "../../shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component"; @Component({ selector: 'ds-batch-import-page', - templateUrl: './batch-import-page.component.html' + templateUrl: './batch-import-page.component.html', + imports: [ + NgIf, + TranslateModule, + FormsModule, + UiSwitchModule, + FileDropzoneNoUploaderComponent + ], + standalone: true }) export class BatchImportPageComponent { /** diff --git a/src/app/admin/admin-import-metadata-page/metadata-import-page.component.spec.ts b/src/app/admin/admin-import-metadata-page/metadata-import-page.component.spec.ts index 814757ec71..f2b8b77795 100644 --- a/src/app/admin/admin-import-metadata-page/metadata-import-page.component.spec.ts +++ b/src/app/admin/admin-import-metadata-page/metadata-import-page.component.spec.ts @@ -42,20 +42,20 @@ describe('MetadataImportPageComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [MetadataImportPageComponent, FileValueAccessorDirective, FileValidator], - providers: [ + RouterTestingModule.withRoutes([]), + MetadataImportPageComponent, FileValueAccessorDirective, FileValidator + ], + providers: [ { provide: NotificationsService, useValue: notificationService }, { provide: ScriptDataService, useValue: scriptService }, { provide: Router, useValue: router }, { provide: Location, useValue: locationStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/admin/admin-import-metadata-page/metadata-import-page.component.ts b/src/app/admin/admin-import-metadata-page/metadata-import-page.component.ts index 4236d152dc..dd40326ac3 100644 --- a/src/app/admin/admin-import-metadata-page/metadata-import-page.component.ts +++ b/src/app/admin/admin-import-metadata-page/metadata-import-page.component.ts @@ -1,7 +1,7 @@ import { Location } from '@angular/common'; import { Component } from '@angular/core'; import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { METADATA_IMPORT_SCRIPT_NAME, ScriptDataService } from '../../core/data/processes/script-data.service'; import { ProcessParameter } from '../../process-page/processes/process-parameter.model'; import { isNotEmpty } from '../../shared/empty.util'; @@ -10,10 +10,20 @@ import { RemoteData } from '../../core/data/remote-data'; import { Process } from '../../process-page/processes/process.model'; import { getFirstCompletedRemoteData } from '../../core/shared/operators'; import { getProcessDetailRoute } from '../../process-page/process-page-routing.paths'; +import { FormsModule } from '@angular/forms'; +import { + FileDropzoneNoUploaderComponent +} from '../../shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component'; @Component({ selector: 'ds-metadata-import-page', - templateUrl: './metadata-import-page.component.html' + templateUrl: './metadata-import-page.component.html', + imports: [ + TranslateModule, + FormsModule, + FileDropzoneNoUploaderComponent + ], + standalone: true }) /** diff --git a/src/app/admin/admin-registries/admin-registries.module.ts b/src/app/admin/admin-registries/admin-registries.module.ts index 65f7b61419..b438838aa7 100644 --- a/src/app/admin/admin-registries/admin-registries.module.ts +++ b/src/app/admin/admin-registries/admin-registries.module.ts @@ -11,20 +11,18 @@ import { BitstreamFormatsModule } from './bitstream-formats/bitstream-formats.mo import { FormModule } from '../../shared/form/form.module'; @NgModule({ - imports: [ - CommonModule, - SharedModule, - RouterModule, - BitstreamFormatsModule, - AdminRegistriesRoutingModule, - FormModule - ], - declarations: [ - MetadataRegistryComponent, - MetadataSchemaComponent, - MetadataSchemaFormComponent, - MetadataFieldFormComponent - ] + imports: [ + CommonModule, + SharedModule, + RouterModule, + BitstreamFormatsModule, + AdminRegistriesRoutingModule, + FormModule, + MetadataRegistryComponent, + MetadataSchemaComponent, + MetadataSchemaFormComponent, + MetadataFieldFormComponent + ] }) export class AdminRegistriesModule { diff --git a/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.spec.ts b/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.spec.ts index 6787350d86..2771455dec 100644 --- a/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.spec.ts +++ b/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.spec.ts @@ -42,15 +42,14 @@ describe('AddBitstreamFormatComponent', () => { }); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [AddBitstreamFormatComponent], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, AddBitstreamFormatComponent], + providers: [ { provide: Router, useValue: router }, { provide: NotificationsService, useValue: notificationService }, { provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); }; const initBeforeEach = () => { @@ -82,15 +81,14 @@ describe('AddBitstreamFormatComponent', () => { }); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [AddBitstreamFormatComponent], - providers: [ - { provide: Router, useValue: router }, - { provide: NotificationsService, useValue: notificationService }, - { provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, AddBitstreamFormatComponent], + providers: [ + { provide: Router, useValue: router }, + { provide: NotificationsService, useValue: notificationService }, + { provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(initBeforeEach); it('should send the updated form to the service, show a notification and navigate to ', () => { diff --git a/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts b/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts index 132343dcf0..1563848650 100644 --- a/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/add-bitstream-format/add-bitstream-format.component.ts @@ -3,10 +3,11 @@ import { Component } from '@angular/core'; import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model'; import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service'; import { NotificationsService } from '../../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths'; import { RemoteData } from '../../../../core/data/remote-data'; import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; +import { FormatFormComponent } from '../format-form/format-form.component'; /** * This component renders the page to create a new bitstream format. @@ -14,6 +15,11 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; @Component({ selector: 'ds-add-bitstream-format', templateUrl: './add-bitstream-format.component.html', + imports: [ + FormatFormComponent, + TranslateModule + ], + standalone: true }) export class AddBitstreamFormatComponent { diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts index 8a44240b7e..3290a02902 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts @@ -102,15 +102,14 @@ describe('BitstreamFormatsComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe], + providers: [ { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: NotificationsService, useValue: notificationsServiceStub }, { provide: PaginationService, useValue: paginationService } - ] - }).compileComponents(); + ] +}).compileComponents(); }; const initBeforeEach = () => { @@ -230,15 +229,14 @@ describe('BitstreamFormatsComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe], - providers: [ - { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, - { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, - { provide: NotificationsService, useValue: notificationsServiceStub }, - { provide: PaginationService, useValue: paginationService } - ] - }).compileComponents(); + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe], + providers: [ + { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, + { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, + { provide: NotificationsService, useValue: notificationsServiceStub }, + { provide: PaginationService, useValue: paginationService } + ] +}).compileComponents(); } )); @@ -279,15 +277,14 @@ describe('BitstreamFormatsComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe], - providers: [ - { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, - { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, - { provide: NotificationsService, useValue: notificationsServiceStub }, - { provide: PaginationService, useValue: paginationService } - ] - }).compileComponents(); + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe], + providers: [ + { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, + { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, + { provide: NotificationsService, useValue: notificationsServiceStub }, + { provide: PaginationService, useValue: paginationService } + ] +}).compileComponents(); } )); diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts index 162bf2bdb2..1727834be4 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.component.ts @@ -7,19 +7,30 @@ import { BitstreamFormat } from '../../../core/shared/bitstream-format.model'; import { BitstreamFormatDataService } from '../../../core/data/bitstream-format-data.service'; import { map, mergeMap, switchMap, take, toArray } from 'rxjs/operators'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { NoContent } from '../../../core/shared/NoContent.model'; import { PaginationService } from '../../../core/pagination/pagination.service'; import { FindListOptions } from '../../../core/data/find-list-options.model'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; +import { AsyncPipe, NgForOf, NgIf } from "@angular/common"; +import { PaginationComponent } from "../../../shared/pagination/pagination.component"; /** * This component renders a list of bitstream formats */ @Component({ selector: 'ds-bitstream-formats', - templateUrl: './bitstream-formats.component.html' + templateUrl: './bitstream-formats.component.html', + imports: [ + NgIf, + AsyncPipe, + RouterLink, + TranslateModule, + PaginationComponent, + NgForOf + ], + standalone: true }) export class BitstreamFormatsComponent implements OnInit, OnDestroy { diff --git a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.module.ts b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.module.ts index afbe35a1f6..fe4d453578 100644 --- a/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.module.ts +++ b/src/app/admin/admin-registries/bitstream-formats/bitstream-formats.module.ts @@ -10,19 +10,17 @@ import { AddBitstreamFormatComponent } from './add-bitstream-format/add-bitstrea import { FormModule } from '../../../shared/form/form.module'; @NgModule({ - imports: [ - CommonModule, - SharedModule, - RouterModule, - BitstreamFormatsRoutingModule, - FormModule - ], - declarations: [ - BitstreamFormatsComponent, - EditBitstreamFormatComponent, - AddBitstreamFormatComponent, - FormatFormComponent - ] + imports: [ + CommonModule, + SharedModule, + RouterModule, + BitstreamFormatsRoutingModule, + FormModule, + BitstreamFormatsComponent, + EditBitstreamFormatComponent, + AddBitstreamFormatComponent, + FormatFormComponent + ] }) export class BitstreamFormatsModule { diff --git a/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.spec.ts b/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.spec.ts index b09c50c70a..bd60c6f19c 100644 --- a/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.spec.ts +++ b/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.spec.ts @@ -52,16 +52,15 @@ describe('EditBitstreamFormatComponent', () => { }); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [EditBitstreamFormatComponent], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, EditBitstreamFormatComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: router }, { provide: NotificationsService, useValue: notificationService }, { provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); }; const initBeforeEach = () => { @@ -103,16 +102,15 @@ describe('EditBitstreamFormatComponent', () => { }); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [EditBitstreamFormatComponent], - providers: [ - { provide: ActivatedRoute, useValue: routeStub }, - { provide: Router, useValue: router }, - { provide: NotificationsService, useValue: notificationService }, - { provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, EditBitstreamFormatComponent], + providers: [ + { provide: ActivatedRoute, useValue: routeStub }, + { provide: Router, useValue: router }, + { provide: NotificationsService, useValue: notificationService }, + { provide: BitstreamFormatDataService, useValue: bitstreamFormatDataService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(initBeforeEach); it('should send the updated form to the service, show a notification and navigate to ', () => { diff --git a/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts b/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts index 14b109fe26..cfd7550c7b 100644 --- a/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/edit-bitstream-format/edit-bitstream-format.component.ts @@ -6,9 +6,11 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { BitstreamFormat } from '../../../../core/shared/bitstream-format.model'; import { BitstreamFormatDataService } from '../../../../core/data/bitstream-format-data.service'; import { NotificationsService } from '../../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths'; import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; +import { FormatFormComponent } from '../format-form/format-form.component'; +import { AsyncPipe } from '@angular/common'; /** * This component renders the edit page of a bitstream format. @@ -17,6 +19,12 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; @Component({ selector: 'ds-edit-bitstream-format', templateUrl: './edit-bitstream-format.component.html', + imports: [ + FormatFormComponent, + TranslateModule, + AsyncPipe + ], + standalone: true }) export class EditBitstreamFormatComponent implements OnInit { diff --git a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts index ca3fbcbc99..cd5f338f81 100644 --- a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts +++ b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.spec.ts @@ -40,13 +40,12 @@ describe('FormatFormComponent', () => { const initAsync = () => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule], - declarations: [FormatFormComponent], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule, FormatFormComponent], + providers: [ { provide: Router, useValue: router }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); }; const initBeforeEach = () => { diff --git a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts index 142f6fb83d..168ab6ebcd 100644 --- a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts +++ b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts @@ -16,13 +16,20 @@ import { hasValue, isEmpty } from '../../../../shared/empty.util'; import { TranslateService } from '@ngx-translate/core'; import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths'; import { environment } from '../../../../../environments/environment'; +import { FormComponent } from '../../../../shared/form/form.component'; +import { NgIf } from '@angular/common'; /** * The component responsible for rendering the form to create/edit a bitstream format */ @Component({ selector: 'ds-bitstream-format-form', - templateUrl: './format-form.component.html' + templateUrl: './format-form.component.html', + imports: [ + FormComponent, + NgIf + ], + standalone: true }) export class FormatFormComponent implements OnInit { diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts b/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts index 944288a7a5..70356e0a91 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts @@ -69,16 +69,15 @@ describe('MetadataRegistryComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [MetadataRegistryComponent, PaginationComponent, EnumKeysPipe], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataRegistryComponent, PaginationComponent, EnumKeysPipe], + providers: [ { provide: RegistryService, useValue: registryServiceStub }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: PaginationService, useValue: paginationService }, { provide: NotificationsService, useValue: new NotificationsServiceStub() } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MetadataRegistryComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MetadataRegistryComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.ts b/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.ts index 857034604e..ae3c1f9ffa 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-registry.component.ts @@ -7,18 +7,32 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio import { filter, map, switchMap, take } from 'rxjs/operators'; import { hasValue } from '../../../shared/empty.util'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; import { toFindListOptions } from '../../../shared/pagination/pagination.utils'; import { NoContent } from '../../../core/shared/NoContent.model'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; import { PaginationService } from '../../../core/pagination/pagination.service'; +import { MetadataSchemaFormComponent } from './metadata-schema-form/metadata-schema-form.component'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; +import { PaginationComponent } from '../../../shared/pagination/pagination.component'; @Component({ selector: 'ds-metadata-registry', templateUrl: './metadata-registry.component.html', - styleUrls: ['./metadata-registry.component.scss'] + styleUrls: ['./metadata-registry.component.scss'], + imports: [ + MetadataSchemaFormComponent, + TranslateModule, + AsyncPipe, + PaginationComponent, + NgIf, + NgForOf, + NgClass, + RouterLink + ], + standalone: true }) /** * A component used for managing all existing metadata schemas within the repository. diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts index b758767ddb..3e999296d3 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts @@ -38,14 +38,13 @@ describe('MetadataSchemaFormComponent', () => { beforeEach(waitForAsync(() => { return TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [MetadataSchemaFormComponent, EnumKeysPipe], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataSchemaFormComponent, EnumKeysPipe], + providers: [ { provide: RegistryService, useValue: registryServiceStub }, { provide: FormBuilderService, useValue: formBuilderServiceStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts index 24bf430661..19b2cb5734 100644 --- a/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts +++ b/src/app/admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts @@ -9,13 +9,22 @@ import { UntypedFormGroup } from '@angular/forms'; import { RegistryService } from '../../../../core/registry/registry.service'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; import { switchMap, take, tap } from 'rxjs/operators'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { Observable, combineLatest } from 'rxjs'; import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { FormComponent } from '../../../../shared/form/form.component'; @Component({ selector: 'ds-metadata-schema-form', - templateUrl: './metadata-schema-form.component.html' + templateUrl: './metadata-schema-form.component.html', + imports: [ + NgIf, + AsyncPipe, + TranslateModule, + FormComponent + ], + standalone: true }) /** * A form used for creating and editing metadata schemas diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts b/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts index ad7b54945d..9607490cc0 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts +++ b/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts @@ -49,14 +49,13 @@ describe('MetadataFieldFormComponent', () => { beforeEach(waitForAsync(() => { return TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [MetadataFieldFormComponent, EnumKeysPipe], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataFieldFormComponent, EnumKeysPipe], + providers: [ { provide: RegistryService, useValue: registryServiceStub }, { provide: FormBuilderService, useValue: formBuilderServiceStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts b/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts index 773e0600fb..7be58ff02f 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts +++ b/src/app/admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts @@ -9,14 +9,23 @@ import { UntypedFormGroup } from '@angular/forms'; import { RegistryService } from '../../../../core/registry/registry.service'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; import { take } from 'rxjs/operators'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { combineLatest } from 'rxjs'; import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; import { MetadataField } from '../../../../core/metadata/metadata-field.model'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { FormComponent } from '../../../../shared/form/form.component'; @Component({ selector: 'ds-metadata-field-form', - templateUrl: './metadata-field-form.component.html' + templateUrl: './metadata-field-form.component.html', + imports: [ + NgIf, + FormComponent, + TranslateModule, + AsyncPipe + ], + standalone: true }) /** * A form used for creating and editing metadata fields diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts index 2b660a6363..8fde011dda 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts +++ b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts @@ -131,18 +131,17 @@ describe('MetadataSchemaComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [MetadataSchemaComponent, PaginationComponent, EnumKeysPipe, VarDirective], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MetadataSchemaComponent, PaginationComponent, EnumKeysPipe, VarDirective], + providers: [ { provide: RegistryService, useValue: registryServiceStub }, { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: Router, useValue: new RouterStub() }, { provide: PaginationService, useValue: paginationService }, { provide: NotificationsService, useValue: new NotificationsServiceStub() } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.ts b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.ts index d0827e6e4d..6816b5c16d 100644 --- a/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.ts +++ b/src/app/admin/admin-registries/metadata-schema/metadata-schema.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { RegistryService } from '../../../core/registry/registry.service'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { BehaviorSubject, combineLatest as observableCombineLatest, @@ -15,18 +15,34 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio import { map, switchMap, take } from 'rxjs/operators'; import { hasValue } from '../../../shared/empty.util'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { MetadataField } from '../../../core/metadata/metadata-field.model'; import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators'; import { toFindListOptions } from '../../../shared/pagination/pagination.utils'; import { NoContent } from '../../../core/shared/NoContent.model'; import { PaginationService } from '../../../core/pagination/pagination.service'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; +import { VarDirective } from '../../../shared/utils/var.directive'; +import { MetadataFieldFormComponent } from './metadata-field-form/metadata-field-form.component'; +import { PaginationComponent } from '../../../shared/pagination/pagination.component'; @Component({ selector: 'ds-metadata-schema', templateUrl: './metadata-schema.component.html', - styleUrls: ['./metadata-schema.component.scss'] + styleUrls: ['./metadata-schema.component.scss'], + imports: [ + AsyncPipe, + VarDirective, + MetadataFieldFormComponent, + TranslateModule, + PaginationComponent, + NgIf, + NgForOf, + NgClass, + RouterLink + ], + standalone: true }) /** * A component used for managing all existing metadata fields within the current metadata schema. diff --git a/src/app/admin/admin-search-page/admin-search-page.component.spec.ts b/src/app/admin/admin-search-page/admin-search-page.component.spec.ts index 7be486d7da..9ca5c874b4 100644 --- a/src/app/admin/admin-search-page/admin-search-page.component.spec.ts +++ b/src/app/admin/admin-search-page/admin-search-page.component.spec.ts @@ -9,9 +9,9 @@ describe('AdminSearchPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [AdminSearchPageComponent], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [AdminSearchPageComponent], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-page.component.ts b/src/app/admin/admin-search-page/admin-search-page.component.ts index c9c6b84245..f2a4f9c427 100644 --- a/src/app/admin/admin-search-page/admin-search-page.component.ts +++ b/src/app/admin/admin-search-page/admin-search-page.component.ts @@ -1,10 +1,13 @@ import { Component } from '@angular/core'; import { Context } from '../../core/shared/context.model'; +import { ConfigurationSearchPageComponent } from '../../search-page/configuration-search-page.component'; @Component({ - selector: 'ds-admin-search-page', - templateUrl: './admin-search-page.component.html', - styleUrls: ['./admin-search-page.component.scss'] + selector: 'ds-admin-search-page', + templateUrl: './admin-search-page.component.html', + styleUrls: ['./admin-search-page.component.scss'], + standalone: true, + imports: [ConfigurationSearchPageComponent] }) /** diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts index 1ea27b36b6..2ea87c3e06 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.spec.ts @@ -43,14 +43,14 @@ describe('CollectionAdminSearchResultGridElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), - SharedModule - ], - declarations: [CollectionAdminSearchResultGridElementComponent], - providers: [ + SharedModule, + CollectionAdminSearchResultGridElementComponent + ], + providers: [ { provide: TruncatableService, useValue: mockTruncatableService }, { provide: BitstreamDataService, useValue: {} }, { provide: LinkService, useValue: linkService }, @@ -58,8 +58,8 @@ describe('CollectionAdminSearchResultGridElementComponent', () => { { provide: FileService, useClass: FileServiceStub }, { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, { provide: ThemeService, useValue: getMockThemeService() }, - ] - }) + ] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts index 1412090e0f..dae11f55d0 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/collection-search-result/collection-admin-search-result-grid-element.component.ts @@ -6,12 +6,16 @@ import { CollectionSearchResult } from '../../../../../shared/object-collection/ import { Collection } from '../../../../../core/shared/collection.model'; import { SearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/search-result-grid-element.component'; import { getCollectionEditRoute } from '../../../../../collection-page/collection-page-routing-paths'; +import { RouterLink } from '@angular/router'; +import { CollectionSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component'; @listableObjectComponent(CollectionSearchResult, ViewMode.GridElement, Context.AdminSearch) @Component({ - selector: 'ds-collection-admin-search-result-list-element', - styleUrls: ['./collection-admin-search-result-grid-element.component.scss'], - templateUrl: './collection-admin-search-result-grid-element.component.html' + selector: 'ds-collection-admin-search-result-list-element', + styleUrls: ['./collection-admin-search-result-grid-element.component.scss'], + templateUrl: './collection-admin-search-result-grid-element.component.html', + standalone: true, + imports: [CollectionSearchResultGridElementComponent, RouterLink] }) /** * The component for displaying a list element for a collection search result on the admin search page diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts index 996366e20a..33de48884c 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.spec.ts @@ -45,14 +45,14 @@ describe('CommunityAdminSearchResultGridElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), - SharedModule - ], - declarations: [CommunityAdminSearchResultGridElementComponent], - providers: [ + SharedModule, + CommunityAdminSearchResultGridElementComponent + ], + providers: [ { provide: TruncatableService, useValue: mockTruncatableService }, { provide: BitstreamDataService, useValue: {} }, { provide: LinkService, useValue: linkService }, @@ -60,9 +60,9 @@ describe('CommunityAdminSearchResultGridElementComponent', () => { { provide: FileService, useClass: FileServiceStub }, { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, { provide: ThemeService, useValue: getMockThemeService() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts index b0d603338b..db1eb41414 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/community-search-result/community-admin-search-result-grid-element.component.ts @@ -6,12 +6,16 @@ import { CommunitySearchResult } from '../../../../../shared/object-collection/s import { Community } from '../../../../../core/shared/community.model'; import { SearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/search-result-grid-element.component'; import { getCommunityEditRoute } from '../../../../../community-page/community-page-routing-paths'; +import { RouterLink } from '@angular/router'; +import { CommunitySearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component'; @listableObjectComponent(CommunitySearchResult, ViewMode.GridElement, Context.AdminSearch) @Component({ - selector: 'ds-community-admin-search-result-grid-element', - styleUrls: ['./community-admin-search-result-grid-element.component.scss'], - templateUrl: './community-admin-search-result-grid-element.component.html' + selector: 'ds-community-admin-search-result-grid-element', + styleUrls: ['./community-admin-search-result-grid-element.component.scss'], + templateUrl: './community-admin-search-result-grid-element.component.html', + standalone: true, + imports: [CommunitySearchResultGridElementComponent, RouterLink] }) /** * The component for displaying a list element for a community search result on the admin search page diff --git a/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 b/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 index ee3de42131..6ef5832119 100644 --- a/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 +++ b/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 @@ -58,24 +58,24 @@ describe('ItemAdminSearchResultGridElementComponent', () => { init(); TestBed.configureTestingModule( { - declarations: [ItemAdminSearchResultGridElementComponent], - imports: [ - NoopAnimationsModule, - TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]), - SharedModule - ], - providers: [ - { provide: TruncatableService, useValue: mockTruncatableService }, - { provide: BitstreamDataService, useValue: mockBitstreamDataService }, - { provide: ThemeService, useValue: mockThemeService }, - { provide: AccessStatusDataService, useValue: mockAccessStatusDataService }, - { provide: AuthService, useClass: AuthServiceStub }, - { provide: FileService, useClass: FileServiceStub }, - { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [ + NoopAnimationsModule, + TranslateModule.forRoot(), + RouterTestingModule.withRoutes([]), + SharedModule, + ItemAdminSearchResultGridElementComponent + ], + providers: [ + { provide: TruncatableService, useValue: mockTruncatableService }, + { provide: BitstreamDataService, useValue: mockBitstreamDataService }, + { provide: ThemeService, useValue: mockThemeService }, + { provide: AccessStatusDataService, useValue: mockAccessStatusDataService }, + { provide: AuthService, useClass: AuthServiceStub }, + { provide: FileService, useClass: FileServiceStub }, + { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts index dab6694f36..ab857023d0 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-grid-element/item-search-result/item-admin-search-result-grid-element.component.ts @@ -14,12 +14,15 @@ import { GenericConstructor } from '../../../../../core/shared/generic-construct import { ListableObjectDirective } from '../../../../../shared/object-collection/shared/listable-object/listable-object.directive'; import { ThemeService } from '../../../../../shared/theme-support/theme.service'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; +import { ItemAdminSearchResultActionsComponent } from '../../item-admin-search-result-actions.component'; @listableObjectComponent(ItemSearchResult, ViewMode.GridElement, Context.AdminSearch) @Component({ - selector: 'ds-item-admin-search-result-grid-element', - styleUrls: ['./item-admin-search-result-grid-element.component.scss'], - templateUrl: './item-admin-search-result-grid-element.component.html' + selector: 'ds-item-admin-search-result-grid-element', + styleUrls: ['./item-admin-search-result-grid-element.component.scss'], + templateUrl: './item-admin-search-result-grid-element.component.html', + standalone: true, + imports: [ListableObjectDirective, ItemAdminSearchResultActionsComponent] }) /** * The component for displaying a list element for an item search result on the admin search page diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts index 8937847ff5..d33237bb7f 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.spec.ts @@ -32,16 +32,16 @@ describe('CollectionAdminSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [CollectionAdminSearchResultListElementComponent], - providers: [{ provide: TruncatableService, useValue: {} }, + RouterTestingModule.withRoutes([]), + CollectionAdminSearchResultListElementComponent + ], + providers: [{ provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment }], - schemas: [NO_ERRORS_SCHEMA] - }) + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts index 8bcf20b230..f04b2d346d 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/collection-search-result/collection-admin-search-result-list-element.component.ts @@ -6,12 +6,17 @@ import { SearchResultListElementComponent } from '../../../../../shared/object-l import { CollectionSearchResult } from '../../../../../shared/object-collection/shared/collection-search-result.model'; import { Collection } from '../../../../../core/shared/collection.model'; import { getCollectionEditRoute } from '../../../../../collection-page/collection-page-routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { CollectionSearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component'; @listableObjectComponent(CollectionSearchResult, ViewMode.ListElement, Context.AdminSearch) @Component({ - selector: 'ds-collection-admin-search-result-list-element', - styleUrls: ['./collection-admin-search-result-list-element.component.scss'], - templateUrl: './collection-admin-search-result-list-element.component.html' + selector: 'ds-collection-admin-search-result-list-element', + styleUrls: ['./collection-admin-search-result-list-element.component.scss'], + templateUrl: './collection-admin-search-result-list-element.component.html', + standalone: true, + imports: [CollectionSearchResultListElementComponent, RouterLink, TranslateModule] }) /** * The component for displaying a list element for a collection search result on the admin search page diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts index 110d77b1e5..eb4810e037 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.spec.ts @@ -32,16 +32,16 @@ describe('CommunityAdminSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [CommunityAdminSearchResultListElementComponent], - providers: [{ provide: TruncatableService, useValue: {} }, + RouterTestingModule.withRoutes([]), + CommunityAdminSearchResultListElementComponent + ], + providers: [{ provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment }], - schemas: [NO_ERRORS_SCHEMA] - }) + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts index 9419ae3f3f..9812b91a44 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/community-search-result/community-admin-search-result-list-element.component.ts @@ -6,12 +6,17 @@ import { SearchResultListElementComponent } from '../../../../../shared/object-l import { CommunitySearchResult } from '../../../../../shared/object-collection/shared/community-search-result.model'; import { Community } from '../../../../../core/shared/community.model'; import { getCommunityEditRoute } from '../../../../../community-page/community-page-routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { CommunitySearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component'; @listableObjectComponent(CommunitySearchResult, ViewMode.ListElement, Context.AdminSearch) @Component({ - selector: 'ds-community-admin-search-result-list-element', - styleUrls: ['./community-admin-search-result-list-element.component.scss'], - templateUrl: './community-admin-search-result-list-element.component.html' + selector: 'ds-community-admin-search-result-list-element', + styleUrls: ['./community-admin-search-result-list-element.component.scss'], + templateUrl: './community-admin-search-result-list-element.component.html', + standalone: true, + imports: [CommunitySearchResultListElementComponent, RouterLink, TranslateModule] }) /** * The component for displaying a list element for a community search result on the admin search page diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.spec.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.spec.ts index 667e8edea9..ff470dea15 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.spec.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.spec.ts @@ -29,16 +29,16 @@ describe('ItemAdminSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [ItemAdminSearchResultListElementComponent], - providers: [{ provide: TruncatableService, useValue: {} }, + RouterTestingModule.withRoutes([]), + ItemAdminSearchResultListElementComponent + ], + providers: [{ provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment }], - schemas: [NO_ERRORS_SCHEMA] - }) + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.ts b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.ts index b1dea11341..3c3fd18258 100644 --- a/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.ts +++ b/src/app/admin/admin-search-page/admin-search-results/admin-search-result-list-element/item-search-result/item-admin-search-result-list-element.component.ts @@ -5,12 +5,16 @@ import { listableObjectComponent } from '../../../../../shared/object-collection import { Context } from '../../../../../core/shared/context.model'; import { ItemSearchResult } from '../../../../../shared/object-collection/shared/item-search-result.model'; import { SearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/search-result-list-element.component'; +import { ItemAdminSearchResultActionsComponent } from '../../item-admin-search-result-actions.component'; +import { ListableObjectComponentLoaderComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; @listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.AdminSearch) @Component({ - selector: 'ds-item-admin-search-result-list-element', - styleUrls: ['./item-admin-search-result-list-element.component.scss'], - templateUrl: './item-admin-search-result-list-element.component.html' + selector: 'ds-item-admin-search-result-list-element', + styleUrls: ['./item-admin-search-result-list-element.component.scss'], + templateUrl: './item-admin-search-result-list-element.component.html', + standalone: true, + imports: [ListableObjectComponentLoaderComponent, ItemAdminSearchResultActionsComponent] }) /** * The component for displaying a list element for an item search result on the admin search page diff --git a/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts b/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts index f354ac5f89..3a78620ea4 100644 --- a/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts +++ b/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.spec.ts @@ -32,13 +32,13 @@ describe('ItemAdminSearchResultActionsComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [ItemAdminSearchResultActionsComponent], - schemas: [NO_ERRORS_SCHEMA] - }) + RouterTestingModule.withRoutes([]), + ItemAdminSearchResultActionsComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts b/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts index fcc3cf0f17..4651f02260 100644 --- a/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts +++ b/src/app/admin/admin-search-page/admin-search-results/item-admin-search-result-actions.component.ts @@ -10,11 +10,16 @@ import { ITEM_EDIT_REINSTATE_PATH, ITEM_EDIT_WITHDRAW_PATH } from '../../../item-page/edit-item-page/edit-item-page.routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { NgClass, NgIf } from '@angular/common'; @Component({ - selector: 'ds-item-admin-search-result-actions-element', - styleUrls: ['./item-admin-search-result-actions.component.scss'], - templateUrl: './item-admin-search-result-actions.component.html' + selector: 'ds-item-admin-search-result-actions-element', + styleUrls: ['./item-admin-search-result-actions.component.scss'], + templateUrl: './item-admin-search-result-actions.component.html', + standalone: true, + imports: [NgClass, RouterLink, NgIf, TranslateModule] }) /** * The component for displaying the actions for a list element for an item search result on the admin search page diff --git a/src/app/admin/admin-search-page/admin-search.module.ts b/src/app/admin/admin-search-page/admin-search.module.ts index 353d6dd498..e88fc8b5b5 100644 --- a/src/app/admin/admin-search-page/admin-search.module.ts +++ b/src/app/admin/admin-search-page/admin-search.module.ts @@ -24,16 +24,14 @@ const ENTRY_COMPONENTS = [ ]; @NgModule({ - imports: [ - SearchModule, - SharedModule.withEntryComponents(), - JournalEntitiesModule.withEntryComponents(), - ResearchEntitiesModule.withEntryComponents() - ], - declarations: [ - AdminSearchPageComponent, - ...ENTRY_COMPONENTS - ] + imports: [ + SearchModule, + SharedModule.withEntryComponents(), + JournalEntitiesModule.withEntryComponents(), + ResearchEntitiesModule.withEntryComponents(), + AdminSearchPageComponent, + ...ENTRY_COMPONENTS + ] }) export class AdminSearchModule { /** diff --git a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts index 260a364d7a..efea15bfaf 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.spec.ts @@ -21,14 +21,13 @@ describe('AdminSidebarSectionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()], - declarations: [AdminSidebarSectionComponent, TestComponent], - providers: [ - {provide: 'sectionDataProvider', useValue: {model: {link: 'google.com'}, icon: iconString}}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, - ] - }).overrideComponent(AdminSidebarSectionComponent, { + imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot(), AdminSidebarSectionComponent, TestComponent], + providers: [ + { provide: 'sectionDataProvider', useValue: { model: { link: 'google.com' }, icon: iconString } }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, + ] +}).overrideComponent(AdminSidebarSectionComponent, { set: { entryComponents: [TestComponent] } @@ -61,14 +60,13 @@ describe('AdminSidebarSectionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot()], - declarations: [AdminSidebarSectionComponent, TestComponent], - providers: [ - {provide: 'sectionDataProvider', useValue: {model: {link: 'google.com', disabled: true}, icon: iconString}}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, - ] - }).overrideComponent(AdminSidebarSectionComponent, { + imports: [NoopAnimationsModule, RouterTestingModule, TranslateModule.forRoot(), AdminSidebarSectionComponent, TestComponent], + providers: [ + { provide: 'sectionDataProvider', useValue: { model: { link: 'google.com', disabled: true }, icon: iconString } }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, + ] +}).overrideComponent(AdminSidebarSectionComponent, { set: { entryComponents: [TestComponent] } @@ -101,8 +99,10 @@ describe('AdminSidebarSectionComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [RouterTestingModule] }) class TestComponent { } diff --git a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts index d6cd803622..e56836d11b 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component.ts @@ -6,17 +6,20 @@ import { LinkMenuItemModel } from '../../../shared/menu/menu-item/models/link.mo import { MenuSection } from '../../../shared/menu/menu-section.model'; import { MenuID } from '../../../shared/menu/menu-id.model'; import { isEmpty } from '../../../shared/empty.util'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass } from '@angular/common'; /** * Represents a non-expandable section in the admin sidebar */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-admin-sidebar-section]', - templateUrl: './admin-sidebar-section.component.html', - styleUrls: ['./admin-sidebar-section.component.scss'], - + /* eslint-disable @angular-eslint/component-selector */ + selector: 'li[ds-admin-sidebar-section]', + templateUrl: './admin-sidebar-section.component.html', + styleUrls: ['./admin-sidebar-section.component.scss'], + standalone: true, + imports: [NgClass, RouterLink, TranslateModule] }) @rendersSectionForMenu(MenuID.ADMIN, false) export class AdminSidebarSectionComponent extends MenuSectionComponent implements OnInit { diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts b/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts index 88efd2a711..36fb094880 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.spec.ts @@ -57,9 +57,8 @@ describe('AdminSidebarComponent', () => { }); scriptService = jasmine.createSpyObj('scriptService', { scriptWithNameExistsAndCanExecute: observableOf(true) }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule], - declarations: [AdminSidebarComponent], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent], + providers: [ Injector, { provide: ThemeService, useValue: getMockThemeService() }, { provide: MenuService, useValue: menuService }, @@ -70,14 +69,14 @@ describe('AdminSidebarComponent', () => { { provide: ScriptDataService, useValue: scriptService }, { provide: ActivatedRoute, useValue: routeStub }, { - provide: NgbModal, useValue: { - open: () => {/*comment*/ + provide: NgbModal, useValue: { + open: () => { + } } - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(AdminSidebarComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(AdminSidebarComponent, { set: { changeDetection: ChangeDetectionStrategy.Default, } diff --git a/src/app/admin/admin-sidebar/admin-sidebar.component.ts b/src/app/admin/admin-sidebar/admin-sidebar.component.ts index 26ded965d4..2c0caf619f 100644 --- a/src/app/admin/admin-sidebar/admin-sidebar.component.ts +++ b/src/app/admin/admin-sidebar/admin-sidebar.component.ts @@ -10,15 +10,20 @@ import { AuthorizationDataService } from '../../core/data/feature-authorization/ import { MenuID } from '../../shared/menu/menu-id.model'; import { ActivatedRoute } from '@angular/router'; import { ThemeService } from '../../shared/theme-support/theme.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgClass, NgFor, NgComponentOutlet, AsyncPipe } from '@angular/common'; /** * Component representing the admin sidebar */ @Component({ - selector: 'ds-admin-sidebar', - templateUrl: './admin-sidebar.component.html', - styleUrls: ['./admin-sidebar.component.scss'], - animations: [slideSidebar] + selector: 'ds-admin-sidebar', + templateUrl: './admin-sidebar.component.html', + styleUrls: ['./admin-sidebar.component.scss'], + animations: [slideSidebar], + standalone: true, + imports: [NgIf, NgbDropdownModule, NgClass, NgFor, NgComponentOutlet, AsyncPipe, TranslateModule] }) export class AdminSidebarComponent extends MenuComponent implements OnInit { /** diff --git a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.spec.ts b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.spec.ts index dd31f757c2..c995357cc7 100644 --- a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.spec.ts +++ b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.spec.ts @@ -20,15 +20,14 @@ describe('ExpandableAdminSidebarSectionComponent', () => { const iconString = 'test'; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule, TranslateModule.forRoot()], - declarations: [ExpandableAdminSidebarSectionComponent, TestComponent], - providers: [ + imports: [NoopAnimationsModule, TranslateModule.forRoot(), ExpandableAdminSidebarSectionComponent, TestComponent], + providers: [ { provide: 'sectionDataProvider', useValue: { icon: iconString, model: {} } }, { provide: MenuService, useValue: menuService }, { provide: CSSVariableService, useClass: CSSVariableServiceStub }, { provide: Router, useValue: new RouterStub() }, - ] - }).overrideComponent(ExpandableAdminSidebarSectionComponent, { + ] +}).overrideComponent(ExpandableAdminSidebarSectionComponent, { set: { entryComponents: [TestComponent] } @@ -71,8 +70,9 @@ describe('ExpandableAdminSidebarSectionComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { } diff --git a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts index 4555c0fa93..94679086b2 100644 --- a/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts +++ b/src/app/admin/admin-sidebar/expandable-admin-sidebar-section/expandable-admin-sidebar-section.component.ts @@ -10,16 +10,20 @@ import { map } from 'rxjs/operators'; import { rendersSectionForMenu } from '../../../shared/menu/menu-section.decorator'; import { MenuID } from '../../../shared/menu/menu-id.model'; import { Router } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgComponentOutlet, NgIf, NgFor, AsyncPipe } from '@angular/common'; /** * Represents a expandable section in the sidebar */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-expandable-admin-sidebar-section]', - templateUrl: './expandable-admin-sidebar-section.component.html', - styleUrls: ['./expandable-admin-sidebar-section.component.scss'], - animations: [rotate, slide, bgColor] + /* eslint-disable @angular-eslint/component-selector */ + selector: 'li[ds-expandable-admin-sidebar-section]', + templateUrl: './expandable-admin-sidebar-section.component.html', + styleUrls: ['./expandable-admin-sidebar-section.component.scss'], + animations: [rotate, slide, bgColor], + standalone: true, + imports: [NgClass, NgComponentOutlet, NgIf, NgFor, AsyncPipe, TranslateModule] }) @rendersSectionForMenu(MenuID.ADMIN, true) diff --git a/src/app/admin/admin-sidebar/themed-admin-sidebar.component.ts b/src/app/admin/admin-sidebar/themed-admin-sidebar.component.ts index f2f35725e8..917c2302a5 100644 --- a/src/app/admin/admin-sidebar/themed-admin-sidebar.component.ts +++ b/src/app/admin/admin-sidebar/themed-admin-sidebar.component.ts @@ -6,9 +6,10 @@ import { AdminSidebarComponent } from './admin-sidebar.component'; * Themed wrapper for AdminSidebarComponent */ @Component({ - selector: 'ds-themed-admin-sidebar', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-admin-sidebar', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedAdminSidebarComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/admin/admin-workflow-page/admin-workflow-page.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-page.component.spec.ts index c80bc677f2..95d84ab806 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-page.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-page.component.spec.ts @@ -9,9 +9,9 @@ describe('AdminSearchPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [AdminWorkflowPageComponent], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [AdminWorkflowPageComponent], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts index c3ccc9555a..085b5c2976 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-page.component.ts @@ -1,10 +1,13 @@ import { Component } from '@angular/core'; import { Context } from '../../core/shared/context.model'; +import { ConfigurationSearchPageComponent } from '../../search-page/configuration-search-page.component'; @Component({ - selector: 'ds-admin-workflow-page', - templateUrl: './admin-workflow-page.component.html', - styleUrls: ['./admin-workflow-page.component.scss'] + selector: 'ds-admin-workflow-page', + templateUrl: './admin-workflow-page.component.html', + styleUrls: ['./admin-workflow-page.component.scss'], + standalone: true, + imports: [ConfigurationSearchPageComponent] }) /** diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.spec.ts index 04377fcc81..92c2f4b106 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.spec.ts @@ -35,13 +35,13 @@ describe('WorkflowItemAdminWorkflowActionsComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [WorkflowItemAdminWorkflowActionsComponent], - schemas: [NO_ERRORS_SCHEMA] - }) + RouterTestingModule.withRoutes([]), + WorkflowItemAdminWorkflowActionsComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.ts index 480c48f25e..b875312918 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workflow-item/workflow-item-admin-workflow-actions.component.ts @@ -5,11 +5,16 @@ import { getWorkflowItemDeleteRoute, getWorkflowItemSendBackRoute } from '../../../../../workflowitems-edit-page/workflowitems-edit-page-routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { NgClass, NgIf } from '@angular/common'; @Component({ - selector: 'ds-workflow-item-admin-workflow-actions-element', - styleUrls: ['./workflow-item-admin-workflow-actions.component.scss'], - templateUrl: './workflow-item-admin-workflow-actions.component.html' + selector: 'ds-workflow-item-admin-workflow-actions-element', + styleUrls: ['./workflow-item-admin-workflow-actions.component.scss'], + templateUrl: './workflow-item-admin-workflow-actions.component.html', + standalone: true, + imports: [NgClass, RouterLink, NgIf, TranslateModule] }) /** * The component for displaying the actions for a list element for a workflow-item on the admin workflow search page diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.spec.ts index 6e917ed088..7acd388537 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.spec.ts @@ -31,15 +31,14 @@ describe('SupervisionOrderGroupSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [SupervisionOrderGroupSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), SupervisionOrderGroupSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { provide: SupervisionOrderDataService, useValue: supervisionOrderDataService }, { provide: NotificationsService, useValue: {} }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.ts index 2eec0cfd0c..fee610ff53 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-group-selector/supervision-order-group-selector.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Output } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { getFirstCompletedRemoteData } from 'src/app/core/shared/operators'; import { NotificationsService } from 'src/app/shared/notifications/notifications.service'; import { DSONameService } from '../../../../../../core/breadcrumbs/dso-name.service'; @@ -8,6 +8,10 @@ import { Group } from '../../../../../../core/eperson/models/group.model'; import { SupervisionOrder } from '../../../../../../core/supervision-order/models/supervision-order.model'; import { SupervisionOrderDataService } from '../../../../../../core/supervision-order/supervision-order-data.service'; import { RemoteData } from '../../../../../../core/data/remote-data'; +import { EpersonGroupListComponent } from '../../../../../../shared/eperson-group-list/eperson-group-list.component'; +import { ErrorComponent } from '../../../../../../shared/error/error.component'; +import { NgIf } from '@angular/common'; +import { FormsModule } from '@angular/forms'; /** * Component to wrap a dropdown - for type of order - @@ -17,9 +21,11 @@ import { RemoteData } from '../../../../../../core/data/remote-data'; */ @Component({ - selector: 'ds-supervision-group-selector', - styleUrls: ['./supervision-order-group-selector.component.scss'], - templateUrl: './supervision-order-group-selector.component.html', + selector: 'ds-supervision-group-selector', + styleUrls: ['./supervision-order-group-selector.component.scss'], + templateUrl: './supervision-order-group-selector.component.html', + standalone: true, + imports: [FormsModule, NgIf, ErrorComponent, EpersonGroupListComponent, TranslateModule] }) export class SupervisionOrderGroupSelectorComponent { diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.spec.ts index 2f4ed631cc..b3f8e5ef59 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.spec.ts @@ -16,20 +16,20 @@ describe('SupervisionOrderStatusComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ NgbTooltipModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ SupervisionOrderStatusComponent, VarDirective ], - schemas: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + SupervisionOrderStatusComponent, VarDirective + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }) + ] +}) .compileComponents(); }); diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.ts index 93c6441e92..c0dd5eb578 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/supervision-order-status/supervision-order-status.component.ts @@ -9,6 +9,10 @@ import { getFirstCompletedRemoteData } from '../../../../../../core/shared/opera import { isNotEmpty } from '../../../../../../shared/empty.util'; import { RemoteData } from '../../../../../../core/data/remote-data'; import { DSONameService } from '../../../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../../../../../shared/utils/var.directive'; export interface SupervisionOrderListEntry { supervisionOrder: SupervisionOrder; @@ -16,9 +20,11 @@ export interface SupervisionOrderListEntry { } @Component({ - selector: 'ds-supervision-order-status', - templateUrl: './supervision-order-status.component.html', - styleUrls: ['./supervision-order-status.component.scss'] + selector: 'ds-supervision-order-status', + templateUrl: './supervision-order-status.component.html', + styleUrls: ['./supervision-order-status.component.scss'], + standalone: true, + imports: [VarDirective, NgIf, NgFor, NgbTooltipModule, AsyncPipe, TranslateModule] }) export class SupervisionOrderStatusComponent implements OnChanges { diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.spec.ts index a8f0581ec0..e9afa54798 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.spec.ts @@ -53,19 +53,19 @@ describe('WorkspaceItemAdminWorkflowActionsComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ NgbModalModule, TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - declarations: [WorkspaceItemAdminWorkflowActionsComponent], - providers: [ + RouterTestingModule.withRoutes([]), + WorkspaceItemAdminWorkflowActionsComponent + ], + providers: [ { provide: DSONameService, useClass: DSONameServiceMock }, { provide: NotificationsService, useValue: notificationService }, { provide: SupervisionOrderDataService, useValue: supervisionOrderDataService } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.ts index 36678460da..9329cc20e3 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/actions/workspace-item/workspace-item-admin-workflow-actions.component.ts @@ -3,7 +3,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { map, Observable } from 'rxjs'; import { switchMap, take, tap } from 'rxjs/operators'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Item } from '../../../../../core/shared/item.model'; import { getFirstSucceededRemoteDataPayload } from '../../../../../core/shared/operators'; @@ -16,7 +16,7 @@ import { import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../../../item-page/edit-item-page/edit-item-page.routing-paths'; import { WorkspaceItem } from '../../../../../core/submission/models/workspaceitem.model'; import { SupervisionOrder } from '../../../../../core/supervision-order/models/supervision-order.model'; -import { SupervisionOrderListEntry } from './supervision-order-status/supervision-order-status.component'; +import { SupervisionOrderListEntry, SupervisionOrderStatusComponent } from './supervision-order-status/supervision-order-status.component'; import { ConfirmationModalComponent } from '../../../../../shared/confirmation-modal/confirmation-modal.component'; import { hasValue } from '../../../../../shared/empty.util'; import { NotificationsService } from '../../../../../shared/notifications/notifications.service'; @@ -24,11 +24,15 @@ import { SupervisionOrderDataService } from '../../../../../core/supervision-ord import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; import { getSearchResultFor } from '../../../../../shared/search/search-result-element-decorator'; +import { RouterLink } from '@angular/router'; +import { NgClass, NgIf } from '@angular/common'; @Component({ - selector: 'ds-workspace-item-admin-workflow-actions-element', - styleUrls: ['./workspace-item-admin-workflow-actions.component.scss'], - templateUrl: './workspace-item-admin-workflow-actions.component.html' + selector: 'ds-workspace-item-admin-workflow-actions-element', + styleUrls: ['./workspace-item-admin-workflow-actions.component.scss'], + templateUrl: './workspace-item-admin-workflow-actions.component.html', + standalone: true, + imports: [SupervisionOrderStatusComponent, NgClass, RouterLink, NgIf, TranslateModule] }) /** * The component for displaying the actions for a list element for a workspace-item on the admin workflow search page diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.spec.ts index 8035c53547..c3ee9fa37b 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.spec.ts @@ -55,24 +55,24 @@ describe('WorkflowItemSearchResultAdminWorkflowGridElementComponent', () => { init(); TestBed.configureTestingModule( { - declarations: [WorkflowItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective], - imports: [ - NoopAnimationsModule, - TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]), - ], - providers: [ - { provide: LinkService, useValue: linkService }, - { provide: ThemeService, useValue: themeService }, - { + imports: [ + NoopAnimationsModule, + TranslateModule.forRoot(), + RouterTestingModule.withRoutes([]), + WorkflowItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective + ], + providers: [ + { provide: LinkService, useValue: linkService }, + { provide: ThemeService, useValue: themeService }, + { provide: TruncatableService, useValue: { - isCollapsed: () => observableOf(true), + isCollapsed: () => observableOf(true), } - }, - { provide: BitstreamDataService, useValue: {} }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + }, + { provide: BitstreamDataService, useValue: {} }, + ], + schemas: [NO_ERRORS_SCHEMA] +}) .overrideComponent(WorkflowItemSearchResultAdminWorkflowGridElementComponent, { set: { entryComponents: [ItemGridElementComponent] diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts index fd9d21e227..421b924cc6 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workflow-item/workflow-item-search-result-admin-workflow-grid-element.component.ts @@ -24,12 +24,17 @@ import { take } from 'rxjs/operators'; import { WorkflowItemSearchResult } from '../../../../../shared/object-collection/shared/workflow-item-search-result.model'; import { ThemeService } from '../../../../../shared/theme-support/theme.service'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { WorkflowItemAdminWorkflowActionsComponent } from '../../actions/workflow-item/workflow-item-admin-workflow-actions.component'; +import { NgIf } from '@angular/common'; @listableObjectComponent(WorkflowItemSearchResult, ViewMode.GridElement, Context.AdminWorkflowSearch) @Component({ - selector: 'ds-workflow-item-search-result-admin-workflow-grid-element', - styleUrls: ['./workflow-item-search-result-admin-workflow-grid-element.component.scss'], - templateUrl: './workflow-item-search-result-admin-workflow-grid-element.component.html' + selector: 'ds-workflow-item-search-result-admin-workflow-grid-element', + styleUrls: ['./workflow-item-search-result-admin-workflow-grid-element.component.scss'], + templateUrl: './workflow-item-search-result-admin-workflow-grid-element.component.html', + standalone: true, + imports: [ListableObjectDirective, NgIf, WorkflowItemAdminWorkflowActionsComponent, TranslateModule] }) /** * The component for displaying a grid element for an workflow item on the admin workflow search page diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.spec.ts index b9e752c104..6a1edc4240 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.spec.ts @@ -67,25 +67,25 @@ describe('WorkspaceItemSearchResultAdminWorkflowGridElementComponent', () => { init(); TestBed.configureTestingModule( { - declarations: [WorkspaceItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective], - imports: [ - NoopAnimationsModule, - TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]), - ], - providers: [ - { provide: LinkService, useValue: linkService }, - { provide: ThemeService, useValue: themeService }, - { + imports: [ + NoopAnimationsModule, + TranslateModule.forRoot(), + RouterTestingModule.withRoutes([]), + WorkspaceItemSearchResultAdminWorkflowGridElementComponent, ItemGridElementComponent, ListableObjectDirective + ], + providers: [ + { provide: LinkService, useValue: linkService }, + { provide: ThemeService, useValue: themeService }, + { provide: TruncatableService, useValue: { - isCollapsed: () => observableOf(true), + isCollapsed: () => observableOf(true), } - }, - { provide: BitstreamDataService, useValue: {} }, - { provide: SupervisionOrderDataService, useValue: supervisionOrderDataService } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + }, + { provide: BitstreamDataService, useValue: {} }, + { provide: SupervisionOrderDataService, useValue: supervisionOrderDataService } + ], + schemas: [NO_ERRORS_SCHEMA] +}) .overrideComponent(WorkspaceItemSearchResultAdminWorkflowGridElementComponent, { set: { entryComponents: [ItemGridElementComponent] diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.ts index d6f39e79fe..067a831248 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-grid-element/workspace-item/workspace-item-search-result-admin-workflow-grid-element.component.ts @@ -37,12 +37,17 @@ import { SupervisionOrder } from '../../../../../core/supervision-order/models/s import { PaginatedList } from '../../../../../core/data/paginated-list.model'; import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe } from '@angular/common'; +import { WorkspaceItemAdminWorkflowActionsComponent } from '../../actions/workspace-item/workspace-item-admin-workflow-actions.component'; @listableObjectComponent(WorkspaceItemSearchResult, ViewMode.GridElement, Context.AdminWorkflowSearch) @Component({ - selector: 'ds-workflow-item-search-result-admin-workflow-grid-element', - styleUrls: ['./workspace-item-search-result-admin-workflow-grid-element.component.scss'], - templateUrl: './workspace-item-search-result-admin-workflow-grid-element.component.html' + selector: 'ds-workflow-item-search-result-admin-workflow-grid-element', + styleUrls: ['./workspace-item-search-result-admin-workflow-grid-element.component.scss'], + templateUrl: './workspace-item-search-result-admin-workflow-grid-element.component.html', + standalone: true, + imports: [ListableObjectDirective, WorkspaceItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an workflow item on the admin workflow search page diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.spec.ts index ab5d8b79a8..957b55c9ae 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.spec.ts @@ -48,20 +48,20 @@ describe('WorkflowItemSearchResultAdminWorkflowListElementComponent', () => { init(); TestBed.configureTestingModule( { - declarations: [WorkflowItemSearchResultAdminWorkflowListElementComponent], - imports: [ - NoopAnimationsModule, - TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]), - ], - providers: [ - { provide: TruncatableService, useValue: mockTruncatableService }, - { provide: LinkService, useValue: linkService }, - { provide: DSONameService, useClass: DSONameServiceMock }, - { provide: APP_CONFIG, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [ + NoopAnimationsModule, + TranslateModule.forRoot(), + RouterTestingModule.withRoutes([]), + WorkflowItemSearchResultAdminWorkflowListElementComponent + ], + providers: [ + { provide: TruncatableService, useValue: mockTruncatableService }, + { provide: LinkService, useValue: linkService }, + { provide: DSONameService, useClass: DSONameServiceMock }, + { provide: APP_CONFIG, useValue: environment } + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.ts index d0e773d696..da3ab10a76 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workflow-item/workflow-item-search-result-admin-workflow-list-element.component.ts @@ -20,12 +20,18 @@ import { } from '../../../../../shared/object-collection/shared/workflow-item-search-result.model'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface'; +import { TranslateModule } from '@ngx-translate/core'; +import { WorkflowItemAdminWorkflowActionsComponent } from '../../actions/workflow-item/workflow-item-admin-workflow-actions.component'; +import { ListableObjectComponentLoaderComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent(WorkflowItemSearchResult, ViewMode.ListElement, Context.AdminWorkflowSearch) @Component({ - selector: 'ds-workflow-item-search-result-admin-workflow-list-element', - styleUrls: ['./workflow-item-search-result-admin-workflow-list-element.component.scss'], - templateUrl: './workflow-item-search-result-admin-workflow-list-element.component.html' + selector: 'ds-workflow-item-search-result-admin-workflow-list-element', + styleUrls: ['./workflow-item-search-result-admin-workflow-list-element.component.scss'], + templateUrl: './workflow-item-search-result-admin-workflow-list-element.component.html', + standalone: true, + imports: [NgIf, ListableObjectComponentLoaderComponent, WorkflowItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a list element for a workflow item on the admin workflow search page diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.spec.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.spec.ts index 19eefc9c48..1a4d4392fe 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.spec.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.spec.ts @@ -60,21 +60,21 @@ describe('WorkspaceItemSearchResultAdminWorkflowListElementComponent', () => { init(); TestBed.configureTestingModule( { - declarations: [WorkspaceItemSearchResultAdminWorkflowListElementComponent], - imports: [ - NoopAnimationsModule, - TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]), - ], - providers: [ - { provide: TruncatableService, useValue: mockTruncatableService }, - { provide: LinkService, useValue: linkService }, - { provide: DSONameService, useClass: DSONameServiceMock }, - { provide: SupervisionOrderDataService, useValue: supervisionOrderDataService }, - { provide: APP_CONFIG, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [ + NoopAnimationsModule, + TranslateModule.forRoot(), + RouterTestingModule.withRoutes([]), + WorkspaceItemSearchResultAdminWorkflowListElementComponent + ], + providers: [ + { provide: TruncatableService, useValue: mockTruncatableService }, + { provide: LinkService, useValue: linkService }, + { provide: DSONameService, useClass: DSONameServiceMock }, + { provide: SupervisionOrderDataService, useValue: supervisionOrderDataService }, + { provide: APP_CONFIG, useValue: environment } + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.ts b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.ts index 3d6d1c8e44..2de5cfcb7a 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow-search-results/admin-workflow-search-result-list-element/workspace-item/workspace-item-search-result-admin-workflow-list-element.component.ts @@ -31,12 +31,18 @@ import { SupervisionOrder } from '../../../../../core/supervision-order/models/s import { SupervisionOrderDataService } from '../../../../../core/supervision-order/supervision-order-data.service'; import { PaginatedList } from '../../../../../core/data/paginated-list.model'; import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { WorkspaceItemAdminWorkflowActionsComponent } from '../../actions/workspace-item/workspace-item-admin-workflow-actions.component'; +import { ListableObjectComponentLoaderComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent(WorkspaceItemSearchResult, ViewMode.ListElement, Context.AdminWorkflowSearch) @Component({ - selector: 'ds-workflow-item-search-result-admin-workflow-list-element', - styleUrls: ['./workspace-item-search-result-admin-workflow-list-element.component.scss'], - templateUrl: './workspace-item-search-result-admin-workflow-list-element.component.html' + selector: 'ds-workflow-item-search-result-admin-workflow-list-element', + styleUrls: ['./workspace-item-search-result-admin-workflow-list-element.component.scss'], + templateUrl: './workspace-item-search-result-admin-workflow-list-element.component.html', + standalone: true, + imports: [NgIf, ListableObjectComponentLoaderComponent, WorkspaceItemAdminWorkflowActionsComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a list element for a workflow item on the admin workflow search page diff --git a/src/app/admin/admin-workflow-page/admin-workflow.module.ts b/src/app/admin/admin-workflow-page/admin-workflow.module.ts index 21990c1ea9..64f3747be3 100644 --- a/src/app/admin/admin-workflow-page/admin-workflow.module.ts +++ b/src/app/admin/admin-workflow-page/admin-workflow.module.ts @@ -37,21 +37,19 @@ const ENTRY_COMPONENTS = [ ]; @NgModule({ - imports: [ - SearchModule, - SharedModule.withEntryComponents() - ], - declarations: [ - AdminWorkflowPageComponent, - SupervisionOrderGroupSelectorComponent, - SupervisionOrderStatusComponent, - WorkflowItemAdminWorkflowActionsComponent, - WorkspaceItemAdminWorkflowActionsComponent, - ...ENTRY_COMPONENTS - ], - exports: [ - AdminWorkflowPageComponent - ] + imports: [ + SearchModule, + SharedModule.withEntryComponents(), + AdminWorkflowPageComponent, + SupervisionOrderGroupSelectorComponent, + SupervisionOrderStatusComponent, + WorkflowItemAdminWorkflowActionsComponent, + WorkspaceItemAdminWorkflowActionsComponent, + ...ENTRY_COMPONENTS + ], + exports: [ + AdminWorkflowPageComponent + ] }) export class AdminWorkflowModuleModule { /** diff --git a/src/app/admin/admin.module.ts b/src/app/admin/admin.module.ts index 3dc0036854..4da844f728 100644 --- a/src/app/admin/admin.module.ts +++ b/src/app/admin/admin.module.ts @@ -21,21 +21,19 @@ const ENTRY_COMPONENTS = [ @NgModule({ - imports: [ - AdminRoutingModule, - AdminRegistriesModule, - AccessControlModule, - AdminSearchModule.withEntryComponents(), - AdminWorkflowModuleModule.withEntryComponents(), - SharedModule, - UiSwitchModule, - UploadModule, - ], - declarations: [ - AdminCurationTasksComponent, - MetadataImportPageComponent, - BatchImportPageComponent - ] + imports: [ + AdminRoutingModule, + AdminRegistriesModule, + AccessControlModule, + AdminSearchModule.withEntryComponents(), + AdminWorkflowModuleModule.withEntryComponents(), + SharedModule, + UiSwitchModule, + UploadModule, + AdminCurationTasksComponent, + MetadataImportPageComponent, + BatchImportPageComponent + ] }) export class AdminModule { /** diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index deb68f1ea9..d621f96a70 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -186,8 +186,8 @@ import { ThemedPageErrorComponent } from './page-error/themed-page-error.compone }, { path: WORKFLOW_ITEM_MODULE_PATH, - loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page.module') - .then((m) => m.WorkflowItemsEditPageModule), + loadChildren: () => import('./workflowitems-edit-page/workflowitems-edit-page.routes') + .then((m) => m.workflowItemsEditPageRoutes), canActivate: [EndUserAgreementCurrentUserGuard] }, { diff --git a/src/app/app.component.ts b/src/app/app.component.ts index ba7b738227..32d669ca27 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,5 +1,5 @@ import { distinctUntilChanged, take, withLatestFrom } from 'rxjs/operators'; -import { DOCUMENT, isPlatformBrowser } from '@angular/common'; +import { DOCUMENT, isPlatformBrowser, AsyncPipe } from '@angular/common'; import { AfterViewInit, ChangeDetectionStrategy, @@ -31,12 +31,15 @@ import { models } from './core/core.module'; import { ThemeService } from './shared/theme-support/theme.service'; import { IdleModalComponent } from './shared/idle-modal/idle-modal.component'; import { distinctNext } from './core/shared/distinct-next'; +import { ThemedRootComponent } from './root/themed-root.component'; @Component({ - selector: 'ds-app', - templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'ds-app', + templateUrl: './app.component.html', + styleUrls: ['./app.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [ThemedRootComponent, AsyncPipe] }) export class AppComponent implements OnInit, AfterViewInit { notificationOptions; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 89e361821b..968cdc7076 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -115,20 +115,18 @@ const EXPORTS = [ ]; @NgModule({ - imports: [ - BrowserModule.withServerTransition({ appId: 'dspace-angular' }), - ...IMPORTS - ], - providers: [ - ...PROVIDERS - ], - declarations: [ - ...DECLARATIONS, - ], - exports: [ - ...EXPORTS, - ...DECLARATIONS, - ] + imports: [ + BrowserModule.withServerTransition({ appId: 'dspace-angular' }), + ...IMPORTS, + ...DECLARATIONS + ], + providers: [ + ...PROVIDERS + ], + exports: [ + ...EXPORTS, + ...DECLARATIONS, + ] }) export class AppModule { diff --git a/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.spec.ts b/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.spec.ts index c41351f380..ced95e686f 100644 --- a/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.spec.ts +++ b/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.spec.ts @@ -42,23 +42,23 @@ describe('BitstreamAuthorizationsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [BitstreamAuthorizationsComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + BitstreamAuthorizationsComponent + ], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, ChangeDetectorRef, BitstreamAuthorizationsComponent, - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.ts b/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.ts index adc0638780..480a59e33a 100644 --- a/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.ts +++ b/src/app/bitstream-page/bitstream-authorizations/bitstream-authorizations.component.ts @@ -1,15 +1,25 @@ import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { Observable } from 'rxjs'; import { first, map } from 'rxjs/operators'; import { RemoteData } from '../../core/data/remote-data'; import { DSpaceObject } from '../../core/shared/dspace-object.model'; +import { ResourcePoliciesComponent } from '../../shared/resource-policies/resource-policies.component'; +import { AsyncPipe } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-collection-authorizations', templateUrl: './bitstream-authorizations.component.html', + imports: [ + ResourcePoliciesComponent, + AsyncPipe, + TranslateModule, + RouterLink + ], + standalone: true }) /** * Component that handles the Collection Authorizations diff --git a/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.spec.ts b/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.spec.ts index 59261e56d2..f18a65329e 100644 --- a/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.spec.ts +++ b/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.spec.ts @@ -90,9 +90,8 @@ describe('BitstreamDownloadPageComponent', () => { function initTestbed() { TestBed.configureTestingModule({ - imports: [CommonModule, TranslateModule.forRoot()], - declarations: [BitstreamDownloadPageComponent], - providers: [ + imports: [CommonModule, TranslateModule.forRoot(), BitstreamDownloadPageComponent], + providers: [ { provide: ActivatedRoute, useValue: activatedRoute }, { provide: Router, useValue: router }, { provide: AuthorizationDataService, useValue: authorizationService }, @@ -102,8 +101,8 @@ describe('BitstreamDownloadPageComponent', () => { { provide: ServerResponseService, useValue: serverResponseService }, { provide: SignpostingDataService, useValue: signpostingDataService }, { provide: PLATFORM_ID, useValue: 'server' } - ] - }) + ] +}) .compileComponents(); } diff --git a/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts b/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts index 0b8e6a66e5..2e28968ed7 100644 --- a/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts +++ b/src/app/bitstream-page/bitstream-download-page/bitstream-download-page.component.ts @@ -13,15 +13,21 @@ import { HardRedirectService } from '../../core/services/hard-redirect.service'; import { getForbiddenRoute } from '../../app-routing-paths'; import { RemoteData } from '../../core/data/remote-data'; import { redirectOn4xx } from '../../core/shared/authorized.operators'; -import { isPlatformServer, Location } from '@angular/common'; +import { AsyncPipe, isPlatformServer, Location } from '@angular/common'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; import { SignpostingDataService } from '../../core/data/signposting-data.service'; import { ServerResponseService } from '../../core/services/server-response.service'; import { SignpostingLink } from '../../core/data/signposting-links.model'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-bitstream-download-page', - templateUrl: './bitstream-download-page.component.html' + templateUrl: './bitstream-download-page.component.html', + imports: [ + AsyncPipe, + TranslateModule + ], + standalone: true }) /** * Page component for downloading a bitstream diff --git a/src/app/bitstream-page/bitstream-page.module.ts b/src/app/bitstream-page/bitstream-page.module.ts index 9bbe3d200c..dbe897c8c6 100644 --- a/src/app/bitstream-page/bitstream-page.module.ts +++ b/src/app/bitstream-page/bitstream-page.module.ts @@ -13,19 +13,17 @@ import { ThemedEditBitstreamPageComponent } from './edit-bitstream-page/themed-e * This module handles all components that are necessary for Bitstream related pages */ @NgModule({ - imports: [ - CommonModule, - SharedModule, - BitstreamPageRoutingModule, - FormModule, - ResourcePoliciesModule - ], - declarations: [ - BitstreamAuthorizationsComponent, - EditBitstreamPageComponent, - ThemedEditBitstreamPageComponent, - BitstreamDownloadPageComponent, - ] + imports: [ + CommonModule, + SharedModule, + BitstreamPageRoutingModule, + FormModule, + ResourcePoliciesModule, + BitstreamAuthorizationsComponent, + EditBitstreamPageComponent, + ThemedEditBitstreamPageComponent, + BitstreamDownloadPageComponent + ] }) export class BitstreamPageModule { } diff --git a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts index b83f2b9664..68f50a8424 100644 --- a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts +++ b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.spec.ts @@ -192,26 +192,25 @@ describe('EditBitstreamPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule], - declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective], - providers: [ - { provide: NotificationsService, useValue: notificationsService }, - { provide: DynamicFormService, useValue: formService }, - { + imports: [TranslateModule.forRoot(), RouterTestingModule, EditBitstreamPageComponent, FileSizePipe, VarDirective], + providers: [ + { provide: NotificationsService, useValue: notificationsService }, + { provide: DynamicFormService, useValue: formService }, + { provide: ActivatedRoute, useValue: { - data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }), - snapshot: { queryParams: {} } + data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }), + snapshot: { queryParams: {} } } - }, - { provide: BitstreamDataService, useValue: bitstreamService }, - { provide: DSONameService, useValue: dsoNameService }, - { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, - { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, - ChangeDetectorRef - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + }, + { provide: BitstreamDataService, useValue: bitstreamService }, + { provide: DSONameService, useValue: dsoNameService }, + { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, + { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, + ChangeDetectorRef + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); @@ -481,26 +480,25 @@ describe('EditBitstreamPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule], - declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective], - providers: [ - {provide: NotificationsService, useValue: notificationsService}, - {provide: DynamicFormService, useValue: formService}, - { + imports: [TranslateModule.forRoot(), RouterTestingModule, EditBitstreamPageComponent, FileSizePipe, VarDirective], + providers: [ + { provide: NotificationsService, useValue: notificationsService }, + { provide: DynamicFormService, useValue: formService }, + { provide: ActivatedRoute, useValue: { - data: observableOf({bitstream: createSuccessfulRemoteDataObject(bitstream)}), - snapshot: {queryParams: {}} + data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }), + snapshot: { queryParams: {} } } - }, - {provide: BitstreamDataService, useValue: bitstreamService}, - {provide: DSONameService, useValue: dsoNameService}, - {provide: BitstreamFormatDataService, useValue: bitstreamFormatService}, - { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, - ChangeDetectorRef - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + }, + { provide: BitstreamDataService, useValue: bitstreamService }, + { provide: DSONameService, useValue: dsoNameService }, + { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, + { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, + ChangeDetectorRef + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { @@ -606,25 +604,24 @@ describe('EditBitstreamPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule], - declarations: [EditBitstreamPageComponent, FileSizePipe, VarDirective], - providers: [ - {provide: NotificationsService, useValue: notificationsService}, - {provide: DynamicFormService, useValue: formService}, - {provide: ActivatedRoute, - useValue: { - data: observableOf({bitstream: createSuccessfulRemoteDataObject(bitstream)}), - snapshot: {queryParams: {}} - } - }, - {provide: BitstreamDataService, useValue: bitstreamService}, - {provide: DSONameService, useValue: dsoNameService}, - {provide: BitstreamFormatDataService, useValue: bitstreamFormatService}, - { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, - ChangeDetectorRef - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), RouterTestingModule, EditBitstreamPageComponent, FileSizePipe, VarDirective], + providers: [ + { provide: NotificationsService, useValue: notificationsService }, + { provide: DynamicFormService, useValue: formService }, + { provide: ActivatedRoute, + useValue: { + data: observableOf({ bitstream: createSuccessfulRemoteDataObject(bitstream) }), + snapshot: { queryParams: {} } + } + }, + { provide: BitstreamDataService, useValue: bitstreamService }, + { provide: DSONameService, useValue: dsoNameService }, + { provide: BitstreamFormatDataService, useValue: bitstreamFormatService }, + { provide: PrimaryBitstreamService, useValue: primaryBitstreamService }, + ChangeDetectorRef + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts index b77d2151a9..202d17633c 100644 --- a/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts +++ b/src/app/bitstream-page/edit-bitstream-page/edit-bitstream-page.component.ts @@ -1,11 +1,11 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; import { Bitstream } from '../../core/shared/bitstream.model'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { filter, map, switchMap, tap } from 'rxjs/operators'; import { combineLatest, combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs'; import { DynamicFormControlModel, DynamicFormGroupModel, DynamicFormLayout, DynamicFormService, DynamicInputModel, DynamicSelectModel } from '@ng-dynamic-forms/core'; import { UntypedFormGroup } from '@angular/forms'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DynamicCustomSwitchModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.model'; import cloneDeep from 'lodash/cloneDeep'; import { BitstreamDataService } from '../../core/data/bitstream-data.service'; @@ -16,7 +16,7 @@ import { BitstreamFormat } from '../../core/shared/bitstream-format.model'; import { BitstreamFormatSupportLevel } from '../../core/shared/bitstream-format-support-level'; import { hasValue, hasValueOperator, isEmpty, isNotEmpty } from '../../shared/empty.util'; import { Metadata } from '../../core/shared/metadata.utils'; -import { Location } from '@angular/common'; +import { AsyncPipe, Location, NgIf } from '@angular/common'; import { RemoteData } from '../../core/data/remote-data'; import { PaginatedList } from '../../core/data/paginated-list.model'; import { getEntityEditRoute } from '../../item-page/item-page-routing-paths'; @@ -26,12 +26,31 @@ import { Item } from '../../core/shared/item.model'; import { DsDynamicInputModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-input.model'; import { DsDynamicTextAreaModel } from '../../shared/form/builder/ds-dynamic-form-ui/models/ds-dynamic-textarea.model'; import { PrimaryBitstreamService } from '../../core/data/primary-bitstream.service'; +import { FormComponent } from '../../shared/form/form.component'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { ThemedThumbnailComponent } from '../../thumbnail/themed-thumbnail.component'; +import { ErrorComponent } from '../../shared/error/error.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { FileSizePipe } from '../../shared/utils/file-size-pipe'; @Component({ selector: 'ds-edit-bitstream-page', styleUrls: ['./edit-bitstream-page.component.scss'], templateUrl: './edit-bitstream-page.component.html', - changeDetection: ChangeDetectionStrategy.OnPush + changeDetection: ChangeDetectionStrategy.OnPush, + imports: [ + FormComponent, + NgIf, + VarDirective, + ThemedThumbnailComponent, + AsyncPipe, + RouterLink, + ErrorComponent, + ThemedLoadingComponent, + TranslateModule, + FileSizePipe + ], + standalone: true }) /** * Page component for editing a bitstream diff --git a/src/app/bitstream-page/edit-bitstream-page/themed-edit-bitstream-page.component.ts b/src/app/bitstream-page/edit-bitstream-page/themed-edit-bitstream-page.component.ts index dcca28a495..48f4e32c9e 100644 --- a/src/app/bitstream-page/edit-bitstream-page/themed-edit-bitstream-page.component.ts +++ b/src/app/bitstream-page/edit-bitstream-page/themed-edit-bitstream-page.component.ts @@ -3,9 +3,10 @@ import { EditBitstreamPageComponent } from './edit-bitstream-page.component'; import { ThemedComponent } from '../../shared/theme-support/themed.component'; @Component({ - selector: 'ds-themed-edit-bitstream-page', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-edit-bitstream-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedEditBitstreamPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/breadcrumbs/breadcrumbs.component.spec.ts b/src/app/breadcrumbs/breadcrumbs.component.spec.ts index 69387e7534..a52df4d8a4 100644 --- a/src/app/breadcrumbs/breadcrumbs.component.spec.ts +++ b/src/app/breadcrumbs/breadcrumbs.component.spec.ts @@ -40,23 +40,21 @@ describe('BreadcrumbsComponent', () => { } as BreadcrumbsService; TestBed.configureTestingModule({ - declarations: [ - BreadcrumbsComponent, - VarDirective, - ], - imports: [ + imports: [ RouterTestingModule.withRoutes([]), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + } }), - ], - providers: [ + BreadcrumbsComponent, + VarDirective + ], + providers: [ { provide: BreadcrumbsService, useValue: breadcrumbsServiceMock }, - ], - }).compileComponents(); + ] +}).compileComponents(); fixture = TestBed.createComponent(BreadcrumbsComponent); component = fixture.componentInstance; diff --git a/src/app/breadcrumbs/breadcrumbs.component.ts b/src/app/breadcrumbs/breadcrumbs.component.ts index 248fb446ed..7511d47d05 100644 --- a/src/app/breadcrumbs/breadcrumbs.component.ts +++ b/src/app/breadcrumbs/breadcrumbs.component.ts @@ -2,6 +2,11 @@ import { Component } from '@angular/core'; import { Breadcrumb } from './breadcrumb/breadcrumb.model'; import { BreadcrumbsService } from './breadcrumbs.service'; import { Observable } from 'rxjs'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { RouterLink } from '@angular/router'; +import { AsyncPipe, NgFor, NgIf, NgTemplateOutlet } from '@angular/common'; +import { VarDirective } from '../shared/utils/var.directive'; /** * Component representing the breadcrumbs of a page @@ -9,7 +14,9 @@ import { Observable } from 'rxjs'; @Component({ selector: 'ds-breadcrumbs', templateUrl: './breadcrumbs.component.html', - styleUrls: ['./breadcrumbs.component.scss'] + styleUrls: ['./breadcrumbs.component.scss'], + standalone: true, + imports: [VarDirective, NgIf, NgTemplateOutlet, NgFor, RouterLink, NgbTooltipModule, AsyncPipe, TranslateModule] }) export class BreadcrumbsComponent { diff --git a/src/app/breadcrumbs/themed-breadcrumbs.component.ts b/src/app/breadcrumbs/themed-breadcrumbs.component.ts index 1869a440b9..73efb811ae 100644 --- a/src/app/breadcrumbs/themed-breadcrumbs.component.ts +++ b/src/app/breadcrumbs/themed-breadcrumbs.component.ts @@ -6,9 +6,10 @@ import { BreadcrumbsComponent } from './breadcrumbs.component'; * Themed wrapper for BreadcrumbsComponent */ @Component({ - selector: 'ds-themed-breadcrumbs', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-breadcrumbs', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedBreadcrumbsComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts index e41d3a45b2..d6bb0715c5 100644 --- a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts +++ b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.spec.ts @@ -85,9 +85,8 @@ describe('BrowseByDatePageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BrowseByDatePageComponent, EnumKeysPipe, VarDirective], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BrowseByDatePageComponent, EnumKeysPipe, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: BrowseService, useValue: mockBrowseService }, { provide: DSpaceObjectDataService, useValue: mockDsoService }, @@ -95,9 +94,9 @@ describe('BrowseByDatePageComponent', () => { { provide: PaginationService, useValue: paginationService }, { provide: ChangeDetectorRef, useValue: mockCdRef }, { provide: APP_CONFIG, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts index 7074190e1e..048cc0e6b0 100644 --- a/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts +++ b/src/app/browse-by/browse-by-date-page/browse-by-date-page.component.ts @@ -19,11 +19,41 @@ import { APP_CONFIG, AppConfig } from '../../../config/app-config.interface'; import { RemoteData } from '../../core/data/remote-data'; import { Item } from '../../core/shared/item.model'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ComcolPageHeaderComponent } from '../../shared/comcol/comcol-page-header/comcol-page-header.component'; +import { ComcolPageLogoComponent } from '../../shared/comcol/comcol-page-logo/comcol-page-logo.component'; +import { + ThemedComcolPageHandleComponent +} from '../../shared/comcol/comcol-page-handle/themed-comcol-page-handle.component'; +import { ComcolPageContentComponent } from '../../shared/comcol/comcol-page-content/comcol-page-content.component'; +import { DsoEditMenuComponent } from '../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { + ThemedComcolPageBrowseByComponent +} from '../../shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component'; +import { BrowseByComponent } from '../../shared/browse-by/browse-by.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; @Component({ selector: 'ds-browse-by-date-page', styleUrls: ['../browse-by-metadata-page/browse-by-metadata-page.component.scss'], - templateUrl: '../browse-by-metadata-page/browse-by-metadata-page.component.html' + templateUrl: '../browse-by-metadata-page/browse-by-metadata-page.component.html', + standalone: true, + imports: [ + VarDirective, + AsyncPipe, + ComcolPageHeaderComponent, + ComcolPageLogoComponent, + NgIf, + ThemedComcolPageHandleComponent, + ComcolPageContentComponent, + DsoEditMenuComponent, + ThemedComcolPageBrowseByComponent, + BrowseByComponent, + TranslateModule, + ThemedLoadingComponent + ] }) /** * Component for browsing items by metadata definition of type 'date' diff --git a/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts b/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts index 8eeae0c5de..c254817836 100644 --- a/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts +++ b/src/app/browse-by/browse-by-date-page/themed-browse-by-date-page.component.ts @@ -7,9 +7,10 @@ import {BrowseByDataType, rendersBrowseBy} from '../browse-by-switcher/browse-by * Themed wrapper for BrowseByDatePageComponent * */ @Component({ - selector: 'ds-themed-browse-by-metadata-page', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-browse-by-metadata-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) @rendersBrowseBy(BrowseByDataType.Date) diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts index a5beeb8a45..18aea01330 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts +++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.spec.ts @@ -102,18 +102,17 @@ describe('BrowseByMetadataPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BrowseByMetadataPageComponent, EnumKeysPipe, VarDirective], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BrowseByMetadataPageComponent, EnumKeysPipe, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: BrowseService, useValue: mockBrowseService }, { provide: DSpaceObjectDataService, useValue: mockDsoService }, { provide: PaginationService, useValue: paginationService }, { provide: Router, useValue: new RouterMock() }, { provide: APP_CONFIG, useValue: environmentMock } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts index 113bc67c92..0173e3f13c 100644 --- a/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts +++ b/src/app/browse-by/browse-by-metadata-page/browse-by-metadata-page.component.ts @@ -22,13 +22,43 @@ import { Collection } from '../../core/shared/collection.model'; import { Community } from '../../core/shared/community.model'; import { APP_CONFIG, AppConfig } from '../../../config/app-config.interface'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ComcolPageHeaderComponent } from '../../shared/comcol/comcol-page-header/comcol-page-header.component'; +import { ComcolPageLogoComponent } from '../../shared/comcol/comcol-page-logo/comcol-page-logo.component'; +import { + ThemedComcolPageHandleComponent +} from '../../shared/comcol/comcol-page-handle/themed-comcol-page-handle.component'; +import { ComcolPageContentComponent } from '../../shared/comcol/comcol-page-content/comcol-page-content.component'; +import { DsoEditMenuComponent } from '../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { + ThemedComcolPageBrowseByComponent +} from '../../shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component'; +import { BrowseByComponent } from '../../shared/browse-by/browse-by.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; export const BBM_PAGINATION_ID = 'bbm'; @Component({ selector: 'ds-browse-by-metadata-page', styleUrls: ['./browse-by-metadata-page.component.scss'], - templateUrl: './browse-by-metadata-page.component.html' + templateUrl: './browse-by-metadata-page.component.html', + imports: [ + VarDirective, + AsyncPipe, + ComcolPageHeaderComponent, + ComcolPageLogoComponent, + NgIf, + ThemedComcolPageHandleComponent, + ComcolPageContentComponent, + DsoEditMenuComponent, + ThemedComcolPageBrowseByComponent, + BrowseByComponent, + TranslateModule, + ThemedLoadingComponent + ], + standalone: true }) /** * Component for browsing (items) by metadata definition. diff --git a/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts b/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts index b0679258e9..ff16fda15f 100644 --- a/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts +++ b/src/app/browse-by/browse-by-metadata-page/themed-browse-by-metadata-page.component.ts @@ -7,9 +7,10 @@ import {BrowseByDataType, rendersBrowseBy} from '../browse-by-switcher/browse-by * Themed wrapper for BrowseByMetadataPageComponent **/ @Component({ - selector: 'ds-themed-browse-by-metadata-page', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-browse-by-metadata-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) @rendersBrowseBy(BrowseByDataType.Metadata) diff --git a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts index c13405dd4d..752693998d 100644 --- a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts +++ b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.spec.ts @@ -57,14 +57,14 @@ describe('BrowseBySwitcherComponent', () => { }); TestBed.configureTestingModule({ - declarations: [BrowseBySwitcherComponent], - providers: [ + imports: [BrowseBySwitcherComponent], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: ThemeService, useValue: themeService }, { provide: BROWSE_BY_COMPONENT_FACTORY, useValue: jasmine.createSpy('getComponentByBrowseByType').and.returnValue(null) } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(waitForAsync(() => { diff --git a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts index 35e4edf900..5f52c67e45 100644 --- a/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts +++ b/src/app/browse-by/browse-by-switcher/browse-by-switcher.component.ts @@ -8,8 +8,9 @@ import { BrowseDefinition } from '../../core/shared/browse-definition.model'; import { ThemeService } from '../../shared/theme-support/theme.service'; @Component({ - selector: 'ds-browse-by-switcher', - templateUrl: './browse-by-switcher.component.html' + selector: 'ds-browse-by-switcher', + templateUrl: './browse-by-switcher.component.html', + standalone: true }) /** * Component for determining what Browse-By component to use depending on the metadata (browse ID) provided diff --git a/src/app/browse-by/browse-by-switcher/themed-browse-by-switcher.component.ts b/src/app/browse-by/browse-by-switcher/themed-browse-by-switcher.component.ts index 0187d4e3c5..9ba4ca89d9 100644 --- a/src/app/browse-by/browse-by-switcher/themed-browse-by-switcher.component.ts +++ b/src/app/browse-by/browse-by-switcher/themed-browse-by-switcher.component.ts @@ -7,9 +7,10 @@ import { BrowseBySwitcherComponent } from './browse-by-switcher.component'; * Themed wrapper for BrowseBySwitcherComponent */ @Component({ - selector: 'ds-themed-browse-by-switcher', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html' + selector: 'ds-themed-browse-by-switcher', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedBrowseBySwitcherComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts b/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts index c724017b1f..a424a4db65 100644 --- a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts +++ b/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.spec.ts @@ -28,14 +28,13 @@ describe('BrowseByTaxonomyPageComponent', () => { }); await TestBed.configureTestingModule({ - imports: [ TranslateModule.forRoot() ], - declarations: [ BrowseByTaxonomyPageComponent ], - providers: [ + imports: [TranslateModule.forRoot(), BrowseByTaxonomyPageComponent], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: ThemeService, useValue: themeService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); }); diff --git a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts b/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts index cf6345bf39..e05ec22a13 100644 --- a/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts +++ b/src/app/browse-by/browse-by-taxonomy-page/browse-by-taxonomy-page.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, Inject, OnDestroy } from '@angular/core'; import { VocabularyOptions } from '../../core/submission/vocabularies/models/vocabulary-options.model'; import { VocabularyEntryDetail } from '../../core/submission/vocabularies/models/vocabulary-entry-detail.model'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { Observable, Subscription } from 'rxjs'; import { BrowseDefinition } from '../../core/shared/browse-definition.model'; import { GenericConstructor } from '../../core/shared/generic-constructor'; @@ -9,11 +9,19 @@ import { BROWSE_BY_COMPONENT_FACTORY } from '../browse-by-switcher/browse-by-dec import { map } from 'rxjs/operators'; import { ThemeService } from 'src/app/shared/theme-support/theme.service'; import { HierarchicalBrowseDefinition } from '../../core/shared/hierarchical-browse-definition.model'; +import { VocabularyTreeviewComponent } from '../../shared/form/vocabulary-treeview/vocabulary-treeview.component'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-browse-by-taxonomy-page', templateUrl: './browse-by-taxonomy-page.component.html', - styleUrls: ['./browse-by-taxonomy-page.component.scss'] + styleUrls: ['./browse-by-taxonomy-page.component.scss'], + imports: [ + VocabularyTreeviewComponent, + RouterLink, + TranslateModule + ], + standalone: true }) /** * Component for browsing items by metadata in a hierarchical controlled vocabulary diff --git a/src/app/browse-by/browse-by-taxonomy-page/themed-browse-by-taxonomy-page.component.ts b/src/app/browse-by/browse-by-taxonomy-page/themed-browse-by-taxonomy-page.component.ts index 212044b853..8e45056c73 100644 --- a/src/app/browse-by/browse-by-taxonomy-page/themed-browse-by-taxonomy-page.component.ts +++ b/src/app/browse-by/browse-by-taxonomy-page/themed-browse-by-taxonomy-page.component.ts @@ -4,9 +4,10 @@ import { rendersBrowseBy } from '../browse-by-switcher/browse-by-decorator'; import { BrowseByTaxonomyPageComponent } from './browse-by-taxonomy-page.component'; @Component({ - selector: 'ds-themed-browse-by-taxonomy-page', - templateUrl: '../../shared/theme-support/themed.component.html', - styleUrls: [] + selector: 'ds-themed-browse-by-taxonomy-page', + templateUrl: '../../shared/theme-support/themed.component.html', + styleUrls: [], + standalone: true }) /** * Themed wrapper for BrowseByTaxonomyPageComponent diff --git a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts b/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts index e32c0ac430..abeebe07a0 100644 --- a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts +++ b/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.spec.ts @@ -70,18 +70,17 @@ describe('BrowseByTitlePageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [BrowseByTitlePageComponent, EnumKeysPipe, VarDirective], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, BrowseByTitlePageComponent, EnumKeysPipe, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: BrowseService, useValue: mockBrowseService }, { provide: DSpaceObjectDataService, useValue: mockDsoService }, { provide: PaginationService, useValue: paginationService }, { provide: Router, useValue: new RouterMock() }, { provide: APP_CONFIG, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts b/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts index 58df79ebe8..71bf668e98 100644 --- a/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts +++ b/src/app/browse-by/browse-by-title-page/browse-by-title-page.component.ts @@ -14,11 +14,41 @@ import { map } from 'rxjs/operators'; import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { AppConfig, APP_CONFIG } from '../../../config/app-config.interface'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ComcolPageHeaderComponent } from '../../shared/comcol/comcol-page-header/comcol-page-header.component'; +import { ComcolPageLogoComponent } from '../../shared/comcol/comcol-page-logo/comcol-page-logo.component'; +import { + ThemedComcolPageHandleComponent +} from '../../shared/comcol/comcol-page-handle/themed-comcol-page-handle.component'; +import { ComcolPageContentComponent } from '../../shared/comcol/comcol-page-content/comcol-page-content.component'; +import { DsoEditMenuComponent } from '../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { + ThemedComcolPageBrowseByComponent +} from '../../shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component'; +import { BrowseByComponent } from '../../shared/browse-by/browse-by.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; @Component({ - selector: 'ds-browse-by-title-page', - styleUrls: ['../browse-by-metadata-page/browse-by-metadata-page.component.scss'], - templateUrl: '../browse-by-metadata-page/browse-by-metadata-page.component.html' + selector: 'ds-browse-by-title-page', + styleUrls: ['../browse-by-metadata-page/browse-by-metadata-page.component.scss'], + templateUrl: '../browse-by-metadata-page/browse-by-metadata-page.component.html', + standalone: true, + imports: [ + VarDirective, + AsyncPipe, + ComcolPageHeaderComponent, + ComcolPageLogoComponent, + NgIf, + ThemedComcolPageHandleComponent, + ComcolPageContentComponent, + DsoEditMenuComponent, + ThemedComcolPageBrowseByComponent, + BrowseByComponent, + TranslateModule, + ThemedLoadingComponent + ], }) /** * Component for browsing items by title (dc.title) diff --git a/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts b/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts index 4a1bcc0bc1..35234d599c 100644 --- a/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts +++ b/src/app/browse-by/browse-by-title-page/themed-browse-by-title-page.component.ts @@ -7,9 +7,10 @@ import {BrowseByDataType, rendersBrowseBy} from '../browse-by-switcher/browse-by * Themed wrapper for BrowseByTitlePageComponent */ @Component({ - selector: 'ds-themed-browse-by-title-page', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-browse-by-title-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) @rendersBrowseBy(BrowseByDataType.Title) diff --git a/src/app/browse-by/browse-by.module.ts b/src/app/browse-by/browse-by.module.ts index c0e2d3f9ff..e82536a9e4 100644 --- a/src/app/browse-by/browse-by.module.ts +++ b/src/app/browse-by/browse-by.module.ts @@ -29,21 +29,19 @@ const ENTRY_COMPONENTS = [ ]; @NgModule({ - imports: [ - SharedBrowseByModule, - CommonModule, - ComcolModule, - DsoPageModule, - FormModule, - ], - declarations: [ - BrowseBySwitcherComponent, - ThemedBrowseBySwitcherComponent, - ...ENTRY_COMPONENTS - ], - exports: [ - BrowseBySwitcherComponent - ] + imports: [ + SharedBrowseByModule, + CommonModule, + ComcolModule, + DsoPageModule, + FormModule, + BrowseBySwitcherComponent, + ThemedBrowseBySwitcherComponent, + ...ENTRY_COMPONENTS + ], + exports: [ + BrowseBySwitcherComponent + ] }) export class BrowseByModule { /** diff --git a/src/app/collection-page/collection-form/collection-form.component.ts b/src/app/collection-page/collection-form/collection-form.component.ts index aae200b401..778fcca12b 100644 --- a/src/app/collection-page/collection-form/collection-form.component.ts +++ b/src/app/collection-page/collection-form/collection-form.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectorRef, Component, Input, OnChanges, OnInit, SimpleChange, SimpleChanges } from '@angular/core'; import { Observable } from 'rxjs'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DynamicFormControlModel, DynamicFormOptionConfig, @@ -23,6 +23,11 @@ import { getFirstSucceededRemoteListPayload } from '../../core/shared/operators' import { collectionFormEntityTypeSelectionConfig, collectionFormModels, } from './collection-form.models'; import { NONE_ENTITY_TYPE } from '../../core/shared/item-relationships/item-type.resource-type'; import { hasNoValue, isNotNull } from 'src/app/shared/empty.util'; +import { FormComponent } from '../../shared/form/form.component'; +import { UploaderComponent } from '../../shared/upload/uploader/uploader.component'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; +import { ComcolPageLogoComponent } from '../../shared/comcol/comcol-page-logo/comcol-page-logo.component'; +import { VarDirective } from '../../shared/utils/var.directive'; /** @@ -31,7 +36,18 @@ import { hasNoValue, isNotNull } from 'src/app/shared/empty.util'; @Component({ selector: 'ds-collection-form', styleUrls: ['../../shared/comcol/comcol-forms/comcol-form/comcol-form.component.scss'], - templateUrl: '../../shared/comcol/comcol-forms/comcol-form/comcol-form.component.html' + templateUrl: '../../shared/comcol/comcol-forms/comcol-form/comcol-form.component.html', + standalone: true, + imports: [ + FormComponent, + TranslateModule, + UploaderComponent, + AsyncPipe, + ComcolPageLogoComponent, + NgIf, + NgClass, + VarDirective + ], }) export class CollectionFormComponent extends ComColFormComponent implements OnInit, OnChanges { /** diff --git a/src/app/collection-page/collection-form/collection-form.module.ts b/src/app/collection-page/collection-form/collection-form.module.ts index ddf18f0586..88debb1957 100644 --- a/src/app/collection-page/collection-form/collection-form.module.ts +++ b/src/app/collection-page/collection-form/collection-form.module.ts @@ -6,17 +6,15 @@ import { ComcolModule } from '../../shared/comcol/comcol.module'; import { FormModule } from '../../shared/form/form.module'; @NgModule({ - imports: [ - ComcolModule, - FormModule, - SharedModule - ], - declarations: [ - CollectionFormComponent, - ], - exports: [ - CollectionFormComponent - ] + imports: [ + ComcolModule, + FormModule, + SharedModule, + CollectionFormComponent + ], + exports: [ + CollectionFormComponent + ] }) export class CollectionFormModule { diff --git a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts index db844b588f..dede5dbdfb 100644 --- a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts +++ b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.spec.ts @@ -168,9 +168,8 @@ describe('CollectionItemMapperComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [CollectionItemMapperComponent, ItemSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, CollectionItemMapperComponent, ItemSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Router, useValue: routerStub }, { provide: SearchConfigurationService, useValue: searchConfigServiceStub }, @@ -186,8 +185,8 @@ describe('CollectionItemMapperComponent', () => { { provide: GroupDataService, useValue: groupDataService }, { provide: LinkHeadService, useValue: linkHeadService }, { provide: ConfigurationDataService, useValue: configurationDataService }, - ] - }).overrideComponent(CollectionItemMapperComponent, { + ] +}).overrideComponent(CollectionItemMapperComponent, { set: { providers: [ { diff --git a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts index e0e4aaf930..11b788450f 100644 --- a/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts +++ b/src/app/collection-page/collection-item-mapper/collection-item-mapper.component.ts @@ -20,7 +20,7 @@ import { DSpaceObjectType } from '../../core/shared/dspace-object-type.model'; import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { ItemDataService } from '../../core/data/item-data.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { CollectionDataService } from '../../core/data/collection-data.service'; import { isNotEmpty } from '../../shared/empty.util'; import { SEARCH_CONFIG_SERVICE } from '../../my-dspace-page/my-dspace-page.component'; @@ -30,6 +30,10 @@ import { SearchService } from '../../core/shared/search/search.service'; import { followLink } from '../../shared/utils/follow-link-config.model'; import { NoContent } from '../../core/shared/NoContent.model'; import { FeatureID } from '../../core/data/feature-authorization/feature-id'; +import { ThemedSearchFormComponent } from '../../shared/search-form/themed-search-form.component'; +import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ItemSelectComponent } from '../../shared/object-select/item-select/item-select.component'; @Component({ selector: 'ds-collection-item-mapper', @@ -45,7 +49,16 @@ import { FeatureID } from '../../core/data/feature-authorization/feature-id'; provide: SEARCH_CONFIG_SERVICE, useClass: SearchConfigurationService } - ] + ], + imports: [ + ThemedSearchFormComponent, + NgbNavModule, + TranslateModule, + AsyncPipe, + ItemSelectComponent, + NgIf + ], + standalone: true }) /** * Component used to map items to a collection diff --git a/src/app/collection-page/collection-page.component.ts b/src/app/collection-page/collection-page.component.ts index 16704cef52..512c840791 100644 --- a/src/app/collection-page/collection-page.component.ts +++ b/src/app/collection-page/collection-page.component.ts @@ -31,6 +31,26 @@ import { redirectOn4xx } from '../core/shared/authorized.operators'; import { BROWSE_LINKS_TO_FOLLOW } from '../core/browse/browse.service'; import { DSONameService } from '../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../src/config/app-config.interface'; +import { ComcolPageContentComponent } from '../shared/comcol/comcol-page-content/comcol-page-content.component'; +import { ErrorComponent } from '../shared/error/error.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ThemedLoadingComponent } from '../shared/loading/themed-loading.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ViewTrackerComponent } from '../statistics/angulartics/dspace/view-tracker.component'; +import { VarDirective } from '../shared/utils/var.directive'; +import { ComcolPageHeaderComponent } from '../shared/comcol/comcol-page-header/comcol-page-header.component'; +import { ComcolPageLogoComponent } from '../shared/comcol/comcol-page-logo/comcol-page-logo.component'; +import { + ThemedComcolPageHandleComponent +} from '../shared/comcol/comcol-page-handle/themed-comcol-page-handle.component'; +import { DsoEditMenuComponent } from '../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { + DsoPageSubscriptionButtonComponent +} from '../shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component'; +import { + ThemedComcolPageBrowseByComponent +} from '../shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component'; +import { ObjectCollectionComponent } from '../shared/object-collection/object-collection.component'; @Component({ selector: 'ds-collection-page', @@ -40,7 +60,25 @@ import { APP_CONFIG, AppConfig } from '../../../src/config/app-config.interface' animations: [ fadeIn, fadeInOut - ] + ], + imports: [ + ComcolPageContentComponent, + ErrorComponent, + NgIf, + ThemedLoadingComponent, + TranslateModule, + ViewTrackerComponent, + VarDirective, + AsyncPipe, + ComcolPageHeaderComponent, + ComcolPageLogoComponent, + ThemedComcolPageHandleComponent, + DsoEditMenuComponent, + DsoPageSubscriptionButtonComponent, + ThemedComcolPageBrowseByComponent, + ObjectCollectionComponent + ], + standalone: true }) export class CollectionPageComponent implements OnInit { collectionRD$: Observable>; diff --git a/src/app/collection-page/collection-page.module.ts b/src/app/collection-page/collection-page.module.ts index 6bcefed2b7..ba908f9fcc 100644 --- a/src/app/collection-page/collection-page.module.ts +++ b/src/app/collection-page/collection-page.module.ts @@ -20,29 +20,27 @@ import { DsoSharedModule } from '../dso-shared/dso-shared.module'; import { DsoPageModule } from '../shared/dso-page/dso-page.module'; @NgModule({ - imports: [ - CommonModule, - SharedModule, - CollectionPageRoutingModule, - StatisticsModule.forRoot(), - EditItemPageModule, - CollectionFormModule, - ComcolModule, - DsoSharedModule, - DsoPageModule, - ], - declarations: [ - CollectionPageComponent, - ThemedCollectionPageComponent, - CreateCollectionPageComponent, - DeleteCollectionPageComponent, - EditItemTemplatePageComponent, - ThemedEditItemTemplatePageComponent, - CollectionItemMapperComponent - ], - providers: [ - SearchService, - ], + imports: [ + CommonModule, + SharedModule, + CollectionPageRoutingModule, + StatisticsModule.forRoot(), + EditItemPageModule, + CollectionFormModule, + ComcolModule, + DsoSharedModule, + DsoPageModule, + CollectionPageComponent, + ThemedCollectionPageComponent, + CreateCollectionPageComponent, + DeleteCollectionPageComponent, + EditItemTemplatePageComponent, + ThemedEditItemTemplatePageComponent, + CollectionItemMapperComponent + ], + providers: [ + SearchService, + ] }) export class CollectionPageModule { diff --git a/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts b/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts index 5a4295cb26..d062f39e95 100644 --- a/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts +++ b/src/app/collection-page/create-collection-page/create-collection-page.component.spec.ts @@ -22,22 +22,21 @@ describe('CreateCollectionPageComponent', () => { beforeEach(waitForAsync(() => { return TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [CreateCollectionPageComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, CreateCollectionPageComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: CollectionDataService, useValue: {} }, { - provide: CommunityDataService, - useValue: { findById: () => observableOf({ payload: { name: 'test' } }) } + provide: CommunityDataService, + useValue: { findById: () => observableOf({ payload: { name: 'test' } }) } }, { provide: RouteService, useValue: { getQueryParameterValue: () => observableOf('1234') } }, { provide: Router, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, - { provide: RequestService, useValue: {}} - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + { provide: RequestService, useValue: {} } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/create-collection-page/create-collection-page.component.ts b/src/app/collection-page/create-collection-page/create-collection-page.component.ts index a8cf594c3b..6ce30a1848 100644 --- a/src/app/collection-page/create-collection-page/create-collection-page.component.ts +++ b/src/app/collection-page/create-collection-page/create-collection-page.component.ts @@ -6,9 +6,11 @@ import { CreateComColPageComponent } from '../../shared/comcol/comcol-forms/crea import { Collection } from '../../core/shared/collection.model'; import { CollectionDataService } from '../../core/data/collection-data.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { RequestService } from '../../core/data/request.service'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { CollectionFormComponent } from '../collection-form/collection-form.component'; +import { AsyncPipe } from '@angular/common'; /** * Component that represents the page where a user can create a new Collection @@ -16,7 +18,13 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; @Component({ selector: 'ds-create-collection', styleUrls: ['./create-collection-page.component.scss'], - templateUrl: './create-collection-page.component.html' + templateUrl: './create-collection-page.component.html', + imports: [ + CollectionFormComponent, + TranslateModule, + AsyncPipe + ], + standalone: true }) export class CreateCollectionPageComponent extends CreateComColPageComponent { protected frontendURL = '/collections/'; diff --git a/src/app/collection-page/delete-collection-page/delete-collection-page.component.spec.ts b/src/app/collection-page/delete-collection-page/delete-collection-page.component.spec.ts index 9fc88932d0..b95b8958fb 100644 --- a/src/app/collection-page/delete-collection-page/delete-collection-page.component.spec.ts +++ b/src/app/collection-page/delete-collection-page/delete-collection-page.component.spec.ts @@ -19,17 +19,16 @@ describe('DeleteCollectionPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [DeleteCollectionPageComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, DeleteCollectionPageComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: CollectionDataService, useValue: {} }, { provide: ActivatedRoute, useValue: { data: observableOf({ dso: { payload: {} } }) } }, { provide: NotificationsService, useValue: {} }, { provide: RequestService, useValue: {} } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts b/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts index 0a1b87e58b..20f676ff02 100644 --- a/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts +++ b/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts @@ -4,8 +4,10 @@ import { DeleteComColPageComponent } from '../../shared/comcol/comcol-forms/dele import { NotificationsService } from '../../shared/notifications/notifications.service'; import { CollectionDataService } from '../../core/data/collection-data.service'; import { Collection } from '../../core/shared/collection.model'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * Component that represents the page where a user can delete an existing Collection @@ -13,7 +15,14 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; @Component({ selector: 'ds-delete-collection', styleUrls: ['./delete-collection-page.component.scss'], - templateUrl: './delete-collection-page.component.html' + templateUrl: './delete-collection-page.component.html', + imports: [ + TranslateModule, + AsyncPipe, + NgIf, + VarDirective + ], + standalone: true }) export class DeleteCollectionPageComponent extends DeleteComColPageComponent { protected frontendURL = '/collections/'; diff --git a/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.spec.ts index 04da8bbcd9..5eaa42077b 100644 --- a/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.spec.ts @@ -8,8 +8,8 @@ xdescribe('CollectionAccessControlComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ CollectionAccessControlComponent ] - }) + imports: [CollectionAccessControlComponent] +}) .compileComponents(); }); diff --git a/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.ts b/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.ts index 4192fe5a9a..17cfbf3bfd 100644 --- a/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-access-control/collection-access-control.component.ts @@ -5,11 +5,21 @@ import { Community } from '../../../core/shared/community.model'; import { ActivatedRoute } from '@angular/router'; import { map } from 'rxjs/operators'; import { getFirstSucceededRemoteData } from '../../../core/shared/operators'; +import { + AccessControlFormContainerComponent +} from '../../../shared/access-control-form-container/access-control-form-container.component'; +import { AsyncPipe, NgIf } from '@angular/common'; @Component({ selector: 'ds-collection-access-control', templateUrl: './collection-access-control.component.html', styleUrls: ['./collection-access-control.component.scss'], + imports: [ + AccessControlFormContainerComponent, + NgIf, + AsyncPipe + ], + standalone: true }) export class CollectionAccessControlComponent implements OnInit { itemRD$: Observable>; diff --git a/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.spec.ts index c8e529443a..8127a3b6e8 100644 --- a/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.spec.ts @@ -37,17 +37,17 @@ describe('CollectionAuthorizationsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule - ], - declarations: [CollectionAuthorizationsComponent], - providers: [ + imports: [ + CommonModule, + CollectionAuthorizationsComponent + ], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, ChangeDetectorRef, CollectionAuthorizationsComponent, - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.ts b/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.ts index d1b59a0c90..3c84c4ccbb 100644 --- a/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-authorizations/collection-authorizations.component.ts @@ -6,10 +6,17 @@ import { first, map } from 'rxjs/operators'; import { RemoteData } from '../../../core/data/remote-data'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; +import { ResourcePoliciesComponent } from '../../../shared/resource-policies/resource-policies.component'; +import { AsyncPipe } from '@angular/common'; @Component({ selector: 'ds-collection-authorizations', templateUrl: './collection-authorizations.component.html', + imports: [ + ResourcePoliciesComponent, + AsyncPipe + ], + standalone: true }) /** * Component that handles the Collection Authorizations diff --git a/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts index 2cf25734e1..ea292747e5 100644 --- a/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.spec.ts @@ -34,14 +34,13 @@ describe('CollectionCurateComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [CollectionCurateComponent], - providers: [ - {provide: ActivatedRoute, useValue: routeStub}, - {provide: DSONameService, useValue: dsoNameService} - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), CollectionCurateComponent], + providers: [ + { provide: ActivatedRoute, useValue: routeStub }, + { provide: DSONameService, useValue: dsoNameService } + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.ts b/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.ts index e20f229cd6..2a09a6e00f 100644 --- a/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-curate/collection-curate.component.ts @@ -6,6 +6,9 @@ import { ActivatedRoute } from '@angular/router'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { Collection } from '../../../core/shared/collection.model'; import { hasValue } from '../../../shared/empty.util'; +import { CurationFormComponent } from '../../../curation-form/curation-form.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe } from '@angular/common'; /** * Component for managing a collection's curation tasks @@ -13,6 +16,12 @@ import { hasValue } from '../../../shared/empty.util'; @Component({ selector: 'ds-collection-curate', templateUrl: './collection-curate.component.html', + imports: [ + CurationFormComponent, + TranslateModule, + AsyncPipe + ], + standalone: true }) export class CollectionCurateComponent { dsoRD$: Observable>; diff --git a/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts index 7cc54bd994..e9575a15ba 100644 --- a/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.spec.ts @@ -59,18 +59,17 @@ describe('CollectionMetadataComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [CollectionMetadataComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, CollectionMetadataComponent], + providers: [ { provide: CollectionDataService, useValue: {} }, { provide: ItemTemplateDataService, useValue: itemTemplateServiceStub }, { provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } } }, { provide: NotificationsService, useValue: notificationsService }, { provide: RequestService, useValue: requestService }, - { provide: Router, useValue: routerMock} - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + { provide: Router, useValue: routerMock } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.ts b/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.ts index 634363527f..0d075d6db9 100644 --- a/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-metadata/collection-metadata.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { ComcolMetadataComponent } from '../../../shared/comcol/comcol-forms/edit-comcol-page/comcol-metadata/comcol-metadata.component'; import { Collection } from '../../../core/shared/collection.model'; import { CollectionDataService } from '../../../core/data/collection-data.service'; -import { ActivatedRoute, NavigationEnd, Router, Scroll } from '@angular/router'; +import { ActivatedRoute, NavigationEnd, Router, RouterLink, Scroll } from '@angular/router'; import { ItemTemplateDataService } from '../../../core/data/item-template-data.service'; import { combineLatest as combineLatestObservable, Observable } from 'rxjs'; import { RemoteData } from '../../../core/data/remote-data'; @@ -10,11 +10,14 @@ import { Item } from '../../../core/shared/item.model'; import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators'; import { map, switchMap } from 'rxjs/operators'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { RequestService } from '../../../core/data/request.service'; import { getCollectionItemTemplateRoute } from '../../collection-page-routing-paths'; import { NoContent } from '../../../core/shared/NoContent.model'; import { hasValue } from '../../../shared/empty.util'; +import { CollectionFormComponent } from '../../collection-form/collection-form.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../../shared/utils/var.directive'; /** * Component for editing a collection's metadata @@ -22,6 +25,15 @@ import { hasValue } from '../../../shared/empty.util'; @Component({ selector: 'ds-collection-metadata', templateUrl: './collection-metadata.component.html', + imports: [ + CollectionFormComponent, + RouterLink, + AsyncPipe, + TranslateModule, + NgIf, + VarDirective + ], + standalone: true }) export class CollectionMetadataComponent extends ComcolMetadataComponent implements OnInit { protected frontendURL = '/collections/'; diff --git a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts index c375a23ddf..fd75a00173 100644 --- a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.spec.ts @@ -69,25 +69,23 @@ describe('CollectionRolesComponent', () => { }; TestBed.configureTestingModule({ - imports: [ + imports: [ ComcolModule, SharedModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), - NoopAnimationsModule - ], - declarations: [ - CollectionRolesComponent, - ], - providers: [ + NoopAnimationsModule, + CollectionRolesComponent + ], + providers: [ { provide: ActivatedRoute, useValue: route }, { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: RequestService, useValue: requestService }, { provide: GroupDataService, useValue: groupDataService }, { provide: NotificationsService, useClass: NotificationsServiceStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); fixture = TestBed.createComponent(CollectionRolesComponent); comp = fixture.componentInstance; diff --git a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts index 0177cc3a38..7049168eeb 100644 --- a/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-roles/collection-roles.component.ts @@ -7,6 +7,10 @@ import { Collection } from '../../../core/shared/collection.model'; import { getRemoteDataPayload, getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { HALLink } from '../../../core/shared/hal-link.model'; import { hasValue } from '../../../shared/empty.util'; +import { + ComcolRoleComponent +} from '../../../shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component'; +import { AsyncPipe, NgForOf } from '@angular/common'; /** * Component for managing a collection's roles @@ -14,6 +18,12 @@ import { hasValue } from '../../../shared/empty.util'; @Component({ selector: 'ds-collection-roles', templateUrl: './collection-roles.component.html', + imports: [ + ComcolRoleComponent, + NgForOf, + AsyncPipe + ], + standalone: true }) export class CollectionRolesComponent implements OnInit { diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts index 3eb83ebe8a..54af5296e7 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts @@ -99,19 +99,18 @@ describe('CollectionSourceControlsComponent', () => { requestService = jasmine.createSpyObj('requestService', ['removeByHrefSubstring', 'setStaleByHrefSubstring']); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule], - declarations: [CollectionSourceControlsComponent, VarDirective], - providers: [ - {provide: ScriptDataService, useValue: scriptDataService}, - {provide: ProcessDataService, useValue: processDataService}, - {provide: RequestService, useValue: requestService}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: CollectionDataService, useValue: collectionService}, - {provide: HttpClient, useValue: httpClient}, - {provide: BitstreamDataService, useValue: bitstreamService} - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), RouterTestingModule, CollectionSourceControlsComponent, VarDirective], + providers: [ + { provide: ScriptDataService, useValue: scriptDataService }, + { provide: ProcessDataService, useValue: processDataService }, + { provide: RequestService, useValue: requestService }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: CollectionDataService, useValue: collectionService }, + { provide: HttpClient, useValue: httpClient }, + { provide: BitstreamDataService, useValue: bitstreamService } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(CollectionSourceControlsComponent); diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts index 7113c25e9f..f96fad0187 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts @@ -17,10 +17,12 @@ import { NotificationsService } from '../../../../shared/notifications/notificat import { Collection } from '../../../../core/shared/collection.model'; import { CollectionDataService } from '../../../../core/data/collection-data.service'; import { Process } from '../../../../process-page/processes/process.model'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { HttpClient } from '@angular/common/http'; import { BitstreamDataService } from '../../../../core/data/bitstream-data.service'; import { ContentSourceSetSerializer } from '../../../../core/shared/content-source-set-serializer'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../../../shared/utils/var.directive'; /** * Component that contains the controls to run, reset and test the harvest @@ -29,6 +31,13 @@ import { ContentSourceSetSerializer } from '../../../../core/shared/content-sour selector: 'ds-collection-source-controls', styleUrls: ['./collection-source-controls.component.scss'], templateUrl: './collection-source-controls.component.html', + imports: [ + TranslateModule, + AsyncPipe, + NgIf, + VarDirective + ], + standalone: true }) export class CollectionSourceControlsComponent implements OnDestroy { diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts index e7e98d9523..529488a718 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.spec.ts @@ -119,9 +119,8 @@ describe('CollectionSourceComponent', () => { requestService = jasmine.createSpyObj('requestService', ['removeByHrefSubstring', 'setStaleByHrefSubstring']); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule], - declarations: [CollectionSourceComponent], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule, CollectionSourceComponent], + providers: [ { provide: ObjectUpdatesService, useValue: objectUpdatesService }, { provide: NotificationsService, useValue: notificationsService }, { provide: Location, useValue: location }, @@ -130,9 +129,9 @@ describe('CollectionSourceComponent', () => { { provide: Router, useValue: router }, { provide: CollectionDataService, useValue: collectionService }, { provide: RequestService, useValue: requestService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts index 2d1308cc83..4a77e1ac4a 100644 --- a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts +++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts @@ -10,8 +10,8 @@ import { DynamicRadioGroupModel, DynamicSelectModel } from '@ng-dynamic-forms/core'; -import { Location } from '@angular/common'; -import { TranslateService } from '@ngx-translate/core'; +import { AsyncPipe, Location, NgIf } from '@angular/common'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { UntypedFormGroup } from '@angular/forms'; @@ -31,6 +31,9 @@ import { RequestService } from '../../../core/data/request.service'; import { environment } from '../../../../environments/environment'; import { FieldUpdate } from '../../../core/data/object-updates/field-update.model'; import { FieldUpdates } from '../../../core/data/object-updates/field-updates.model'; +import { ThemedLoadingComponent } from "../../../shared/loading/themed-loading.component"; +import { FormComponent } from "../../../shared/form/form.component"; +import { CollectionSourceControlsComponent } from "./collection-source-controls/collection-source-controls.component"; /** * Component for managing the content source of the collection @@ -38,6 +41,15 @@ import { FieldUpdates } from '../../../core/data/object-updates/field-updates.mo @Component({ selector: 'ds-collection-source', templateUrl: './collection-source.component.html', + imports: [ + AsyncPipe, + TranslateModule, + NgIf, + ThemedLoadingComponent, + FormComponent, + CollectionSourceControlsComponent + ], + standalone: true }) export class CollectionSourceComponent extends AbstractTrackableComponent implements OnInit, OnDestroy { /** diff --git a/src/app/collection-page/edit-collection-page/edit-collection-page.component.spec.ts b/src/app/collection-page/edit-collection-page/edit-collection-page.component.spec.ts index 00f05f50c0..c60a34f8b9 100644 --- a/src/app/collection-page/edit-collection-page/edit-collection-page.component.spec.ts +++ b/src/app/collection-page/edit-collection-page/edit-collection-page.component.spec.ts @@ -38,14 +38,13 @@ describe('EditCollectionPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [EditCollectionPageComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, EditCollectionPageComponent], + providers: [ { provide: CollectionDataService, useValue: {} }, { provide: ActivatedRoute, useValue: routeStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/edit-collection-page/edit-collection-page.component.ts b/src/app/collection-page/edit-collection-page/edit-collection-page.component.ts index 62fbb3ee3d..da037696b7 100644 --- a/src/app/collection-page/edit-collection-page/edit-collection-page.component.ts +++ b/src/app/collection-page/edit-collection-page/edit-collection-page.component.ts @@ -1,15 +1,27 @@ import { Component } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink, RouterOutlet } from '@angular/router'; import { EditComColPageComponent } from '../../shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component'; import { Collection } from '../../core/shared/collection.model'; import { getCollectionPageRoute } from '../collection-page-routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; /** * Component that represents the page where a user can edit an existing Collection */ @Component({ selector: 'ds-edit-collection', - templateUrl: '../../shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.html' + templateUrl: '../../shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.html', + imports: [ + RouterLink, + TranslateModule, + NgClass, + NgForOf, + RouterOutlet, + NgIf, + AsyncPipe + ], + standalone: true }) export class EditCollectionPageComponent extends EditComColPageComponent { type = 'collection'; diff --git a/src/app/collection-page/edit-collection-page/edit-collection-page.module.ts b/src/app/collection-page/edit-collection-page/edit-collection-page.module.ts index 8d0cb179f1..adaa964a7c 100644 --- a/src/app/collection-page/edit-collection-page/edit-collection-page.module.ts +++ b/src/app/collection-page/edit-collection-page/edit-collection-page.module.ts @@ -22,26 +22,24 @@ import { AccessControlFormModule } from '../../shared/access-control-form-contai * Module that contains all components related to the Edit Collection page administrator functionality */ @NgModule({ - imports: [ - CommonModule, - SharedModule, - EditCollectionPageRoutingModule, - CollectionFormModule, - ResourcePoliciesModule, - FormModule, - ComcolModule, - AccessControlFormModule, - ], - declarations: [ - EditCollectionPageComponent, - CollectionMetadataComponent, - CollectionRolesComponent, - CollectionCurateComponent, - CollectionSourceComponent, - CollectionAccessControlComponent, - CollectionSourceControlsComponent, - CollectionAuthorizationsComponent - ] + imports: [ + CommonModule, + SharedModule, + EditCollectionPageRoutingModule, + CollectionFormModule, + ResourcePoliciesModule, + FormModule, + ComcolModule, + AccessControlFormModule, + EditCollectionPageComponent, + CollectionMetadataComponent, + CollectionRolesComponent, + CollectionCurateComponent, + CollectionSourceComponent, + CollectionAccessControlComponent, + CollectionSourceControlsComponent, + CollectionAuthorizationsComponent + ] }) export class EditCollectionPageModule { diff --git a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts index 72b776dd7d..248c70758b 100644 --- a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts +++ b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.spec.ts @@ -28,14 +28,13 @@ describe('EditItemTemplatePageComponent', () => { findByCollectionID: createSuccessfulRemoteDataObject$({}) }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [EditItemTemplatePageComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, EditItemTemplatePageComponent], + providers: [ { provide: ItemTemplateDataService, useValue: itemTemplateService }, { provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: createSuccessfulRemoteDataObject(collection) }) } } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts index 238ec5e37a..6c42e5420a 100644 --- a/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts +++ b/src/app/collection-page/edit-item-template-page/edit-item-template-page.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { RemoteData } from '../../core/data/remote-data'; import { Collection } from '../../core/shared/collection.model'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { first, map, switchMap } from 'rxjs/operators'; import { ItemTemplateDataService } from '../../core/data/item-template-data.service'; import { getCollectionEditRoute } from '../collection-page-routing-paths'; @@ -10,10 +10,27 @@ import { Item } from '../../core/shared/item.model'; import { getFirstSucceededRemoteDataPayload } from '../../core/shared/operators'; import { AlertType } from '../../shared/alert/alert-type'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { ThemedDsoEditMetadataComponent } from '../../dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { AlertComponent } from '../../shared/alert/alert.component'; @Component({ selector: 'ds-edit-item-template-page', templateUrl: './edit-item-template-page.component.html', + imports: [ + ThemedDsoEditMetadataComponent, + RouterLink, + AsyncPipe, + VarDirective, + NgIf, + TranslateModule, + ThemedLoadingComponent, + AlertComponent + ], + standalone: true }) /** * Component for editing the item template of a collection diff --git a/src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts b/src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts index b53f4e6c45..4679c0e18d 100644 --- a/src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts +++ b/src/app/collection-page/edit-item-template-page/themed-edit-item-template-page.component.ts @@ -3,9 +3,10 @@ import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { EditItemTemplatePageComponent } from './edit-item-template-page.component'; @Component({ - selector: 'ds-themed-edit-item-template-page', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-edit-item-template-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) /** * Component for editing the item template of a collection diff --git a/src/app/collection-page/themed-collection-page.component.ts b/src/app/collection-page/themed-collection-page.component.ts index 2faf418423..fab3bfa83d 100644 --- a/src/app/collection-page/themed-collection-page.component.ts +++ b/src/app/collection-page/themed-collection-page.component.ts @@ -6,9 +6,10 @@ import { CollectionPageComponent } from './collection-page.component'; * Themed wrapper for CollectionPageComponent */ @Component({ - selector: 'ds-themed-collection-page', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-collection-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCollectionPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/community-list-page/community-list-page.component.spec.ts b/src/app/community-list-page/community-list-page.component.spec.ts index 080a0a9e18..0e1230a412 100644 --- a/src/app/community-list-page/community-list-page.component.spec.ts +++ b/src/app/community-list-page/community-list-page.component.spec.ts @@ -11,20 +11,20 @@ describe('CommunityListPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + }, }), - ], - declarations: [CommunityListPageComponent], - providers: [ + CommunityListPageComponent + ], + providers: [ CommunityListPageComponent, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA], - }) + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/community-list-page/community-list-page.component.ts b/src/app/community-list-page/community-list-page.component.ts index 5ab3cce5de..a2e511f8a9 100644 --- a/src/app/community-list-page/community-list-page.component.ts +++ b/src/app/community-list-page/community-list-page.component.ts @@ -1,12 +1,16 @@ import { Component } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedCommunityListComponent } from './community-list/themed-community-list.component'; /** * Page with title and the community list tree, as described in community-list.component; * navigated to with community-list.page.routing.module */ @Component({ - selector: 'ds-community-list-page', - templateUrl: './community-list-page.component.html', + selector: 'ds-community-list-page', + templateUrl: './community-list-page.component.html', + standalone: true, + imports: [ThemedCommunityListComponent, TranslateModule] }) export class CommunityListPageComponent { diff --git a/src/app/community-list-page/community-list-page.module.ts b/src/app/community-list-page/community-list-page.module.ts index 15946b2e89..73b7ed6421 100644 --- a/src/app/community-list-page/community-list-page.module.ts +++ b/src/app/community-list-page/community-list-page.module.ts @@ -19,19 +19,17 @@ const DECLARATIONS = [ * The page which houses a title and the community list, as described in community-list.component */ @NgModule({ - imports: [ - CommonModule, - SharedModule, - CommunityListPageRoutingModule, - CdkTreeModule, - ], - declarations: [ - ...DECLARATIONS - ], - exports: [ - ...DECLARATIONS, - CdkTreeModule, - ], + imports: [ + CommonModule, + SharedModule, + CommunityListPageRoutingModule, + CdkTreeModule, + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS, + CdkTreeModule, + ] }) export class CommunityListPageModule { diff --git a/src/app/community-list-page/community-list/community-list.component.spec.ts b/src/app/community-list-page/community-list/community-list.component.spec.ts index ce6b27dbeb..78dec6dffe 100644 --- a/src/app/community-list-page/community-list/community-list.component.spec.ts +++ b/src/app/community-list-page/community-list/community-list.component.spec.ts @@ -186,21 +186,22 @@ describe('CommunityListComponent', () => { } }; TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + }, }), CdkTreeModule, RouterTestingModule, - RouterLinkWithHref], - declarations: [CommunityListComponent], - providers: [CommunityListComponent, + RouterLinkWithHref, + CommunityListComponent + ], + providers: [CommunityListComponent, { provide: CommunityListService, useValue: communityListServiceStub },], - schemas: [CUSTOM_ELEMENTS_SCHEMA], - }) + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/community-list-page/community-list/community-list.component.ts b/src/app/community-list-page/community-list/community-list.component.ts index 90dd6b3c05..ba5adc5116 100644 --- a/src/app/community-list-page/community-list/community-list.component.ts +++ b/src/app/community-list-page/community-list/community-list.component.ts @@ -1,13 +1,19 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { take } from 'rxjs/operators'; import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; -import { CommunityListService} from '../community-list-service'; +import { CommunityListService } from '../community-list-service'; import { CommunityListDatasource } from '../community-list-datasource'; -import { FlatTreeControl } from '@angular/cdk/tree'; +import { CdkTreeModule, FlatTreeControl } from '@angular/cdk/tree'; import { isEmpty } from '../../shared/empty.util'; import { FlatNode } from '../flat-node.model'; import { FindListOptions } from '../../core/data/find-list-options.model'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../shared/truncatable/truncatable.component'; +import { RouterLink } from '@angular/router'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; /** * A tree-structured list of nodes representing the communities, their subCommunities and collections. @@ -19,6 +25,8 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; @Component({ selector: 'ds-community-list', templateUrl: './community-list.component.html', + standalone: true, + imports: [NgIf, ThemedLoadingComponent, CdkTreeModule, NgClass, RouterLink, TruncatableComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) export class CommunityListComponent implements OnInit, OnDestroy { diff --git a/src/app/community-list-page/community-list/themed-community-list.component.ts b/src/app/community-list-page/community-list/themed-community-list.component.ts index 4a986e737c..62f4cb306a 100644 --- a/src/app/community-list-page/community-list/themed-community-list.component.ts +++ b/src/app/community-list-page/community-list/themed-community-list.component.ts @@ -4,9 +4,10 @@ import { Component } from '@angular/core'; @Component({ - selector: 'ds-themed-community-list', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-community-list', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCommunityListComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/community-list-page/themed-community-list-page.component.ts b/src/app/community-list-page/themed-community-list-page.component.ts index 20fa97bedd..8b0cb4e281 100644 --- a/src/app/community-list-page/themed-community-list-page.component.ts +++ b/src/app/community-list-page/themed-community-list-page.component.ts @@ -6,9 +6,10 @@ import { CommunityListPageComponent } from './community-list-page.component'; * Themed wrapper for CommunityListPageComponent */ @Component({ - selector: 'ds-themed-community-list-page', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-community-list-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCommunityListPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/community-page/community-form/community-form.component.ts b/src/app/community-page/community-form/community-form.component.ts index fa4809738d..c718ec6ef8 100644 --- a/src/app/community-page/community-form/community-form.component.ts +++ b/src/app/community-page/community-form/community-form.component.ts @@ -7,13 +7,18 @@ import { } from '@ng-dynamic-forms/core'; import { Community } from '../../core/shared/community.model'; import { ComColFormComponent } from '../../shared/comcol/comcol-forms/comcol-form/comcol-form.component'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { CommunityDataService } from '../../core/data/community-data.service'; import { AuthService } from '../../core/auth/auth.service'; import { RequestService } from '../../core/data/request.service'; import { ObjectCacheService } from '../../core/cache/object-cache.service'; import { environment } from '../../../environments/environment'; +import { FormComponent } from '../../shared/form/form.component'; +import { UploaderComponent } from '../../shared/upload/uploader/uploader.component'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; +import { ComcolPageLogoComponent } from '../../shared/comcol/comcol-page-logo/comcol-page-logo.component'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * Form used for creating and editing communities @@ -21,7 +26,18 @@ import { environment } from '../../../environments/environment'; @Component({ selector: 'ds-community-form', styleUrls: ['../../shared/comcol/comcol-forms/comcol-form/comcol-form.component.scss'], - templateUrl: '../../shared/comcol/comcol-forms/comcol-form/comcol-form.component.html' + templateUrl: '../../shared/comcol/comcol-forms/comcol-form/comcol-form.component.html', + standalone: true, + imports: [ + FormComponent, + TranslateModule, + UploaderComponent, + AsyncPipe, + ComcolPageLogoComponent, + NgIf, + NgClass, + VarDirective + ], }) export class CommunityFormComponent extends ComColFormComponent implements OnChanges { /** diff --git a/src/app/community-page/community-form/community-form.module.ts b/src/app/community-page/community-form/community-form.module.ts index 925d218973..a8bddb5ffe 100644 --- a/src/app/community-page/community-form/community-form.module.ts +++ b/src/app/community-page/community-form/community-form.module.ts @@ -6,17 +6,15 @@ import { ComcolModule } from '../../shared/comcol/comcol.module'; import { FormModule } from '../../shared/form/form.module'; @NgModule({ - imports: [ - ComcolModule, - FormModule, - SharedModule - ], - declarations: [ - CommunityFormComponent, - ], - exports: [ - CommunityFormComponent - ] + imports: [ + ComcolModule, + FormModule, + SharedModule, + CommunityFormComponent + ], + exports: [ + CommunityFormComponent + ] }) export class CommunityFormModule { diff --git a/src/app/community-page/community-page.component.ts b/src/app/community-page/community-page.component.ts index a5bbff3cee..9dd045957a 100644 --- a/src/app/community-page/community-page.component.ts +++ b/src/app/community-page/community-page.component.ts @@ -20,13 +20,57 @@ import { FeatureID } from '../core/data/feature-authorization/feature-id'; import { getCommunityPageRoute } from './community-page-routing-paths'; import { redirectOn4xx } from '../core/shared/authorized.operators'; import { DSONameService } from '../core/breadcrumbs/dso-name.service'; +import { ComcolPageContentComponent } from '../shared/comcol/comcol-page-content/comcol-page-content.component'; +import { ErrorComponent } from '../shared/error/error.component'; +import { ThemedLoadingComponent } from '../shared/loading/themed-loading.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { + ThemedCommunityPageSubCommunityListComponent +} from './sub-community-list/themed-community-page-sub-community-list.component'; +import { + ThemedCollectionPageSubCollectionListComponent +} from './sub-collection-list/themed-community-page-sub-collection-list.component'; +import { + ThemedComcolPageBrowseByComponent +} from '../shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component'; +import { DsoEditMenuComponent } from '../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { + DsoPageSubscriptionButtonComponent +} from '../shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component'; +import { + ThemedComcolPageHandleComponent +} from '../shared/comcol/comcol-page-handle/themed-comcol-page-handle.component'; +import { ComcolPageLogoComponent } from '../shared/comcol/comcol-page-logo/comcol-page-logo.component'; +import { ComcolPageHeaderComponent } from '../shared/comcol/comcol-page-header/comcol-page-header.component'; +import { ViewTrackerComponent } from '../statistics/angulartics/dspace/view-tracker.component'; +import { VarDirective } from '../shared/utils/var.directive'; @Component({ selector: 'ds-community-page', styleUrls: ['./community-page.component.scss'], templateUrl: './community-page.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - animations: [fadeInOut] + animations: [fadeInOut], + imports: [ + ComcolPageContentComponent, + ErrorComponent, + ThemedLoadingComponent, + NgIf, + TranslateModule, + ThemedCommunityPageSubCommunityListComponent, + ThemedCollectionPageSubCollectionListComponent, + ThemedComcolPageBrowseByComponent, + DsoEditMenuComponent, + DsoPageSubscriptionButtonComponent, + ThemedComcolPageHandleComponent, + ComcolPageLogoComponent, + ComcolPageHeaderComponent, + AsyncPipe, + ViewTrackerComponent, + VarDirective + ], + standalone: true }) /** * This component represents a detail page for a single community diff --git a/src/app/community-page/community-page.module.ts b/src/app/community-page/community-page.module.ts index 45ffb2a786..d997351bca 100644 --- a/src/app/community-page/community-page.module.ts +++ b/src/app/community-page/community-page.module.ts @@ -31,21 +31,19 @@ const DECLARATIONS = [CommunityPageComponent, DeleteCommunityPageComponent]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - CommunityPageRoutingModule, - StatisticsModule.forRoot(), - CommunityFormModule, - ComcolModule, - DsoPageModule, - ], - declarations: [ - ...DECLARATIONS - ], - exports: [ - ...DECLARATIONS - ] + imports: [ + CommonModule, + SharedModule, + CommunityPageRoutingModule, + StatisticsModule.forRoot(), + CommunityFormModule, + ComcolModule, + DsoPageModule, + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS + ] }) export class CommunityPageModule { diff --git a/src/app/community-page/create-community-page/create-community-page.component.spec.ts b/src/app/community-page/create-community-page/create-community-page.component.spec.ts index fbff82efd8..55681a0509 100644 --- a/src/app/community-page/create-community-page/create-community-page.component.spec.ts +++ b/src/app/community-page/create-community-page/create-community-page.component.spec.ts @@ -19,17 +19,16 @@ describe('CreateCommunityPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [CreateCommunityPageComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, CreateCommunityPageComponent], + providers: [ { provide: CommunityDataService, useValue: { findById: () => observableOf({}) } }, { provide: RouteService, useValue: { getQueryParameterValue: () => observableOf('1234') } }, { provide: Router, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: RequestService, useValue: {} } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/create-community-page/create-community-page.component.ts b/src/app/community-page/create-community-page/create-community-page.component.ts index eea0908388..b0756c1275 100644 --- a/src/app/community-page/create-community-page/create-community-page.component.ts +++ b/src/app/community-page/create-community-page/create-community-page.component.ts @@ -5,9 +5,12 @@ import { RouteService } from '../../core/services/route.service'; import { Router } from '@angular/router'; import { CreateComColPageComponent } from '../../shared/comcol/comcol-forms/create-comcol-page/create-comcol-page.component'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { RequestService } from '../../core/data/request.service'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { CommunityFormComponent } from '../community-form/community-form.component'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { AsyncPipe, NgIf } from '@angular/common'; /** * Component that represents the page where a user can create a new Community @@ -15,7 +18,15 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; @Component({ selector: 'ds-create-community', styleUrls: ['./create-community-page.component.scss'], - templateUrl: './create-community-page.component.html' + templateUrl: './create-community-page.component.html', + imports: [ + CommunityFormComponent, + TranslateModule, + VarDirective, + NgIf, + AsyncPipe + ], + standalone: true }) export class CreateCommunityPageComponent extends CreateComColPageComponent { protected frontendURL = '/communities/'; diff --git a/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts b/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts index 55d0508c10..4fcc1cc26f 100644 --- a/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts +++ b/src/app/community-page/delete-community-page/delete-community-page.component.spec.ts @@ -19,17 +19,16 @@ describe('DeleteCommunityPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [DeleteCommunityPageComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, DeleteCommunityPageComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: CommunityDataService, useValue: {} }, { provide: ActivatedRoute, useValue: { data: observableOf({ dso: { payload: {} } }) } }, { provide: NotificationsService, useValue: {} }, - { provide: RequestService, useValue: {}} - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + { provide: RequestService, useValue: {} } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/delete-community-page/delete-community-page.component.ts b/src/app/community-page/delete-community-page/delete-community-page.component.ts index 65b7c81b38..83eb1981aa 100644 --- a/src/app/community-page/delete-community-page/delete-community-page.component.ts +++ b/src/app/community-page/delete-community-page/delete-community-page.component.ts @@ -4,8 +4,10 @@ import { CommunityDataService } from '../../core/data/community-data.service'; import { ActivatedRoute, Router } from '@angular/router'; import { DeleteComColPageComponent } from '../../shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * Component that represents the page where a user can delete an existing Community @@ -13,7 +15,14 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; @Component({ selector: 'ds-delete-community', styleUrls: ['./delete-community-page.component.scss'], - templateUrl: './delete-community-page.component.html' + templateUrl: './delete-community-page.component.html', + imports: [ + TranslateModule, + AsyncPipe, + VarDirective, + NgIf + ], + standalone: true }) export class DeleteCommunityPageComponent extends DeleteComColPageComponent { protected frontendURL = '/communities/'; diff --git a/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.spec.ts b/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.spec.ts index d895cfd820..8b9d0d3815 100644 --- a/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.spec.ts +++ b/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.spec.ts @@ -8,8 +8,8 @@ xdescribe('CommunityAccessControlComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ CommunityAccessControlComponent ] - }) + imports: [CommunityAccessControlComponent] +}) .compileComponents(); }); diff --git a/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.ts b/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.ts index 8a216e38df..1ab0a3a4db 100644 --- a/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.ts +++ b/src/app/community-page/edit-community-page/community-access-control/community-access-control.component.ts @@ -5,11 +5,21 @@ import { ActivatedRoute } from '@angular/router'; import { map } from 'rxjs/operators'; import { getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { Community } from '../../../core/shared/community.model'; +import { + AccessControlFormContainerComponent +} from '../../../shared/access-control-form-container/access-control-form-container.component'; +import { AsyncPipe, NgIf } from '@angular/common'; @Component({ selector: 'ds-community-access-control', templateUrl: './community-access-control.component.html', styleUrls: ['./community-access-control.component.scss'], + imports: [ + AccessControlFormContainerComponent, + NgIf, + AsyncPipe + ], + standalone: true }) export class CommunityAccessControlComponent implements OnInit { itemRD$: Observable>; diff --git a/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.spec.ts b/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.spec.ts index 719cf83a26..41042f3578 100644 --- a/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.spec.ts +++ b/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.spec.ts @@ -37,17 +37,17 @@ describe('CommunityAuthorizationsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule - ], - declarations: [CommunityAuthorizationsComponent], - providers: [ + imports: [ + CommonModule, + CommunityAuthorizationsComponent + ], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, ChangeDetectorRef, CommunityAuthorizationsComponent, - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.ts b/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.ts index 7a9f224311..68c87d87ec 100644 --- a/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.ts +++ b/src/app/community-page/edit-community-page/community-authorizations/community-authorizations.component.ts @@ -4,10 +4,17 @@ import { Observable } from 'rxjs'; import { first, map } from 'rxjs/operators'; import { RemoteData } from '../../../core/data/remote-data'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; +import { ResourcePoliciesComponent } from '../../../shared/resource-policies/resource-policies.component'; +import { AsyncPipe } from '@angular/common'; @Component({ selector: 'ds-community-authorizations', templateUrl: './community-authorizations.component.html', + imports: [ + ResourcePoliciesComponent, + AsyncPipe + ], + standalone: true }) /** * Component that handles the community Authorizations diff --git a/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts b/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts index 1b1ee2c9f9..c24a029602 100644 --- a/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts +++ b/src/app/community-page/edit-community-page/community-curate/community-curate.component.spec.ts @@ -34,14 +34,13 @@ describe('CommunityCurateComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [CommunityCurateComponent], - providers: [ - {provide: ActivatedRoute, useValue: routeStub}, - {provide: DSONameService, useValue: dsoNameService} - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), CommunityCurateComponent], + providers: [ + { provide: ActivatedRoute, useValue: routeStub }, + { provide: DSONameService, useValue: dsoNameService } + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/edit-community-page/community-curate/community-curate.component.ts b/src/app/community-page/edit-community-page/community-curate/community-curate.component.ts index 8ae04af8f1..aa71c09fe9 100644 --- a/src/app/community-page/edit-community-page/community-curate/community-curate.component.ts +++ b/src/app/community-page/edit-community-page/community-curate/community-curate.component.ts @@ -6,6 +6,9 @@ import { RemoteData } from '../../../core/data/remote-data'; import { Observable } from 'rxjs'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { hasValue } from '../../../shared/empty.util'; +import { CurationFormComponent } from "../../../curation-form/curation-form.component"; +import { TranslateModule } from "@ngx-translate/core"; +import { AsyncPipe } from "@angular/common"; /** * Component for managing a community's curation tasks @@ -13,6 +16,12 @@ import { hasValue } from '../../../shared/empty.util'; @Component({ selector: 'ds-community-curate', templateUrl: './community-curate.component.html', + imports: [ + CurationFormComponent, + TranslateModule, + AsyncPipe + ], + standalone: true }) export class CommunityCurateComponent implements OnInit { diff --git a/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.spec.ts b/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.spec.ts index c597fac0bd..9de18344b1 100644 --- a/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.spec.ts +++ b/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.spec.ts @@ -17,15 +17,14 @@ describe('CommunityMetadataComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [CommunityMetadataComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, CommunityMetadataComponent], + providers: [ { provide: CommunityDataService, useValue: {} }, { provide: ActivatedRoute, useValue: { parent: { data: observableOf({ dso: { payload: {} } }) } } }, { provide: NotificationsService, useValue: new NotificationsServiceStub() } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.ts b/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.ts index a2dbfa6eb6..5a08bc8410 100644 --- a/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.ts +++ b/src/app/community-page/edit-community-page/community-metadata/community-metadata.component.ts @@ -5,6 +5,8 @@ import { Community } from '../../../core/shared/community.model'; import { CommunityDataService } from '../../../core/data/community-data.service'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { TranslateService } from '@ngx-translate/core'; +import { CommunityFormComponent } from '../../community-form/community-form.component'; +import { AsyncPipe } from '@angular/common'; /** * Component for editing a community's metadata @@ -12,6 +14,11 @@ import { TranslateService } from '@ngx-translate/core'; @Component({ selector: 'ds-community-metadata', templateUrl: './community-metadata.component.html', + imports: [ + CommunityFormComponent, + AsyncPipe + ], + standalone: true }) export class CommunityMetadataComponent extends ComcolMetadataComponent { protected frontendURL = '/communities/'; diff --git a/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts b/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts index f1f9e77caa..615baf8897 100644 --- a/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts +++ b/src/app/community-page/edit-community-page/community-roles/community-roles.component.spec.ts @@ -54,25 +54,23 @@ describe('CommunityRolesComponent', () => { }; TestBed.configureTestingModule({ - imports: [ + imports: [ ComcolModule, SharedModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), - NoopAnimationsModule - ], - declarations: [ - CommunityRolesComponent, - ], - providers: [ + NoopAnimationsModule, + CommunityRolesComponent + ], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: ActivatedRoute, useValue: route }, { provide: RequestService, useValue: requestService }, { provide: GroupDataService, useValue: groupDataService }, { provide: NotificationsService, useClass: NotificationsServiceStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); fixture = TestBed.createComponent(CommunityRolesComponent); comp = fixture.componentInstance; diff --git a/src/app/community-page/edit-community-page/community-roles/community-roles.component.ts b/src/app/community-page/edit-community-page/community-roles/community-roles.component.ts index 9468aa7048..a04bf3a6f1 100644 --- a/src/app/community-page/edit-community-page/community-roles/community-roles.component.ts +++ b/src/app/community-page/edit-community-page/community-roles/community-roles.component.ts @@ -6,6 +6,10 @@ import { Community } from '../../../core/shared/community.model'; import { getRemoteDataPayload, getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { RemoteData } from '../../../core/data/remote-data'; import { HALLink } from '../../../core/shared/hal-link.model'; +import { + ComcolRoleComponent +} from '../../../shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component'; +import { AsyncPipe, NgForOf } from '@angular/common'; /** * Component for managing a community's roles @@ -13,6 +17,12 @@ import { HALLink } from '../../../core/shared/hal-link.model'; @Component({ selector: 'ds-community-roles', templateUrl: './community-roles.component.html', + imports: [ + ComcolRoleComponent, + AsyncPipe, + NgForOf + ], + standalone: true }) export class CommunityRolesComponent implements OnInit { diff --git a/src/app/community-page/edit-community-page/edit-community-page.component.spec.ts b/src/app/community-page/edit-community-page/edit-community-page.component.spec.ts index 3a4c3351c3..0843366fbc 100644 --- a/src/app/community-page/edit-community-page/edit-community-page.component.spec.ts +++ b/src/app/community-page/edit-community-page/edit-community-page.component.spec.ts @@ -38,14 +38,13 @@ describe('EditCommunityPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule], - declarations: [EditCommunityPageComponent], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, CommonModule, RouterTestingModule, EditCommunityPageComponent], + providers: [ { provide: CommunityDataService, useValue: {} }, { provide: ActivatedRoute, useValue: routeStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/edit-community-page/edit-community-page.component.ts b/src/app/community-page/edit-community-page/edit-community-page.component.ts index 54a6ee4944..c50bad802a 100644 --- a/src/app/community-page/edit-community-page/edit-community-page.component.ts +++ b/src/app/community-page/edit-community-page/edit-community-page.component.ts @@ -1,15 +1,27 @@ import { Component } from '@angular/core'; import { Community } from '../../core/shared/community.model'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink, RouterOutlet } from '@angular/router'; import { EditComColPageComponent } from '../../shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component'; import { getCommunityPageRoute } from '../community-page-routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; /** * Component that represents the page where a user can edit an existing Community */ @Component({ selector: 'ds-edit-community', - templateUrl: '../../shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.html' + templateUrl: '../../shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.html', + standalone: true, + imports: [ + RouterLink, + TranslateModule, + NgClass, + NgForOf, + RouterOutlet, + NgIf, + AsyncPipe + ] }) export class EditCommunityPageComponent extends EditComColPageComponent { type = 'community'; diff --git a/src/app/community-page/edit-community-page/edit-community-page.module.ts b/src/app/community-page/edit-community-page/edit-community-page.module.ts index 5190d6a008..65ad5e3df7 100644 --- a/src/app/community-page/edit-community-page/edit-community-page.module.ts +++ b/src/app/community-page/edit-community-page/edit-community-page.module.ts @@ -19,23 +19,21 @@ import { * Module that contains all components related to the Edit Community page administrator functionality */ @NgModule({ - imports: [ - CommonModule, - SharedModule, - EditCommunityPageRoutingModule, - CommunityFormModule, - ComcolModule, - ResourcePoliciesModule, - AccessControlFormModule, - ], - declarations: [ - EditCommunityPageComponent, - CommunityCurateComponent, - CommunityMetadataComponent, - CommunityRolesComponent, - CommunityAuthorizationsComponent, - CommunityAccessControlComponent - ] + imports: [ + CommonModule, + SharedModule, + EditCommunityPageRoutingModule, + CommunityFormModule, + ComcolModule, + ResourcePoliciesModule, + AccessControlFormModule, + EditCommunityPageComponent, + CommunityCurateComponent, + CommunityMetadataComponent, + CommunityRolesComponent, + CommunityAuthorizationsComponent, + CommunityAccessControlComponent + ] }) export class EditCommunityPageModule { diff --git a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.spec.ts b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.spec.ts index bca3c42a95..dd7a6411cd 100644 --- a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.spec.ts +++ b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.spec.ts @@ -147,15 +147,15 @@ describe('CommunityPageSubCollectionList Component', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([]), NgbModule, - NoopAnimationsModule - ], - declarations: [CommunityPageSubCollectionListComponent], - providers: [ + NoopAnimationsModule, + CommunityPageSubCollectionListComponent + ], + providers: [ { provide: CollectionDataService, useValue: collectionDataServiceStub }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: PaginationService, useValue: paginationService }, @@ -165,9 +165,9 @@ describe('CommunityPageSubCollectionList Component', () => { { provide: LinkHeadService, useValue: linkHeadService }, { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts index 3a77149e5b..efd435af38 100644 --- a/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts +++ b/src/app/community-page/sub-collection-list/community-page-sub-collection-list.component.ts @@ -14,12 +14,28 @@ import { CollectionDataService } from '../../core/data/collection-data.service'; import { PaginationService } from '../../core/pagination/pagination.service'; import { switchMap } from 'rxjs/operators'; import { hasValue } from '../../shared/empty.util'; +import { ObjectCollectionComponent } from '../../shared/object-collection/object-collection.component'; +import { ErrorComponent } from "../../shared/error/error.component"; +import { ThemedLoadingComponent } from "../../shared/loading/themed-loading.component"; +import { AsyncPipe, NgIf } from "@angular/common"; +import { TranslateModule } from "@ngx-translate/core"; +import { VarDirective } from "../../shared/utils/var.directive"; @Component({ selector: 'ds-community-page-sub-collection-list', styleUrls: ['./community-page-sub-collection-list.component.scss'], templateUrl: './community-page-sub-collection-list.component.html', - animations:[fadeIn] + animations: [fadeIn], + imports: [ + ObjectCollectionComponent, + ErrorComponent, + ThemedLoadingComponent, + NgIf, + TranslateModule, + AsyncPipe, + VarDirective + ], + standalone: true }) export class CommunityPageSubCollectionListComponent implements OnInit, OnDestroy { @Input() community: Community; diff --git a/src/app/community-page/sub-collection-list/themed-community-page-sub-collection-list.component.ts b/src/app/community-page/sub-collection-list/themed-community-page-sub-collection-list.component.ts index f1f49f204c..cc4f208d93 100644 --- a/src/app/community-page/sub-collection-list/themed-community-page-sub-collection-list.component.ts +++ b/src/app/community-page/sub-collection-list/themed-community-page-sub-collection-list.component.ts @@ -4,9 +4,10 @@ import { Component, Input } from '@angular/core'; import { Community } from '../../core/shared/community.model'; @Component({ - selector: 'ds-themed-community-page-sub-collection-list', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-community-page-sub-collection-list', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCollectionPageSubCollectionListComponent extends ThemedComponent { @Input() community: Community; diff --git a/src/app/community-page/sub-community-list/community-page-sub-community-list.component.spec.ts b/src/app/community-page/sub-community-list/community-page-sub-community-list.component.spec.ts index 0a14fe6dd1..a5a8feda59 100644 --- a/src/app/community-page/sub-community-list/community-page-sub-community-list.component.spec.ts +++ b/src/app/community-page/sub-community-list/community-page-sub-community-list.component.spec.ts @@ -148,15 +148,15 @@ describe('CommunityPageSubCommunityListComponent Component', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([]), NgbModule, - NoopAnimationsModule - ], - declarations: [CommunityPageSubCommunityListComponent], - providers: [ + NoopAnimationsModule, + CommunityPageSubCommunityListComponent + ], + providers: [ { provide: CommunityDataService, useValue: communityDataServiceStub }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: PaginationService, useValue: paginationService }, @@ -166,9 +166,9 @@ describe('CommunityPageSubCommunityListComponent Component', () => { { provide: LinkHeadService, useValue: linkHeadService }, { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/community-page/sub-community-list/community-page-sub-community-list.component.ts b/src/app/community-page/sub-community-list/community-page-sub-community-list.component.ts index 5a0409a051..8bd288debf 100644 --- a/src/app/community-page/sub-community-list/community-page-sub-community-list.component.ts +++ b/src/app/community-page/sub-community-list/community-page-sub-community-list.component.ts @@ -13,12 +13,28 @@ import { CommunityDataService } from '../../core/data/community-data.service'; import { switchMap } from 'rxjs/operators'; import { PaginationService } from '../../core/pagination/pagination.service'; import { hasValue } from '../../shared/empty.util'; +import { ErrorComponent } from '../../shared/error/error.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ObjectCollectionComponent } from '../../shared/object-collection/object-collection.component'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-community-page-sub-community-list', styleUrls: ['./community-page-sub-community-list.component.scss'], templateUrl: './community-page-sub-community-list.component.html', - animations: [fadeIn] + animations: [fadeIn], + imports: [ + ErrorComponent, + ThemedLoadingComponent, + VarDirective, + NgIf, + ObjectCollectionComponent, + AsyncPipe, + TranslateModule + ], + standalone: true }) /** * Component to render the sub-communities of a Community diff --git a/src/app/community-page/sub-community-list/themed-community-page-sub-community-list.component.ts b/src/app/community-page/sub-community-list/themed-community-page-sub-community-list.component.ts index 852c53186e..4521ac3ce7 100644 --- a/src/app/community-page/sub-community-list/themed-community-page-sub-community-list.component.ts +++ b/src/app/community-page/sub-community-list/themed-community-page-sub-community-list.component.ts @@ -4,9 +4,10 @@ import { Component, Input } from '@angular/core'; import { Community } from '../../core/shared/community.model'; @Component({ - selector: 'ds-themed-community-page-sub-community-list', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-community-page-sub-community-list', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCommunityPageSubCommunityListComponent extends ThemedComponent { diff --git a/src/app/community-page/themed-community-page.component.ts b/src/app/community-page/themed-community-page.component.ts index eeb058fb04..8a4aa4094b 100644 --- a/src/app/community-page/themed-community-page.component.ts +++ b/src/app/community-page/themed-community-page.component.ts @@ -6,9 +6,10 @@ import { CommunityPageComponent } from './community-page.component'; * Themed wrapper for CommunityPageComponent */ @Component({ - selector: 'ds-themed-community-page', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-community-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCommunityPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/core/auth/auth.service.spec.ts b/src/app/core/auth/auth.service.spec.ts index b38d17aecd..874a62cac3 100644 --- a/src/app/core/auth/auth.service.spec.ts +++ b/src/app/core/auth/auth.service.spec.ts @@ -112,32 +112,31 @@ describe('AuthService test', () => { beforeEach(() => { init(); TestBed.configureTestingModule({ - imports: [ - CommonModule, - StoreModule.forRoot({ authReducer }, { + imports: [ + CommonModule, + StoreModule.forRoot({ authReducer }, { runtimeChecks: { - strictStateImmutability: false, - strictActionImmutability: false + strictStateImmutability: false, + strictActionImmutability: false } - }), - ], - declarations: [], - providers: [ - { provide: AuthRequestService, useValue: authRequest }, - { provide: NativeWindowService, useValue: window }, - { provide: REQUEST, useValue: {} }, - { provide: Router, useValue: routerStub }, - { provide: RouteService, useValue: routeServiceStub }, - { provide: ActivatedRoute, useValue: routeStub }, - { provide: Store, useValue: mockStore }, - { provide: EPersonDataService, useValue: mockEpersonDataService }, - { provide: HardRedirectService, useValue: hardRedirectService }, - { provide: NotificationsService, useValue: NotificationsServiceStub }, - { provide: TranslateService, useValue: getMockTranslateService() }, - CookieService, - AuthService - ], - }); + }), + ], + providers: [ + { provide: AuthRequestService, useValue: authRequest }, + { provide: NativeWindowService, useValue: window }, + { provide: REQUEST, useValue: {} }, + { provide: Router, useValue: routerStub }, + { provide: RouteService, useValue: routeServiceStub }, + { provide: ActivatedRoute, useValue: routeStub }, + { provide: Store, useValue: mockStore }, + { provide: EPersonDataService, useValue: mockEpersonDataService }, + { provide: HardRedirectService, useValue: hardRedirectService }, + { provide: NotificationsService, useValue: NotificationsServiceStub }, + { provide: TranslateService, useValue: getMockTranslateService() }, + CookieService, + AuthService + ] +}); authService = TestBed.inject(AuthService); }); diff --git a/src/app/core/eperson/eperson-data.service.spec.ts b/src/app/core/eperson/eperson-data.service.spec.ts index b4b939eebf..65fb52e076 100644 --- a/src/app/core/eperson/eperson-data.service.spec.ts +++ b/src/app/core/eperson/eperson-data.service.spec.ts @@ -64,20 +64,19 @@ describe('EPersonDataService', () => { halService = new HALEndpointServiceStub(restEndpointURL); TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, StoreModule.forRoot({}), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [], - providers: [], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + providers: [], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); } beforeEach(() => { diff --git a/src/app/core/eperson/group-data.service.spec.ts b/src/app/core/eperson/group-data.service.spec.ts index b424aed1aa..2b15222eaf 100644 --- a/src/app/core/eperson/group-data.service.spec.ts +++ b/src/app/core/eperson/group-data.service.spec.ts @@ -51,20 +51,19 @@ describe('GroupDataService', () => { halService = new HALEndpointServiceStub(restEndpointURL); objectCache = getMockObjectCacheService(); TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, StoreModule.forRoot({}), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [], - providers: [], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + providers: [], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); } function initTestService() { diff --git a/src/app/core/google-recaptcha/google-recaptcha.module.ts b/src/app/core/google-recaptcha/google-recaptcha.module.ts index 64620a48f4..7cb9cacc36 100644 --- a/src/app/core/google-recaptcha/google-recaptcha.module.ts +++ b/src/app/core/google-recaptcha/google-recaptcha.module.ts @@ -13,10 +13,9 @@ const COMPONENTS = [ ]; @NgModule({ - imports: [ CommonModule ], - providers: [...PROVIDERS], - declarations: [...COMPONENTS], - exports: [...COMPONENTS] + imports: [CommonModule, ...COMPONENTS], + providers: [...PROVIDERS], + exports: [...COMPONENTS] }) /** diff --git a/src/app/core/registry/registry.service.spec.ts b/src/app/core/registry/registry.service.spec.ts index e9dfbe7e2c..0ea5eebb0b 100644 --- a/src/app/core/registry/registry.service.spec.ts +++ b/src/app/core/registry/registry.service.spec.ts @@ -31,7 +31,11 @@ import { RemoteData } from '../data/remote-data'; import { NoContent } from '../shared/NoContent.model'; import { FindListOptions } from '../data/find-list-options.model'; -@Component({ template: '' }) +@Component({ + template: '', + standalone: true, + imports: [CommonModule] +}) class DummyComponent { } @@ -144,18 +148,15 @@ describe('RegistryService', () => { beforeEach(() => { init(); TestBed.configureTestingModule({ - imports: [CommonModule, StoreModule.forRoot({}, storeModuleConfig), TranslateModule.forRoot()], - declarations: [ - DummyComponent - ], - providers: [ + imports: [CommonModule, StoreModule.forRoot({}, storeModuleConfig), TranslateModule.forRoot(), DummyComponent], + providers: [ { provide: Store, useClass: StoreMock }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: MetadataSchemaDataService, useValue: metadataSchemaService }, { provide: MetadataFieldDataService, useValue: metadataFieldService }, RegistryService - ] - }); + ] +}); registryService = TestBed.inject(RegistryService); mockStore = TestBed.inject(Store); }); diff --git a/src/app/core/shared/search/search.service.spec.ts b/src/app/core/shared/search/search.service.spec.ts index fe5b495ab0..a0681476b7 100644 --- a/src/app/core/shared/search/search.service.spec.ts +++ b/src/app/core/shared/search/search.service.spec.ts @@ -29,7 +29,11 @@ import { Angulartics2 } from 'angulartics2'; import { SearchFilterConfig } from '../../../shared/search/models/search-filter-config.model'; import anything = jasmine.anything; -@Component({ template: '' }) +@Component({ + template: '', + standalone: true, + imports: [CommonModule] +}) class DummyComponent { } @@ -41,29 +45,27 @@ describe('SearchService', () => { const searchConfigService = { paginationID: 'page-id' }; beforeEach(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule, - RouterTestingModule.withRoutes([ + imports: [ + CommonModule, + RouterTestingModule.withRoutes([ { path: 'search', component: DummyComponent, pathMatch: 'full' }, - ]) - ], - declarations: [ - DummyComponent - ], - providers: [ - { provide: Router, useValue: router }, - { provide: RouteService, useValue: routeServiceStub }, - { provide: RequestService, useValue: getMockRequestService() }, - { provide: RemoteDataBuildService, useValue: {} }, - { provide: HALEndpointService, useValue: {} }, - { provide: CommunityDataService, useValue: {} }, - { provide: DSpaceObjectDataService, useValue: {} }, - { provide: PaginationService, useValue: {} }, - { provide: SearchConfigurationService, useValue: searchConfigService }, - { provide: Angulartics2, useValue: {} }, - SearchService - ], - }); + ]), + DummyComponent + ], + providers: [ + { provide: Router, useValue: router }, + { provide: RouteService, useValue: routeServiceStub }, + { provide: RequestService, useValue: getMockRequestService() }, + { provide: RemoteDataBuildService, useValue: {} }, + { provide: HALEndpointService, useValue: {} }, + { provide: CommunityDataService, useValue: {} }, + { provide: DSpaceObjectDataService, useValue: {} }, + { provide: PaginationService, useValue: {} }, + { provide: SearchConfigurationService, useValue: searchConfigService }, + { provide: Angulartics2, useValue: {} }, + SearchService + ] +}); searchService = TestBed.inject(SearchService); }); @@ -110,29 +112,27 @@ describe('SearchService', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule, - RouterTestingModule.withRoutes([ + imports: [ + CommonModule, + RouterTestingModule.withRoutes([ { path: 'search', component: DummyComponent, pathMatch: 'full' }, - ]) - ], - declarations: [ - DummyComponent - ], - providers: [ - { provide: Router, useValue: router }, - { provide: RouteService, useValue: routeServiceStub }, - { provide: RequestService, useValue: requestService }, - { provide: RemoteDataBuildService, useValue: remoteDataBuildService }, - { provide: HALEndpointService, useValue: halService }, - { provide: CommunityDataService, useValue: {} }, - { provide: DSpaceObjectDataService, useValue: {} }, - { provide: PaginationService, useValue: paginationService }, - { provide: SearchConfigurationService, useValue: searchConfigService }, - { provide: Angulartics2, useValue: {} }, - SearchService - ], - }); + ]), + DummyComponent + ], + providers: [ + { provide: Router, useValue: router }, + { provide: RouteService, useValue: routeServiceStub }, + { provide: RequestService, useValue: requestService }, + { provide: RemoteDataBuildService, useValue: remoteDataBuildService }, + { provide: HALEndpointService, useValue: halService }, + { provide: CommunityDataService, useValue: {} }, + { provide: DSpaceObjectDataService, useValue: {} }, + { provide: PaginationService, useValue: paginationService }, + { provide: SearchConfigurationService, useValue: searchConfigService }, + { provide: Angulartics2, useValue: {} }, + SearchService + ] +}); searchService = TestBed.inject(SearchService); routeService = TestBed.inject(RouteService); const urlTree = Object.assign(new UrlTree(), { root: { children: { primary: 'search' } } }); diff --git a/src/app/curation-form/curation-form.component.spec.ts b/src/app/curation-form/curation-form.component.spec.ts index dc70b925e8..7f7defe35c 100644 --- a/src/app/curation-form/curation-form.component.spec.ts +++ b/src/app/curation-form/curation-form.component.spec.ts @@ -61,18 +61,17 @@ describe('CurationFormComponent', () => { router = new RouterStub(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), FormsModule, ReactiveFormsModule], - declarations: [CurationFormComponent], - providers: [ + imports: [TranslateModule.forRoot(), FormsModule, ReactiveFormsModule, CurationFormComponent], + providers: [ { provide: ScriptDataService, useValue: scriptDataService }, { provide: ProcessDataService, useValue: processDataService }, { provide: NotificationsService, useValue: notificationsService }, { provide: HandleService, useValue: handleService }, - { provide: Router, useValue: router}, + { provide: Router, useValue: router }, { provide: ConfigurationDataService, useValue: configurationDataService }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/curation-form/curation-form.component.ts b/src/app/curation-form/curation-form.component.ts index 2c0e900a66..dd6c804917 100644 --- a/src/app/curation-form/curation-form.component.ts +++ b/src/app/curation-form/curation-form.component.ts @@ -1,10 +1,10 @@ import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; import { ScriptDataService } from '../core/data/processes/script-data.service'; -import { UntypedFormControl, UntypedFormGroup } from '@angular/forms'; +import { UntypedFormControl, UntypedFormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { getFirstCompletedRemoteData } from '../core/shared/operators'; import { find, map } from 'rxjs/operators'; import { NotificationsService } from '../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { hasValue, isEmpty, isNotEmpty } from '../shared/empty.util'; import { RemoteData } from '../core/data/remote-data'; import { Router } from '@angular/router'; @@ -15,14 +15,17 @@ import { ConfigurationProperty } from '../core/shared/configuration-property.mod import { Observable } from 'rxjs'; import { getProcessDetailRoute } from '../process-page/process-page-routing.paths'; import { HandleService } from '../shared/handle.service'; +import { NgFor, NgIf } from '@angular/common'; export const CURATION_CFG = 'plugin.named.org.dspace.curate.CurationTask'; /** * Component responsible for rendering the Curation Task form */ @Component({ - selector: 'ds-curation-form', - templateUrl: './curation-form.component.html' + selector: 'ds-curation-form', + templateUrl: './curation-form.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, NgFor, NgIf, TranslateModule] }) export class CurationFormComponent implements OnInit { diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.spec.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.spec.ts index 3ca0dba3b6..d28e92dcda 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.spec.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.spec.ts @@ -54,12 +54,10 @@ describe('DsoEditMetadataFieldValuesComponent', () => { draggingMdField$ = new BehaviorSubject(null); TestBed.configureTestingModule({ - declarations: [DsoEditMetadataFieldValuesComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), DsoEditMetadataFieldValuesComponent, VarDirective], + providers: [], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.ts index 2702e0ba1f..b6093c3d17 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-field-values/dso-edit-metadata-field-values.component.ts @@ -3,12 +3,17 @@ import { DsoEditMetadataChangeType, DsoEditMetadataForm, DsoEditMetadataValue } import { Observable } from 'rxjs/internal/Observable'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject'; -import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; +import { CdkDragDrop, moveItemInArray, CdkDropList } from '@angular/cdk/drag-drop'; +import { DsoEditMetadataValueComponent } from '../dso-edit-metadata-value/dso-edit-metadata-value.component'; +import { NgFor, AsyncPipe } from '@angular/common'; +import { DsoEditMetadataValueHeadersComponent } from '../dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component'; @Component({ - selector: 'ds-dso-edit-metadata-field-values', - styleUrls: ['./dso-edit-metadata-field-values.component.scss'], - templateUrl: './dso-edit-metadata-field-values.component.html', + selector: 'ds-dso-edit-metadata-field-values', + styleUrls: ['./dso-edit-metadata-field-values.component.scss'], + templateUrl: './dso-edit-metadata-field-values.component.html', + standalone: true, + imports: [CdkDropList, DsoEditMetadataValueHeadersComponent, NgFor, DsoEditMetadataValueComponent, AsyncPipe] }) /** * Component displaying table rows for each value for a certain metadata field within a form diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.spec.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.spec.ts index a0a1da1f1e..c6a215cbd3 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.spec.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.spec.ts @@ -12,12 +12,10 @@ describe('DsoEditMetadataHeadersComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [DsoEditMetadataHeadersComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), DsoEditMetadataHeadersComponent, VarDirective], + providers: [], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.ts index 9c21c8ac9e..bc34ebdde6 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-headers/dso-edit-metadata-headers.component.ts @@ -1,9 +1,12 @@ import { Component, Input } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-dso-edit-metadata-headers', - styleUrls: ['./dso-edit-metadata-headers.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'], - templateUrl: './dso-edit-metadata-headers.component.html', + selector: 'ds-dso-edit-metadata-headers', + styleUrls: ['./dso-edit-metadata-headers.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'], + templateUrl: './dso-edit-metadata-headers.component.html', + standalone: true, + imports: [TranslateModule] }) /** * Component displaying the header table row for DSO edit metadata page diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component.ts index dfda2a50d1..572426e437 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component.ts @@ -1,9 +1,12 @@ import { Component, Input } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-dso-edit-metadata-value-headers', - styleUrls: ['./dso-edit-metadata-value-headers.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'], - templateUrl: './dso-edit-metadata-value-headers.component.html', + selector: 'ds-dso-edit-metadata-value-headers', + styleUrls: ['./dso-edit-metadata-value-headers.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'], + templateUrl: './dso-edit-metadata-value-headers.component.html', + standalone: true, + imports: [TranslateModule] }) /** * Component displaying invisible headers for a list of metadata values using table roles for accessibility diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.spec.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.spec.ts index 67a6f98ac0..64721c1ec5 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.spec.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.spec.ts @@ -49,14 +49,13 @@ describe('DsoEditMetadataValueComponent', () => { initServices(); TestBed.configureTestingModule({ - declarations: [DsoEditMetadataValueComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), DsoEditMetadataValueComponent, VarDirective], + providers: [ { provide: RelationshipDataService, useValue: relationshipService }, { provide: DSONameService, useValue: dsoNameService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.ts index 3fdcd381ab..f740493e1f 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata-value/dso-edit-metadata-value.component.ts @@ -12,11 +12,22 @@ import { map } from 'rxjs/operators'; import { getItemPageRoute } from '../../../item-page/item-page-routing-paths'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { EMPTY } from 'rxjs/internal/observable/empty'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { ThemedTypeBadgeComponent } from '../../../shared/object-collection/shared/badges/type-badge/themed-type-badge.component'; +import { RouterLink } from '@angular/router'; +import { DebounceDirective } from '../../../shared/utils/debounce.directive'; +import { FormsModule } from '@angular/forms'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { CdkDrag, CdkDragHandle } from '@angular/cdk/drag-drop'; +import { VarDirective } from '../../../shared/utils/var.directive'; @Component({ - selector: 'ds-dso-edit-metadata-value', - styleUrls: ['./dso-edit-metadata-value.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'], - templateUrl: './dso-edit-metadata-value.component.html', + selector: 'ds-dso-edit-metadata-value', + styleUrls: ['./dso-edit-metadata-value.component.scss', '../dso-edit-metadata-shared/dso-edit-metadata-cells.scss'], + templateUrl: './dso-edit-metadata-value.component.html', + standalone: true, + imports: [VarDirective, CdkDrag, NgClass, NgIf, FormsModule, DebounceDirective, RouterLink, ThemedTypeBadgeComponent, NgbTooltipModule, CdkDragHandle, AsyncPipe, TranslateModule] }) /** * Component displaying a single editable row for a metadata value diff --git a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.spec.ts b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.spec.ts index 7067c44fbb..c8463701a1 100644 --- a/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.spec.ts +++ b/src/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.spec.ts @@ -71,16 +71,15 @@ describe('DsoEditMetadataComponent', () => { notificationsService = jasmine.createSpyObj('notificationsService', ['error', 'success']); TestBed.configureTestingModule({ - declarations: [DsoEditMetadataComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), DsoEditMetadataComponent, VarDirective], + providers: [ TestDataService, { provide: DATA_SERVICE_FACTORY, useValue: jasmine.createSpy('getDataServiceFor').and.returnValue(TestDataService) }, { provide: NotificationsService, useValue: notificationsService }, ArrayMoveChangeAnalyzer, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { 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 d44817be84..d51f87b42f 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 @@ -15,18 +15,27 @@ import { import { UpdateDataService } from '../../core/data/update-data.service'; import { ResourceType } from '../../core/shared/resource-type'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { MetadataFieldSelectorComponent } from './metadata-field-selector/metadata-field-selector.component'; import { Observable } from 'rxjs/internal/Observable'; import { ArrayMoveChangeAnalyzer } from '../../core/data/array-move-change-analyzer.service'; import { DATA_SERVICE_FACTORY } from '../../core/data/base/data-service.decorator'; import { GenericConstructor } from '../../core/shared/generic-constructor'; import { HALDataService } from '../../core/data/base/hal-data-service.interface'; +import { LoadingComponent } from '../../shared/loading/loading.component'; +import { AlertComponent } from '../../shared/alert/alert.component'; +import { DsoEditMetadataFieldValuesComponent } from './dso-edit-metadata-field-values/dso-edit-metadata-field-values.component'; +import { DsoEditMetadataValueComponent } from './dso-edit-metadata-value/dso-edit-metadata-value.component'; +import { DsoEditMetadataValueHeadersComponent } from './dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component'; +import { DsoEditMetadataHeadersComponent } from './dso-edit-metadata-headers/dso-edit-metadata-headers.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-dso-edit-metadata', - styleUrls: ['./dso-edit-metadata.component.scss'], - templateUrl: './dso-edit-metadata.component.html', + selector: 'ds-dso-edit-metadata', + styleUrls: ['./dso-edit-metadata.component.scss'], + templateUrl: './dso-edit-metadata.component.html', + standalone: true, + imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, LoadingComponent, AsyncPipe, TranslateModule] }) /** * Component showing a table of all metadata on a DSpaceObject and options to modify them diff --git a/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.spec.ts b/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.spec.ts index de8736df94..678bf5d7f6 100644 --- a/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.spec.ts +++ b/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.spec.ts @@ -51,14 +51,13 @@ describe('MetadataFieldSelectorComponent', () => { notificationsService = jasmine.createSpyObj('notificationsService', ['error', 'success']); TestBed.configureTestingModule({ - declarations: [MetadataFieldSelectorComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), MetadataFieldSelectorComponent, VarDirective], + providers: [ { provide: RegistryService, useValue: registryService }, { provide: NotificationsService, useValue: notificationsService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.ts b/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.ts index fc0d57046d..956866733a 100644 --- a/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component.ts @@ -18,19 +18,23 @@ import { } from '../../../core/shared/operators'; import { Observable } from 'rxjs/internal/Observable'; import { RegistryService } from '../../../core/registry/registry.service'; -import { UntypedFormControl } from '@angular/forms'; +import { UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BehaviorSubject } from 'rxjs/internal/BehaviorSubject'; import { hasValue } from '../../../shared/empty.util'; import { Subscription } from 'rxjs/internal/Subscription'; import { of } from 'rxjs/internal/observable/of'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model'; +import { ClickOutsideDirective } from '../../../shared/utils/click-outside.directive'; +import { NgClass, NgIf, NgFor, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-metadata-field-selector', - styleUrls: ['./metadata-field-selector.component.scss'], - templateUrl: './metadata-field-selector.component.html' + selector: 'ds-metadata-field-selector', + styleUrls: ['./metadata-field-selector.component.scss'], + templateUrl: './metadata-field-selector.component.html', + standalone: true, + imports: [FormsModule, NgClass, ReactiveFormsModule, ClickOutsideDirective, NgIf, NgFor, AsyncPipe, TranslateModule] }) /** * Component displaying a searchable input for metadata-fields diff --git a/src/app/dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component.ts b/src/app/dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component.ts index ba21907c99..e31ada791c 100644 --- a/src/app/dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component.ts +++ b/src/app/dso-shared/dso-edit-metadata/themed-dso-edit-metadata.component.ts @@ -5,9 +5,10 @@ import { DSpaceObject } from '../../core/shared/dspace-object.model'; import { UpdateDataService } from '../../core/data/update-data.service'; @Component({ - selector: 'ds-themed-dso-edit-metadata', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html', + selector: 'ds-themed-dso-edit-metadata', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedDsoEditMetadataComponent extends ThemedComponent { diff --git a/src/app/dso-shared/dso-shared.module.ts b/src/app/dso-shared/dso-shared.module.ts index 7d44d6a920..e5fc3ce149 100644 --- a/src/app/dso-shared/dso-shared.module.ts +++ b/src/app/dso-shared/dso-shared.module.ts @@ -9,27 +9,25 @@ import { DsoEditMetadataValueHeadersComponent } from './dso-edit-metadata/dso-ed import { ThemedDsoEditMetadataComponent } from './dso-edit-metadata/themed-dso-edit-metadata.component'; @NgModule({ - imports: [ - SharedModule, - ], - declarations: [ - DsoEditMetadataComponent, - ThemedDsoEditMetadataComponent, - MetadataFieldSelectorComponent, - DsoEditMetadataFieldValuesComponent, - DsoEditMetadataValueComponent, - DsoEditMetadataHeadersComponent, - DsoEditMetadataValueHeadersComponent, - ], - exports: [ - DsoEditMetadataComponent, - ThemedDsoEditMetadataComponent, - MetadataFieldSelectorComponent, - DsoEditMetadataFieldValuesComponent, - DsoEditMetadataValueComponent, - DsoEditMetadataHeadersComponent, - DsoEditMetadataValueHeadersComponent, - ], + imports: [ + SharedModule, + DsoEditMetadataComponent, + ThemedDsoEditMetadataComponent, + MetadataFieldSelectorComponent, + DsoEditMetadataFieldValuesComponent, + DsoEditMetadataValueComponent, + DsoEditMetadataHeadersComponent, + DsoEditMetadataValueHeadersComponent + ], + exports: [ + DsoEditMetadataComponent, + ThemedDsoEditMetadataComponent, + MetadataFieldSelectorComponent, + DsoEditMetadataFieldValuesComponent, + DsoEditMetadataValueComponent, + DsoEditMetadataHeadersComponent, + DsoEditMetadataValueHeadersComponent, + ] }) export class DsoSharedModule { diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts index 6c55616760..edad6ff19b 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.spec.ts @@ -47,14 +47,13 @@ describe('JournalIssueGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [JournalIssueGridElementComponent, TruncatePipe], - providers: [ + imports: [NoopAnimationsModule, JournalIssueGridElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalIssueGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalIssueGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.ts index 3e57731613..e17313ef7c 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-issue/journal-issue-grid-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { JournalIssueSearchResultGridElementComponent } from '../search-result-grid-elements/journal-issue/journal-issue-search-result-grid-element.component'; @listableObjectComponent('JournalIssue', ViewMode.GridElement) @Component({ - selector: 'ds-journal-issue-grid-element', - styleUrls: ['./journal-issue-grid-element.component.scss'], - templateUrl: './journal-issue-grid-element.component.html', + selector: 'ds-journal-issue-grid-element', + styleUrls: ['./journal-issue-grid-element.component.scss'], + templateUrl: './journal-issue-grid-element.component.html', + standalone: true, + imports: [JournalIssueSearchResultGridElementComponent] }) /** * The component for displaying a grid element for an item of the type Journal Issue diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts index 14f63d5781..c1b1576beb 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.spec.ts @@ -47,14 +47,13 @@ describe('JournalVolumeGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [JournalVolumeGridElementComponent, TruncatePipe], - providers: [ + imports: [NoopAnimationsModule, JournalVolumeGridElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalVolumeGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalVolumeGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.ts index eb88c25a12..19963fc490 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal-volume/journal-volume-grid-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { JournalVolumeSearchResultGridElementComponent } from '../search-result-grid-elements/journal-volume/journal-volume-search-result-grid-element.component'; @listableObjectComponent('JournalVolume', ViewMode.GridElement) @Component({ - selector: 'ds-journal-volume-grid-element', - styleUrls: ['./journal-volume-grid-element.component.scss'], - templateUrl: './journal-volume-grid-element.component.html', + selector: 'ds-journal-volume-grid-element', + styleUrls: ['./journal-volume-grid-element.component.scss'], + templateUrl: './journal-volume-grid-element.component.html', + standalone: true, + imports: [JournalVolumeSearchResultGridElementComponent] }) /** * The component for displaying a grid element for an item of the type Journal Volume diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts index e4a2375441..f75f3265da 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.spec.ts @@ -53,14 +53,13 @@ describe('JournalGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [JournalGridElementComponent, TruncatePipe], - providers: [ + imports: [NoopAnimationsModule, JournalGridElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.ts index 1d7c1e5b73..8c9ccc6a97 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/journal/journal-grid-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { JournalSearchResultGridElementComponent } from '../search-result-grid-elements/journal/journal-search-result-grid-element.component'; @listableObjectComponent('Journal', ViewMode.GridElement) @Component({ - selector: 'ds-journal-grid-element', - styleUrls: ['./journal-grid-element.component.scss'], - templateUrl: './journal-grid-element.component.html', + selector: 'ds-journal-grid-element', + styleUrls: ['./journal-grid-element.component.scss'], + templateUrl: './journal-grid-element.component.html', + standalone: true, + imports: [JournalSearchResultGridElementComponent] }) /** * The component for displaying a grid element for an item of the type Journal diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-issue/journal-issue-search-result-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-issue/journal-issue-search-result-grid-element.component.ts index a2a6c91d2d..cd0458af1b 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-issue/journal-issue-search-result-grid-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-issue/journal-issue-search-result-grid-element.component.ts @@ -3,13 +3,22 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { focusShadow } from '../../../../../shared/animations/focus'; import { ItemSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; @listableObjectComponent('JournalIssueSearchResult', ViewMode.GridElement) @Component({ - selector: 'ds-journal-issue-search-result-grid-element', - styleUrls: ['./journal-issue-search-result-grid-element.component.scss'], - templateUrl: './journal-issue-search-result-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-journal-issue-search-result-grid-element', + styleUrls: ['./journal-issue-search-result-grid-element.component.scss'], + templateUrl: './journal-issue-search-result-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [TruncatableComponent, NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an item search result of the type Journal Issue diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-volume/journal-volume-search-result-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-volume/journal-volume-search-result-grid-element.component.ts index 17c8575a0e..bb41d10ceb 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-volume/journal-volume-search-result-grid-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal-volume/journal-volume-search-result-grid-element.component.ts @@ -3,13 +3,22 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { focusShadow } from '../../../../../shared/animations/focus'; import { ItemSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; @listableObjectComponent('JournalVolumeSearchResult', ViewMode.GridElement) @Component({ - selector: 'ds-journal-volume-search-result-grid-element', - styleUrls: ['./journal-volume-search-result-grid-element.component.scss'], - templateUrl: './journal-volume-search-result-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-journal-volume-search-result-grid-element', + styleUrls: ['./journal-volume-search-result-grid-element.component.scss'], + templateUrl: './journal-volume-search-result-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [TruncatableComponent, NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an item search result of the type Journal Volume diff --git a/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal/journal-search-result-grid-element.component.ts b/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal/journal-search-result-grid-element.component.ts index 4fa554ff3b..c5683751ef 100644 --- a/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal/journal-search-result-grid-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-grid-elements/search-result-grid-elements/journal/journal-search-result-grid-element.component.ts @@ -3,13 +3,22 @@ import { focusShadow } from '../../../../../shared/animations/focus'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { ItemSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; @listableObjectComponent('JournalSearchResult', ViewMode.GridElement) @Component({ - selector: 'ds-journal-search-result-grid-element', - styleUrls: ['./journal-search-result-grid-element.component.scss'], - templateUrl: './journal-search-result-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-journal-search-result-grid-element', + styleUrls: ['./journal-search-result-grid-element.component.scss'], + templateUrl: './journal-search-result-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [TruncatableComponent, NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an item search result of the type Journal diff --git a/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.spec.ts index 59af3b9e7b..339430a204 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.spec.ts @@ -43,13 +43,13 @@ describe('JournalIssueListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalIssueListElementComponent, TruncatePipe], - providers: [ + imports: [JournalIssueListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalIssueListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalIssueListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.ts index 454c140050..1ffe5d32c6 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/journal-issue/journal-issue-list-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { JournalIssueSearchResultListElementComponent } from '../search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component'; @listableObjectComponent('JournalIssue', ViewMode.ListElement) @Component({ - selector: 'ds-journal-issue-list-element', - styleUrls: ['./journal-issue-list-element.component.scss'], - templateUrl: './journal-issue-list-element.component.html' + selector: 'ds-journal-issue-list-element', + styleUrls: ['./journal-issue-list-element.component.scss'], + templateUrl: './journal-issue-list-element.component.html', + standalone: true, + imports: [JournalIssueSearchResultListElementComponent] }) /** * The component for displaying a list element for an item of the type Journal Issue diff --git a/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.spec.ts index 663c1e477e..fd690d8283 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.spec.ts @@ -43,13 +43,13 @@ describe('JournalVolumeListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalVolumeListElementComponent, TruncatePipe], - providers: [ + imports: [JournalVolumeListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalVolumeListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalVolumeListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.ts index 5a5bfde49e..75a77e07cd 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/journal-volume/journal-volume-list-element.component.ts @@ -3,12 +3,15 @@ import { AbstractListableElementComponent } from '../../../../shared/object-coll import { Item } from '../../../../core/shared/item.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../../core/shared/view-mode.model'; +import { JournalVolumeSearchResultListElementComponent } from '../search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component'; @listableObjectComponent('JournalVolume', ViewMode.ListElement) @Component({ - selector: 'ds-journal-volume-list-element', - styleUrls: ['./journal-volume-list-element.component.scss'], - templateUrl: './journal-volume-list-element.component.html' + selector: 'ds-journal-volume-list-element', + styleUrls: ['./journal-volume-list-element.component.scss'], + templateUrl: './journal-volume-list-element.component.html', + standalone: true, + imports: [JournalVolumeSearchResultListElementComponent] }) /** * The component for displaying a list element for an item of the type Journal Volume diff --git a/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.spec.ts index e5dd55772b..87ebb34563 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.spec.ts @@ -37,13 +37,13 @@ describe('JournalListElementComponent', () => { beforeEach(waitForAsync(() => { return TestBed.configureTestingModule({ - declarations: [JournalListElementComponent, TruncatePipe], - providers: [ + imports: [JournalListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.ts index fa83c3cff4..7a69dfad59 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/journal/journal-list-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { JournalSearchResultListElementComponent } from '../search-result-list-elements/journal/journal-search-result-list-element.component'; @listableObjectComponent('Journal', ViewMode.ListElement) @Component({ - selector: 'ds-journal-list-element', - styleUrls: ['./journal-list-element.component.scss'], - templateUrl: './journal-list-element.component.html' + selector: 'ds-journal-list-element', + styleUrls: ['./journal-list-element.component.scss'], + templateUrl: './journal-list-element.component.html', + standalone: true, + imports: [JournalSearchResultListElementComponent] }) /** * The component for displaying a list element for an item of the type Journal diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts index 178ed86c40..4f3d3f8102 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.spec.ts @@ -73,15 +73,14 @@ const enviromentNoThumbs = { describe('JournalIssueSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalIssueSearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [JournalIssueSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalIssueSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalIssueSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -161,15 +160,14 @@ describe('JournalIssueSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalIssueSearchResultListElementComponent, TruncatePipe], - providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + imports: [JournalIssueSearchResultListElementComponent, TruncatePipe], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalIssueSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalIssueSearchResultListElementComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.ts index d804006eb1..03122ebca6 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-issue/journal-issue-search-result-list-element.component.ts @@ -2,12 +2,20 @@ import { Component } from '@angular/core'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { ItemSearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; @listableObjectComponent('JournalIssueSearchResult', ViewMode.ListElement) @Component({ - selector: 'ds-journal-issue-search-result-list-element', - styleUrls: ['./journal-issue-search-result-list-element.component.scss'], - templateUrl: './journal-issue-search-result-list-element.component.html' + selector: 'ds-journal-issue-search-result-list-element', + styleUrls: ['./journal-issue-search-result-list-element.component.scss'], + templateUrl: './journal-issue-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, NgFor, AsyncPipe] }) /** * The component for displaying a list element for an item search result of the type Journal Issue diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts index 71fa83a3b1..087977a565 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.spec.ts @@ -72,15 +72,14 @@ const enviromentNoThumbs = { describe('JournalVolumeSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalVolumeSearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [JournalVolumeSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalVolumeSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalVolumeSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -159,15 +158,14 @@ describe('JournalVolumeSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalVolumeSearchResultListElementComponent, TruncatePipe], - providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + imports: [JournalVolumeSearchResultListElementComponent, TruncatePipe], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalVolumeSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalVolumeSearchResultListElementComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.ts index 2a01d20668..c6eb23d818 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal-volume/journal-volume-search-result-list-element.component.ts @@ -2,12 +2,20 @@ import { Component } from '@angular/core'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { ItemSearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; @listableObjectComponent('JournalVolumeSearchResult', ViewMode.ListElement) @Component({ - selector: 'ds-journal-volume-search-result-list-element', - styleUrls: ['./journal-volume-search-result-list-element.component.scss'], - templateUrl: './journal-volume-search-result-list-element.component.html' + selector: 'ds-journal-volume-search-result-list-element', + styleUrls: ['./journal-volume-search-result-list-element.component.scss'], + templateUrl: './journal-volume-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, NgFor, AsyncPipe] }) /** * The component for displaying a list element for an item search result of the type Journal Volume diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts index 07970d7128..9af76539fb 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.spec.ts @@ -68,15 +68,14 @@ const enviromentNoThumbs = { describe('JournalSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalSearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [JournalSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -131,15 +130,14 @@ describe('JournalSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [JournalSearchResultListElementComponent, TruncatePipe], - providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + imports: [JournalSearchResultListElementComponent, TruncatePipe], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalSearchResultListElementComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.ts index 38150d1a6a..c0bf12fd4d 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/search-result-list-elements/journal/journal-search-result-list-element.component.ts @@ -2,12 +2,20 @@ import { Component } from '@angular/core'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { ItemSearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; @listableObjectComponent('JournalSearchResult', ViewMode.ListElement) @Component({ - selector: 'ds-journal-search-result-list-element', - styleUrls: ['./journal-search-result-list-element.component.scss'], - templateUrl: './journal-search-result-list-element.component.html' + selector: 'ds-journal-search-result-list-element', + styleUrls: ['./journal-search-result-list-element.component.scss'], + templateUrl: './journal-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, NgFor, AsyncPipe] }) /** * The component for displaying a list element for an item search result of the type Journal diff --git a/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-issue/journal-issue-sidebar-search-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-issue/journal-issue-sidebar-search-list-element.component.ts index 84764e9e60..d64b65a446 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-issue/journal-issue-sidebar-search-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-issue/journal-issue-sidebar-search-list-element.component.ts @@ -6,12 +6,17 @@ import { Component } from '@angular/core'; import { SidebarSearchListElementComponent } from '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component'; import { Item } from '../../../../../core/shared/item.model'; import { isNotEmpty } from '../../../../../shared/empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent('JournalIssueSearchResult', ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent('JournalIssueSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-journal-issue-sidebar-search-list-element', - templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html' + selector: 'ds-journal-issue-sidebar-search-list-element', + templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link ItemSearchResult} of type "JournalIssue" within the context of diff --git a/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-volume/journal-volume-sidebar-search-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-volume/journal-volume-sidebar-search-list-element.component.ts index 7af5487f40..fc3e6caba9 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-volume/journal-volume-sidebar-search-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal-volume/journal-volume-sidebar-search-list-element.component.ts @@ -6,12 +6,17 @@ import { Component } from '@angular/core'; import { SidebarSearchListElementComponent } from '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component'; import { Item } from '../../../../../core/shared/item.model'; import { isNotEmpty } from '../../../../../shared/empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent('JournalVolumeSearchResult', ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent('JournalVolumeSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-journal-volume-sidebar-search-list-element', - templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html' + selector: 'ds-journal-volume-sidebar-search-list-element', + templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link ItemSearchResult} of type "JournalVolume" within the context of diff --git a/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal/journal-sidebar-search-list-element.component.ts b/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal/journal-sidebar-search-list-element.component.ts index 4a26b293d9..250ca4accc 100644 --- a/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal/journal-sidebar-search-list-element.component.ts +++ b/src/app/entity-groups/journal-entities/item-list-elements/sidebar-search-list-elements/journal/journal-sidebar-search-list-element.component.ts @@ -6,12 +6,17 @@ import { Component } from '@angular/core'; import { SidebarSearchListElementComponent } from '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component'; import { Item } from '../../../../../core/shared/item.model'; import { isNotEmpty } from '../../../../../shared/empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent('JournalSearchResult', ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent('JournalSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-journal-sidebar-search-list-element', - templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html' + selector: 'ds-journal-sidebar-search-list-element', + templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link ItemSearchResult} of type "Journal" within the context of diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts index b749edd732..bdb945c42f 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.ts @@ -2,12 +2,24 @@ import { Component } from '@angular/core'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component'; +import { GenericItemPageFieldComponent } from '../../../../item-page/simple/field-components/specific-field/generic/generic-item-page-field.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { MetadataFieldWrapperComponent } from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; +import { ThemedResultsBackButtonComponent } from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent('JournalIssue', ViewMode.StandalonePage) @Component({ - selector: 'ds-journal-issue', - styleUrls: ['./journal-issue.component.scss'], - templateUrl: './journal-issue.component.html' + selector: 'ds-journal-issue', + styleUrls: ['./journal-issue.component.scss'], + templateUrl: './journal-issue.component.html', + standalone: true, + imports: [NgIf, ThemedResultsBackButtonComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, GenericItemPageFieldComponent, RelatedItemsComponent, RouterLink, AsyncPipe, TranslateModule] }) /** * The component for displaying metadata and relations of an item of the type Journal Issue diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts index 89ee4ad1d2..7a7e1993b5 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.ts @@ -2,12 +2,24 @@ import { Component } from '@angular/core'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component'; +import { GenericItemPageFieldComponent } from '../../../../item-page/simple/field-components/specific-field/generic/generic-item-page-field.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { MetadataFieldWrapperComponent } from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; +import { ThemedResultsBackButtonComponent } from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent('JournalVolume', ViewMode.StandalonePage) @Component({ - selector: 'ds-journal-volume', - styleUrls: ['./journal-volume.component.scss'], - templateUrl: './journal-volume.component.html' + selector: 'ds-journal-volume', + styleUrls: ['./journal-volume.component.scss'], + templateUrl: './journal-volume.component.html', + standalone: true, + imports: [NgIf, ThemedResultsBackButtonComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, GenericItemPageFieldComponent, RelatedItemsComponent, RouterLink, AsyncPipe, TranslateModule] }) /** * The component for displaying metadata and relations of an item of the type Journal Volume diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts index 6e2ded334b..d60d4a2986 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts @@ -75,17 +75,17 @@ describe('JournalComponent', () => { }; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), RouterTestingModule, - ], - declarations: [JournalComponent, GenericItemPageFieldComponent, TruncatePipe], - providers: [ + JournalComponent, GenericItemPageFieldComponent, TruncatePipe + ], + providers: [ { provide: ItemDataService, useValue: {} }, { provide: TruncatableService, useValue: {} }, { provide: RelationshipDataService, useValue: {} }, @@ -106,10 +106,9 @@ describe('JournalComponent', () => { { provide: SearchService, useValue: {} }, { provide: RouteService, useValue: mockRouteService }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(JournalComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(JournalComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts index 4fc03b31c7..c7459c355e 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.ts @@ -2,12 +2,25 @@ import { Component } from '@angular/core'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TabbedRelatedEntitiesSearchComponent } from '../../../../item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component'; +import { RouterLink } from '@angular/router'; +import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component'; +import { GenericItemPageFieldComponent } from '../../../../item-page/simple/field-components/specific-field/generic/generic-item-page-field.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { MetadataFieldWrapperComponent } from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; +import { ThemedResultsBackButtonComponent } from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent('Journal', ViewMode.StandalonePage) @Component({ - selector: 'ds-journal', - styleUrls: ['./journal.component.scss'], - templateUrl: './journal.component.html' + selector: 'ds-journal', + styleUrls: ['./journal.component.scss'], + templateUrl: './journal.component.html', + standalone: true, + imports: [NgIf, ThemedResultsBackButtonComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, GenericItemPageFieldComponent, RelatedItemsComponent, RouterLink, TabbedRelatedEntitiesSearchComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying metadata and relations of an item of the type Journal diff --git a/src/app/entity-groups/journal-entities/journal-entities.module.ts b/src/app/entity-groups/journal-entities/journal-entities.module.ts index 338bbe0cd6..77392fd1db 100644 --- a/src/app/entity-groups/journal-entities/journal-entities.module.ts +++ b/src/app/entity-groups/journal-entities/journal-entities.module.ts @@ -46,16 +46,14 @@ const ENTRY_COMPONENTS = [ ]; @NgModule({ - imports: [ - CommonModule, - ItemSharedModule, - SharedModule, - ResultsBackButtonModule, - DsoPageModule - ], - declarations: [ - ...ENTRY_COMPONENTS - ] + imports: [ + CommonModule, + ItemSharedModule, + SharedModule, + ResultsBackButtonModule, + DsoPageModule, + ...ENTRY_COMPONENTS + ] }) export class JournalEntitiesModule { /** diff --git a/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.spec.ts b/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.spec.ts index 097e973201..ad6b047dbe 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.spec.ts @@ -53,14 +53,13 @@ describe('OrgUnitGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [OrgUnitGridElementComponent, TruncatePipe], - providers: [ + imports: [NoopAnimationsModule, OrgUnitGridElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrgUnitGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrgUnitGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.ts index 05a7f6c8c5..9df2acd405 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/org-unit/org-unit-grid-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { OrgUnitSearchResultGridElementComponent } from '../search-result-grid-elements/org-unit/org-unit-search-result-grid-element.component'; @listableObjectComponent('OrgUnit', ViewMode.GridElement) @Component({ - selector: 'ds-org-unit-grid-element', - styleUrls: ['./org-unit-grid-element.component.scss'], - templateUrl: './org-unit-grid-element.component.html', + selector: 'ds-org-unit-grid-element', + styleUrls: ['./org-unit-grid-element.component.scss'], + templateUrl: './org-unit-grid-element.component.html', + standalone: true, + imports: [OrgUnitSearchResultGridElementComponent] }) /** * The component for displaying a grid element for an item of the type Organisation Unit diff --git a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts index ca0784e997..5f55cef6f9 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.spec.ts @@ -47,14 +47,13 @@ describe('PersonGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [PersonGridElementComponent, TruncatePipe], - providers: [ + imports: [NoopAnimationsModule, PersonGridElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PersonGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PersonGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.ts index 2e3ce5804e..e237579d0f 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/person/person-grid-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { PersonSearchResultGridElementComponent } from '../search-result-grid-elements/person/person-search-result-grid-element.component'; @listableObjectComponent('Person', ViewMode.GridElement) @Component({ - selector: 'ds-person-grid-element', - styleUrls: ['./person-grid-element.component.scss'], - templateUrl: './person-grid-element.component.html', + selector: 'ds-person-grid-element', + styleUrls: ['./person-grid-element.component.scss'], + templateUrl: './person-grid-element.component.html', + standalone: true, + imports: [PersonSearchResultGridElementComponent] }) /** * The component for displaying a grid element for an item of the type Person diff --git a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts index 3f92bfe410..7909f3d6ae 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.spec.ts @@ -41,14 +41,13 @@ describe('ProjectGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ProjectGridElementComponent, TruncatePipe], - providers: [ + imports: [NoopAnimationsModule, ProjectGridElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ProjectGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ProjectGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.ts index 58547960cf..090e61c4e7 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/project/project-grid-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { ProjectSearchResultGridElementComponent } from '../search-result-grid-elements/project/project-search-result-grid-element.component'; @listableObjectComponent('Project', ViewMode.GridElement) @Component({ - selector: 'ds-project-grid-element', - styleUrls: ['./project-grid-element.component.scss'], - templateUrl: './project-grid-element.component.html', + selector: 'ds-project-grid-element', + styleUrls: ['./project-grid-element.component.scss'], + templateUrl: './project-grid-element.component.html', + standalone: true, + imports: [ProjectSearchResultGridElementComponent] }) /** * The component for displaying a grid element for an item of the type Project diff --git a/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/org-unit/org-unit-search-result-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/org-unit/org-unit-search-result-grid-element.component.ts index 872b4b27e3..b4b76bf49e 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/org-unit/org-unit-search-result-grid-element.component.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/org-unit/org-unit-search-result-grid-element.component.ts @@ -3,13 +3,22 @@ import { listableObjectComponent } from '../../../../../shared/object-collection import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { focusShadow } from '../../../../../shared/animations/focus'; import { ItemSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; @listableObjectComponent('OrgUnitSearchResult', ViewMode.GridElement) @Component({ - selector: 'ds-org-unit-search-result-grid-element', - styleUrls: ['./org-unit-search-result-grid-element.component.scss'], - templateUrl: './org-unit-search-result-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-org-unit-search-result-grid-element', + styleUrls: ['./org-unit-search-result-grid-element.component.scss'], + templateUrl: './org-unit-search-result-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [TruncatableComponent, NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an item search result of the type Organisation Unit diff --git a/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/person/person-search-result-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/person/person-search-result-grid-element.component.ts index 851d900755..35e9322cba 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/person/person-search-result-grid-element.component.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/person/person-search-result-grid-element.component.ts @@ -3,13 +3,22 @@ import { listableObjectComponent } from '../../../../../shared/object-collection import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { focusShadow } from '../../../../../shared/animations/focus'; import { ItemSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; @listableObjectComponent('PersonSearchResult', ViewMode.GridElement) @Component({ - selector: 'ds-person-search-result-grid-element', - styleUrls: ['./person-search-result-grid-element.component.scss'], - templateUrl: './person-search-result-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-person-search-result-grid-element', + styleUrls: ['./person-search-result-grid-element.component.scss'], + templateUrl: './person-search-result-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [TruncatableComponent, NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an item search result of the type Person diff --git a/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/project/project-search-result-grid-element.component.ts b/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/project/project-search-result-grid-element.component.ts index 6dfbe93e3e..bb2f7daf4a 100644 --- a/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/project/project-search-result-grid-element.component.ts +++ b/src/app/entity-groups/research-entities/item-grid-elements/search-result-grid-elements/project/project-search-result-grid-element.component.ts @@ -3,13 +3,22 @@ import { listableObjectComponent } from '../../../../../shared/object-collection import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { focusShadow } from '../../../../../shared/animations/focus'; import { ItemSearchResultGridElementComponent } from '../../../../../shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; @listableObjectComponent('ProjectSearchResult', ViewMode.GridElement) @Component({ - selector: 'ds-project-search-result-grid-element', - styleUrls: ['./project-search-result-grid-element.component.scss'], - templateUrl: './project-search-result-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-project-search-result-grid-element', + styleUrls: ['./project-search-result-grid-element.component.scss'], + templateUrl: './project-search-result-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [TruncatableComponent, NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an item search result of the type Project diff --git a/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.spec.ts index 275accc956..6d04ebb07b 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.spec.ts @@ -37,13 +37,13 @@ describe('OrgUnitListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [OrgUnitListElementComponent, TruncatePipe], - providers: [ + imports: [OrgUnitListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrgUnitListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrgUnitListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.ts index 32254595aa..50a821b7d4 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/org-unit/org-unit-list-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { OrgUnitSearchResultListElementComponent } from '../search-result-list-elements/org-unit/org-unit-search-result-list-element.component'; @listableObjectComponent('OrgUnit', ViewMode.ListElement) @Component({ - selector: 'ds-org-unit-list-element', - styleUrls: ['./org-unit-list-element.component.scss'], - templateUrl: './org-unit-list-element.component.html' + selector: 'ds-org-unit-list-element', + styleUrls: ['./org-unit-list-element.component.scss'], + templateUrl: './org-unit-list-element.component.html', + standalone: true, + imports: [OrgUnitSearchResultListElementComponent] }) /** * The component for displaying a list element for an item of the type Organisation Unit diff --git a/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.spec.ts index dc874b8ec8..9c06c68c2a 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.spec.ts @@ -37,13 +37,13 @@ describe('PersonListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [PersonListElementComponent, TruncatePipe], - providers: [ + imports: [PersonListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PersonListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PersonListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.ts index f35ed90c58..516c08d564 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/person/person-list-element.component.ts @@ -3,12 +3,15 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../shared/object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../core/shared/item.model'; +import { PersonSearchResultListElementComponent } from '../search-result-list-elements/person/person-search-result-list-element.component'; @listableObjectComponent('Person', ViewMode.ListElement) @Component({ - selector: 'ds-person-list-element', - styleUrls: ['./person-list-element.component.scss'], - templateUrl: './person-list-element.component.html' + selector: 'ds-person-list-element', + styleUrls: ['./person-list-element.component.scss'], + templateUrl: './person-list-element.component.html', + standalone: true, + imports: [PersonSearchResultListElementComponent] }) /** * The component for displaying a list element for an item of the type Person diff --git a/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.spec.ts index 02241e3060..7fea008e08 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.spec.ts @@ -37,13 +37,13 @@ describe('ProjectListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ProjectListElementComponent, TruncatePipe], - providers: [ + imports: [ProjectListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ProjectListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ProjectListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.ts index 5f158158d8..b7190b2e00 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/project/project-list-element.component.ts @@ -3,12 +3,15 @@ import { AbstractListableElementComponent } from '../../../../shared/object-coll import { Item } from '../../../../core/shared/item.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../../core/shared/view-mode.model'; +import { ProjectSearchResultListElementComponent } from '../search-result-list-elements/project/project-search-result-list-element.component'; @listableObjectComponent('Project', ViewMode.ListElement) @Component({ - selector: 'ds-project-list-element', - styleUrls: ['./project-list-element.component.scss'], - templateUrl: './project-list-element.component.html' + selector: 'ds-project-list-element', + styleUrls: ['./project-list-element.component.scss'], + templateUrl: './project-list-element.component.html', + standalone: true, + imports: [ProjectSearchResultListElementComponent] }) /** * The component for displaying a list element for an item of the type Project diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts index 9609a9582a..ad626118cc 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.spec.ts @@ -68,22 +68,19 @@ const enviromentNoThumbs = { describe('OrgUnitSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - } - )], - declarations: [ OrgUnitSearchResultListElementComponent , TruncatePipe], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), OrgUnitSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [ NO_ERRORS_SCHEMA ] - }).overrideComponent(OrgUnitSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrgUnitSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -138,22 +135,19 @@ describe('OrgUnitSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - } - )], - declarations: [OrgUnitSearchResultListElementComponent, TruncatePipe], - providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), OrgUnitSearchResultListElementComponent, TruncatePipe], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrgUnitSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrgUnitSearchResultListElementComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.ts index a9edb530cb..3582158b8c 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/org-unit/org-unit-search-result-list-element.component.ts @@ -2,12 +2,21 @@ import { Component } from '@angular/core'; import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemSearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgClass, AsyncPipe } from '@angular/common'; @listableObjectComponent('OrgUnitSearchResult', ViewMode.ListElement) @Component({ - selector: 'ds-org-unit-search-result-list-element', - styleUrls: ['./org-unit-search-result-list-element.component.scss'], - templateUrl: './org-unit-search-result-list-element.component.html' + selector: 'ds-org-unit-search-result-list-element', + styleUrls: ['./org-unit-search-result-list-element.component.scss'], + templateUrl: './org-unit-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying a list element for an item search result of the type Organisation Unit diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts index 31018520f6..53548b07fd 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.spec.ts @@ -68,22 +68,19 @@ const enviromentNoThumbs = { describe('PersonSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - } - )], - declarations: [PersonSearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), PersonSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PersonSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PersonSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -138,22 +135,19 @@ describe('PersonSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - } - )], - declarations: [PersonSearchResultListElementComponent, TruncatePipe], - providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), PersonSearchResultListElementComponent, TruncatePipe], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PersonSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PersonSearchResultListElementComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.ts index 41e9e14b1a..cb981ebf54 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/person/person-search-result-list-element.component.ts @@ -9,12 +9,21 @@ import { import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; @listableObjectComponent('PersonSearchResult', ViewMode.ListElement) @Component({ - selector: 'ds-person-search-result-list-element', - styleUrls: ['./person-search-result-list-element.component.scss'], - templateUrl: './person-search-result-list-element.component.html' + selector: 'ds-person-search-result-list-element', + styleUrls: ['./person-search-result-list-element.component.scss'], + templateUrl: './person-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, NgFor, AsyncPipe, TranslateModule] }) /** * The component for displaying a list element for an item search result of the type Person diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts index 0cb3e63e87..0214a6f843 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.spec.ts @@ -67,15 +67,14 @@ const enviromentNoThumbs = { describe('ProjectSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ProjectSearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [ProjectSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ProjectSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ProjectSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -130,16 +129,14 @@ describe('ProjectSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ProjectSearchResultListElementComponent, TruncatePipe], - providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + imports: [ProjectSearchResultListElementComponent, TruncatePipe], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ProjectSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ProjectSearchResultListElementComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.ts index aaf98a8091..a9f6914584 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/search-result-list-elements/project/project-search-result-list-element.component.ts @@ -2,12 +2,19 @@ import { Component } from '@angular/core'; import { listableObjectComponent } from '../../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { ItemSearchResultListElementComponent } from '../../../../../shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; +import { ThemedBadgesComponent } from '../../../../../shared/object-collection/shared/badges/themed-badges.component'; +import { TruncatableComponent } from '../../../../../shared/truncatable/truncatable.component'; +import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgClass, AsyncPipe } from '@angular/common'; @listableObjectComponent('ProjectSearchResult', ViewMode.ListElement) @Component({ - selector: 'ds-project-search-result-list-element', - styleUrls: ['./project-search-result-list-element.component.scss'], - templateUrl: './project-search-result-list-element.component.html' + selector: 'ds-project-search-result-list-element', + styleUrls: ['./project-search-result-list-element.component.scss'], + templateUrl: './project-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThumbnailComponent, NgClass, TruncatableComponent, ThemedBadgesComponent, AsyncPipe] }) /** * The component for displaying a list element for an item search result of the type Project diff --git a/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/org-unit/org-unit-sidebar-search-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/org-unit/org-unit-sidebar-search-list-element.component.ts index 25ff6181b2..c00c1d6470 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/org-unit/org-unit-sidebar-search-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/org-unit/org-unit-sidebar-search-list-element.component.ts @@ -5,12 +5,17 @@ import { ItemSearchResult } from '../../../../../shared/object-collection/shared import { Component } from '@angular/core'; import { SidebarSearchListElementComponent } from '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component'; import { Item } from '../../../../../core/shared/item.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent('OrgUnitSearchResult', ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent('OrgUnitSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-org-unit-sidebar-search-list-element', - templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html' + selector: 'ds-org-unit-sidebar-search-list-element', + templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link ItemSearchResult} of type "OrgUnit" within the context of diff --git a/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/person/person-sidebar-search-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/person/person-sidebar-search-list-element.component.ts index edae6c9ec9..124b7b6225 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/person/person-sidebar-search-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/person/person-sidebar-search-list-element.component.ts @@ -8,14 +8,18 @@ import { Item } from '../../../../../core/shared/item.model'; import { isNotEmpty } from '../../../../../shared/empty.util'; import { TruncatableService } from '../../../../../shared/truncatable/truncatable.service'; import { LinkService } from '../../../../../core/cache/builders/link.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent('PersonSearchResult', ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent('PersonSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-person-sidebar-search-list-element', - templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html' + selector: 'ds-person-sidebar-search-list-element', + templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link ItemSearchResult} of type "Person" within the context of diff --git a/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/project/project-sidebar-search-list-element.component.ts b/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/project/project-sidebar-search-list-element.component.ts index 6fbb9d26fc..22c24ff9b2 100644 --- a/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/project/project-sidebar-search-list-element.component.ts +++ b/src/app/entity-groups/research-entities/item-list-elements/sidebar-search-list-elements/project/project-sidebar-search-list-element.component.ts @@ -5,12 +5,17 @@ import { ItemSearchResult } from '../../../../../shared/object-collection/shared import { Component } from '@angular/core'; import { SidebarSearchListElementComponent } from '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component'; import { Item } from '../../../../../core/shared/item.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../../../shared/truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent('ProjectSearchResult', ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent('ProjectSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-project-sidebar-search-list-element', - templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html' + selector: 'ds-project-sidebar-search-list-element', + templateUrl: '../../../../../shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link ItemSearchResult} of type "Project" within the context of diff --git a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.ts b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.ts index 03a91c34b5..23b1c59d13 100644 --- a/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.ts +++ b/src/app/entity-groups/research-entities/item-pages/org-unit/org-unit.component.ts @@ -2,12 +2,25 @@ import { Component } from '@angular/core'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TabbedRelatedEntitiesSearchComponent } from '../../../../item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component'; +import { RouterLink } from '@angular/router'; +import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component'; +import { GenericItemPageFieldComponent } from '../../../../item-page/simple/field-components/specific-field/generic/generic-item-page-field.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { MetadataFieldWrapperComponent } from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; +import { ThemedResultsBackButtonComponent } from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent('OrgUnit', ViewMode.StandalonePage) @Component({ - selector: 'ds-org-unit', - styleUrls: ['./org-unit.component.scss'], - templateUrl: './org-unit.component.html' + selector: 'ds-org-unit', + styleUrls: ['./org-unit.component.scss'], + templateUrl: './org-unit.component.html', + standalone: true, + imports: [NgIf, ThemedResultsBackButtonComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, GenericItemPageFieldComponent, RelatedItemsComponent, RouterLink, TabbedRelatedEntitiesSearchComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying metadata and relations of an item of the type Organisation Unit diff --git a/src/app/entity-groups/research-entities/item-pages/person/person.component.ts b/src/app/entity-groups/research-entities/item-pages/person/person.component.ts index e5e2a52338..e5671af168 100644 --- a/src/app/entity-groups/research-entities/item-pages/person/person.component.ts +++ b/src/app/entity-groups/research-entities/item-pages/person/person.component.ts @@ -2,12 +2,25 @@ import { Component } from '@angular/core'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { TabbedRelatedEntitiesSearchComponent } from '../../../../item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component'; +import { RouterLink } from '@angular/router'; +import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component'; +import { GenericItemPageFieldComponent } from '../../../../item-page/simple/field-components/specific-field/generic/generic-item-page-field.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { MetadataFieldWrapperComponent } from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; +import { ThemedResultsBackButtonComponent } from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent('Person', ViewMode.StandalonePage) @Component({ - selector: 'ds-person', - styleUrls: ['./person.component.scss'], - templateUrl: './person.component.html' + selector: 'ds-person', + styleUrls: ['./person.component.scss'], + templateUrl: './person.component.html', + standalone: true, + imports: [NgIf, ThemedResultsBackButtonComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, GenericItemPageFieldComponent, RelatedItemsComponent, RouterLink, TabbedRelatedEntitiesSearchComponent, AsyncPipe, TranslateModule] }) /** * The component for displaying metadata and relations of an item of the type Person diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.ts b/src/app/entity-groups/research-entities/item-pages/project/project.component.ts index b573ffc58e..46bde0d720 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.ts +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.ts @@ -2,12 +2,25 @@ import { Component } from '@angular/core'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../../../../item-page/simple/item-types/shared/item.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { RelatedItemsComponent } from '../../../../item-page/simple/related-items/related-items-component'; +import { GenericItemPageFieldComponent } from '../../../../item-page/simple/field-components/specific-field/generic/generic-item-page-field.component'; +import { ThemedMetadataRepresentationListComponent } from '../../../../item-page/simple/metadata-representation-list/themed-metadata-representation-list.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { MetadataFieldWrapperComponent } from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; +import { ThemedResultsBackButtonComponent } from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @listableObjectComponent('Project', ViewMode.StandalonePage) @Component({ - selector: 'ds-project', - styleUrls: ['./project.component.scss'], - templateUrl: './project.component.html' + selector: 'ds-project', + styleUrls: ['./project.component.scss'], + templateUrl: './project.component.html', + standalone: true, + imports: [NgIf, ThemedResultsBackButtonComponent, ThemedItemPageTitleFieldComponent, DsoEditMenuComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, ThemedMetadataRepresentationListComponent, GenericItemPageFieldComponent, RelatedItemsComponent, RouterLink, AsyncPipe, TranslateModule] }) /** * The component for displaying metadata and relations of an item of the type Project diff --git a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts index 429f2986b9..ad530fdb05 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.spec.ts @@ -21,12 +21,12 @@ describe('OrgUnitItemMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports:[ - NgbModule - ], - declarations: [OrgUnitItemMetadataListElementComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrgUnitItemMetadataListElementComponent, { + imports: [ + NgbModule, + OrgUnitItemMetadataListElementComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrgUnitItemMetadataListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts index 183bebe10c..839241742f 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/org-unit/org-unit-item-metadata-list-element.component.ts @@ -2,11 +2,16 @@ import { Component } from '@angular/core'; import { metadataRepresentationComponent } from '../../../../shared/metadata-representation/metadata-representation.decorator'; import { MetadataRepresentationType } from '../../../../core/shared/metadata-representation/metadata-representation.model'; import { ItemMetadataRepresentationListElementComponent } from '../../../../shared/object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { RouterLink } from '@angular/router'; +import { TruncatableComponent } from '../../../../shared/truncatable/truncatable.component'; @metadataRepresentationComponent('OrgUnit', MetadataRepresentationType.Item) @Component({ - selector: 'ds-org-unit-item-metadata-list-element', - templateUrl: './org-unit-item-metadata-list-element.component.html' + selector: 'ds-org-unit-item-metadata-list-element', + templateUrl: './org-unit-item-metadata-list-element.component.html', + standalone: true, + imports: [TruncatableComponent, RouterLink, NgbTooltipModule] }) /** * The component for displaying an item of the type OrgUnit as a metadata field diff --git a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts index b9ebf19b67..340cb77d62 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.spec.ts @@ -23,12 +23,12 @@ describe('PersonItemMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports:[ - NgbModule - ], - declarations: [PersonItemMetadataListElementComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PersonItemMetadataListElementComponent, { + imports: [ + NgbModule, + PersonItemMetadataListElementComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PersonItemMetadataListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts index f3d0a28fda..293bfc9754 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/person/person-item-metadata-list-element.component.ts @@ -2,11 +2,17 @@ import { Component } from '@angular/core'; import { metadataRepresentationComponent } from '../../../../shared/metadata-representation/metadata-representation.decorator'; import { MetadataRepresentationType } from '../../../../core/shared/metadata-representation/metadata-representation.model'; import { ItemMetadataRepresentationListElementComponent } from '../../../../shared/object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { RouterLink } from '@angular/router'; +import { TruncatableComponent } from '../../../../shared/truncatable/truncatable.component'; +import { NgIf, NgFor } from '@angular/common'; @metadataRepresentationComponent('Person', MetadataRepresentationType.Item) @Component({ - selector: 'ds-person-item-metadata-list-element', - templateUrl: './person-item-metadata-list-element.component.html' + selector: 'ds-person-item-metadata-list-element', + templateUrl: './person-item-metadata-list-element.component.html', + standalone: true, + imports: [NgIf, NgFor, TruncatableComponent, RouterLink, NgbTooltipModule] }) /** * The component for displaying an item of the type Person as a metadata field diff --git a/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.spec.ts b/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.spec.ts index afa565ce40..edbc9d4fe5 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.spec.ts @@ -23,15 +23,15 @@ describe('ProjectItemMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports:[ - NgbModule - ], - declarations: [ProjectItemMetadataListElementComponent], - providers: [ + imports: [ + NgbModule, + ProjectItemMetadataListElementComponent + ], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ProjectItemMetadataListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ProjectItemMetadataListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.ts b/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.ts index a38a1f5cff..fd3b9dd217 100644 --- a/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.ts +++ b/src/app/entity-groups/research-entities/metadata-representations/project/project-item-metadata-list-element.component.ts @@ -3,11 +3,16 @@ import { metadataRepresentationComponent } from '../../../../shared/metadata-rep import { MetadataRepresentationType } from '../../../../core/shared/metadata-representation/metadata-representation.model'; import { ItemMetadataRepresentationListElementComponent } from '../../../../shared/object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { RouterLink } from '@angular/router'; +import { TruncatableComponent } from '../../../../shared/truncatable/truncatable.component'; @metadataRepresentationComponent('Project', MetadataRepresentationType.Item) @Component({ - selector: 'ds-project-item-metadata-list-element', - templateUrl: './project-item-metadata-list-element.component.html' + selector: 'ds-project-item-metadata-list-element', + templateUrl: './project-item-metadata-list-element.component.html', + standalone: true, + imports: [TruncatableComponent, RouterLink, NgbTooltipModule] }) /** * The component for displaying an item of the type Project as a metadata field diff --git a/src/app/entity-groups/research-entities/research-entities.module.ts b/src/app/entity-groups/research-entities/research-entities.module.ts index 95b183f630..0f8c6d0667 100644 --- a/src/app/entity-groups/research-entities/research-entities.module.ts +++ b/src/app/entity-groups/research-entities/research-entities.module.ts @@ -69,17 +69,15 @@ const COMPONENTS = [ ]; @NgModule({ - imports: [ - CommonModule, - ItemSharedModule, - SharedModule, - NgbTooltipModule, - ResultsBackButtonModule, - DsoPageModule, - ], - declarations: [ - ...COMPONENTS, - ] + imports: [ + CommonModule, + ItemSharedModule, + SharedModule, + NgbTooltipModule, + ResultsBackButtonModule, + DsoPageModule, + ...COMPONENTS + ] }) export class ResearchEntitiesModule { /** diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.spec.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.spec.ts index a5d56c1554..50e9b49346 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.spec.ts @@ -24,10 +24,9 @@ describe('ExternalSourceEntryListSubmissionElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ExternalSourceEntryListSubmissionElementComponent], - imports: [TranslateModule.forRoot()], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), ExternalSourceEntryListSubmissionElementComponent], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.ts index 7dee15ca05..25321378bc 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/external-source-entry/external-source-entry-list-submission-element.component.ts @@ -6,13 +6,16 @@ import { Context } from '../../../../../core/shared/context.model'; import { Component, OnInit } from '@angular/core'; import { Metadata } from '../../../../../core/shared/metadata.utils'; import { MetadataValue } from '../../../../../core/shared/metadata.models'; +import { NgIf } from '@angular/common'; @listableObjectComponent(ExternalSourceEntry, ViewMode.ListElement, Context.EntitySearchModal) @listableObjectComponent(ExternalSourceEntry, ViewMode.ListElement, Context.EntitySearchModalWithNameVariants) @Component({ - selector: 'ds-external-source-entry-list-submission-element', - styleUrls: ['./external-source-entry-list-submission-element.component.scss'], - templateUrl: './external-source-entry-list-submission-element.component.html' + selector: 'ds-external-source-entry-list-submission-element', + styleUrls: ['./external-source-entry-list-submission-element.component.scss'], + templateUrl: './external-source-entry-list-submission-element.component.html', + standalone: true, + imports: [NgIf] }) /** * The component for displaying a list element of an external source entry diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.spec.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.spec.ts index 45f5c5f41c..5014077624 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.spec.ts @@ -100,8 +100,8 @@ describe('OrgUnitSearchResultListSubmissionElementComponent', () => { } }; TestBed.configureTestingModule({ - declarations: [OrgUnitSearchResultListSubmissionElementComponent, TruncatePipe], - providers: [ + imports: [OrgUnitSearchResultListSubmissionElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: RelationshipDataService, useValue: mockRelationshipService }, { provide: NotificationsService, useValue: {} }, @@ -121,10 +121,9 @@ describe('OrgUnitSearchResultListSubmissionElementComponent', () => { { provide: BitstreamDataService, useValue: mockBitstreamDataService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrgUnitSearchResultListSubmissionElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrgUnitSearchResultListSubmissionElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.ts index ef58007bae..3bace20fb3 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-search-result-list-submission-element.component.ts @@ -18,13 +18,18 @@ import { SelectableListService } from '../../../../../shared/object-list/selecta import { NameVariantModalComponent } from '../../name-variant-modal/name-variant-modal.component'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface'; +import { FormsModule } from '@angular/forms'; +import { OrgUnitInputSuggestionsComponent } from './org-unit-suggestions/org-unit-input-suggestions.component'; +import { NgIf } from '@angular/common'; @listableObjectComponent('OrgUnitSearchResult', ViewMode.ListElement, Context.EntitySearchModal) @listableObjectComponent('OrgUnitSearchResult', ViewMode.ListElement, Context.EntitySearchModalWithNameVariants) @Component({ - selector: 'ds-person-search-result-list-submission-element', - styleUrls: ['./org-unit-search-result-list-submission-element.component.scss'], - templateUrl: './org-unit-search-result-list-submission-element.component.html' + selector: 'ds-person-search-result-list-submission-element', + styleUrls: ['./org-unit-search-result-list-submission-element.component.scss'], + templateUrl: './org-unit-search-result-list-submission-element.component.html', + standalone: true, + imports: [NgIf, OrgUnitInputSuggestionsComponent, FormsModule] }) /** diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.spec.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.spec.ts index 0981d895ec..8d3ced1644 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.spec.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.spec.ts @@ -18,14 +18,13 @@ describe('OrgUnitInputSuggestionsComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [OrgUnitInputSuggestionsComponent], - imports: [ + imports: [ FormsModule, - ], - providers: [ - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrgUnitInputSuggestionsComponent, { + OrgUnitInputSuggestionsComponent + ], + providers: [], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrgUnitInputSuggestionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.ts index a7fe2a99dd..5aa93d3226 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/org-unit/org-unit-suggestions/org-unit-input-suggestions.component.ts @@ -1,20 +1,25 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'; -import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'; import { InputSuggestionsComponent } from '../../../../../../shared/input-suggestions/input-suggestions.component'; +import { NgClass, NgFor, AsyncPipe } from '@angular/common'; +import { DebounceDirective } from '../../../../../../shared/utils/debounce.directive'; +import { ClickOutsideDirective } from '../../../../../../shared/utils/click-outside.directive'; @Component({ - selector: 'ds-org-unit-input-suggestions', - styleUrls: ['./org-unit-input-suggestions.component.scss', './../../../../../../shared/input-suggestions/input-suggestions.component.scss'], - templateUrl: './org-unit-input-suggestions.component.html', - providers: [ - { - provide: NG_VALUE_ACCESSOR, - // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 - // eslint-disable-next-line @angular-eslint/no-forward-ref - useExisting: forwardRef(() => OrgUnitInputSuggestionsComponent), - multi: true - } - ] + selector: 'ds-org-unit-input-suggestions', + styleUrls: ['./org-unit-input-suggestions.component.scss', './../../../../../../shared/input-suggestions/input-suggestions.component.scss'], + templateUrl: './org-unit-input-suggestions.component.html', + providers: [ + { + provide: NG_VALUE_ACCESSOR, + // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 + // eslint-disable-next-line @angular-eslint/no-forward-ref + useExisting: forwardRef(() => OrgUnitInputSuggestionsComponent), + multi: true + } + ], + standalone: true, + imports: [FormsModule, ClickOutsideDirective, DebounceDirective, NgClass, NgFor, AsyncPipe] }) /** diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts index 9e4d347150..e5d66e7b53 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.spec.ts @@ -103,8 +103,8 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [PersonSearchResultListSubmissionElementComponent, TruncatePipe], - providers: [ + imports: [PersonSearchResultListSubmissionElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: RelationshipDataService, useValue: mockRelationshipService }, { provide: NotificationsService, useValue: {} }, @@ -112,7 +112,7 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { { provide: NgbModal, useValue: {} }, { provide: ItemDataService, useValue: {} }, { provide: SelectableListService, useValue: {} }, - { provide: Store, useValue: {}}, + { provide: Store, useValue: {} }, { provide: ObjectCacheService, useValue: {} }, { provide: UUIDService, useValue: {} }, { provide: RemoteDataBuildService, useValue: {} }, @@ -123,10 +123,9 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { { provide: DefaultChangeAnalyzer, useValue: {} }, { provide: BitstreamDataService, useValue: mockBitstreamDataService }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PersonSearchResultListSubmissionElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PersonSearchResultListSubmissionElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -183,8 +182,8 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [PersonSearchResultListSubmissionElementComponent, TruncatePipe], - providers: [ + imports: [PersonSearchResultListSubmissionElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: RelationshipDataService, useValue: mockRelationshipService }, { provide: NotificationsService, useValue: {} }, @@ -192,7 +191,7 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { { provide: NgbModal, useValue: {} }, { provide: ItemDataService, useValue: {} }, { provide: SelectableListService, useValue: {} }, - { provide: Store, useValue: {}}, + { provide: Store, useValue: {} }, { provide: ObjectCacheService, useValue: {} }, { provide: UUIDService, useValue: {} }, { provide: RemoteDataBuildService, useValue: {} }, @@ -203,10 +202,9 @@ describe('PersonSearchResultListElementSubmissionComponent', () => { { provide: DefaultChangeAnalyzer, useValue: {} }, { provide: BitstreamDataService, useValue: mockBitstreamDataService }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PersonSearchResultListSubmissionElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PersonSearchResultListSubmissionElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.ts index c9826e440b..d687d548af 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-search-result-list-submission-element.component.ts @@ -18,12 +18,18 @@ import { ItemDataService } from '../../../../../core/data/item-data.service'; import { SelectableListService } from '../../../../../shared/object-list/selectable-list/selectable-list.service'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface'; +import { FormsModule } from '@angular/forms'; +import { PersonInputSuggestionsComponent } from './person-suggestions/person-input-suggestions.component'; +import { ThumbnailComponent } from '../../../../../thumbnail/thumbnail.component'; +import { NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; @listableObjectComponent('PersonSearchResult', ViewMode.ListElement, Context.EntitySearchModalWithNameVariants) @Component({ - selector: 'ds-person-search-result-list-submission-element', - styleUrls: ['./person-search-result-list-submission-element.component.scss'], - templateUrl: './person-search-result-list-submission-element.component.html' + selector: 'ds-person-search-result-list-submission-element', + styleUrls: ['./person-search-result-list-submission-element.component.scss'], + templateUrl: './person-search-result-list-submission-element.component.html', + standalone: true, + imports: [NgIf, ThumbnailComponent, NgClass, PersonInputSuggestionsComponent, FormsModule, NgFor, AsyncPipe] }) /** diff --git a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-suggestions/person-input-suggestions.component.ts b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-suggestions/person-input-suggestions.component.ts index 5109a19963..4b5afe07ef 100644 --- a/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-suggestions/person-input-suggestions.component.ts +++ b/src/app/entity-groups/research-entities/submission/item-list-elements/person/person-suggestions/person-input-suggestions.component.ts @@ -1,20 +1,25 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'; -import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'; import { InputSuggestionsComponent } from '../../../../../../shared/input-suggestions/input-suggestions.component'; +import { NgClass, NgFor, AsyncPipe } from '@angular/common'; +import { DebounceDirective } from '../../../../../../shared/utils/debounce.directive'; +import { ClickOutsideDirective } from '../../../../../../shared/utils/click-outside.directive'; @Component({ - selector: 'ds-person-input-suggestions', - styleUrls: ['./person-input-suggestions.component.scss', './../../../../../../shared/input-suggestions/input-suggestions.component.scss'], - templateUrl: './person-input-suggestions.component.html', - providers: [ - { - provide: NG_VALUE_ACCESSOR, - // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 - // eslint-disable-next-line @angular-eslint/no-forward-ref - useExisting: forwardRef(() => PersonInputSuggestionsComponent), - multi: true - } - ] + selector: 'ds-person-input-suggestions', + styleUrls: ['./person-input-suggestions.component.scss', './../../../../../../shared/input-suggestions/input-suggestions.component.scss'], + templateUrl: './person-input-suggestions.component.html', + providers: [ + { + provide: NG_VALUE_ACCESSOR, + // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 + // eslint-disable-next-line @angular-eslint/no-forward-ref + useExisting: forwardRef(() => PersonInputSuggestionsComponent), + multi: true + } + ], + standalone: true, + imports: [FormsModule, ClickOutsideDirective, DebounceDirective, NgClass, NgFor, AsyncPipe] }) /** diff --git a/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.spec.ts b/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.spec.ts index 4a28c203fc..9028257856 100644 --- a/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.spec.ts +++ b/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.spec.ts @@ -17,10 +17,9 @@ describe('NameVariantModalComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [NameVariantModalComponent], - imports: [NgbModule, TranslateModule.forRoot()], - providers: [{ provide: NgbActiveModal, useValue: modal }] - }) + imports: [NgbModule, TranslateModule.forRoot(), NameVariantModalComponent], + providers: [{ provide: NgbActiveModal, useValue: modal }] +}) .compileComponents(); })); diff --git a/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.ts b/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.ts index eb6f7d01ac..e92c47c242 100644 --- a/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.ts +++ b/src/app/entity-groups/research-entities/submission/name-variant-modal/name-variant-modal.component.ts @@ -1,14 +1,17 @@ import { Component, Input } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component a pop up for when the user selects a custom name variant during submission for a relationship$ * The user can either choose to decline or accept to save the name variant as a metadata in the entity */ @Component({ - selector: 'ds-name-variant-modal', - templateUrl: './name-variant-modal.component.html', - styleUrls: ['./name-variant-modal.component.scss'] + selector: 'ds-name-variant-modal', + templateUrl: './name-variant-modal.component.html', + styleUrls: ['./name-variant-modal.component.scss'], + standalone: true, + imports: [TranslateModule] }) /** * The component for the modal to add a name variant to an item diff --git a/src/app/footer/footer.component.spec.ts b/src/app/footer/footer.component.spec.ts index 9f0250edc4..ebf63a7114 100644 --- a/src/app/footer/footer.component.spec.ts +++ b/src/app/footer/footer.component.spec.ts @@ -28,19 +28,18 @@ describe('Footer component', () => { // waitForAsync beforeEach beforeEach(waitForAsync(() => { return TestBed.configureTestingModule({ - imports: [CommonModule, StoreModule.forRoot({}, storeModuleConfig), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [FooterComponent], // declare the test component - providers: [ + imports: [CommonModule, StoreModule.forRoot({}, storeModuleConfig), TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), FooterComponent], + providers: [ FooterComponent, { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); // synchronous beforeEach diff --git a/src/app/footer/footer.component.ts b/src/app/footer/footer.component.ts index f5e4c3799a..efd81faaeb 100644 --- a/src/app/footer/footer.component.ts +++ b/src/app/footer/footer.component.ts @@ -5,11 +5,16 @@ import { environment } from '../../environments/environment'; import { Observable } from 'rxjs'; import { AuthorizationDataService } from '../core/data/feature-authorization/authorization-data.service'; import { FeatureID } from '../core/data/feature-authorization/feature-id'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe, DatePipe } from '@angular/common'; @Component({ - selector: 'ds-footer', - styleUrls: ['footer.component.scss'], - templateUrl: 'footer.component.html' + selector: 'ds-footer', + styleUrls: ['footer.component.scss'], + templateUrl: 'footer.component.html', + standalone: true, + imports: [NgIf, RouterLink, AsyncPipe, DatePipe, TranslateModule] }) export class FooterComponent { dateObj: number = Date.now(); diff --git a/src/app/footer/themed-footer.component.ts b/src/app/footer/themed-footer.component.ts index e8f64f3434..d3c74e74c4 100644 --- a/src/app/footer/themed-footer.component.ts +++ b/src/app/footer/themed-footer.component.ts @@ -6,9 +6,10 @@ import { FooterComponent } from './footer.component'; * Themed wrapper for FooterComponent */ @Component({ - selector: 'ds-themed-footer', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-footer', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedFooterComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/forbidden/forbidden.component.ts b/src/app/forbidden/forbidden.component.ts index b622a0f066..5f46fa9198 100644 --- a/src/app/forbidden/forbidden.component.ts +++ b/src/app/forbidden/forbidden.component.ts @@ -1,14 +1,18 @@ import { Component, OnInit } from '@angular/core'; import { AuthService } from '../core/auth/auth.service'; import { ServerResponseService } from '../core/services/server-response.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; /** * This component representing the `Forbidden` DSpace page. */ @Component({ - selector: 'ds-forbidden', - templateUrl: './forbidden.component.html', - styleUrls: ['./forbidden.component.scss'] + selector: 'ds-forbidden', + templateUrl: './forbidden.component.html', + styleUrls: ['./forbidden.component.scss'], + standalone: true, + imports: [RouterLink, TranslateModule] }) export class ForbiddenComponent implements OnInit { diff --git a/src/app/forbidden/themed-forbidden.component.ts b/src/app/forbidden/themed-forbidden.component.ts index 830529c8fa..5bd24f3434 100644 --- a/src/app/forbidden/themed-forbidden.component.ts +++ b/src/app/forbidden/themed-forbidden.component.ts @@ -6,9 +6,10 @@ import { ForbiddenComponent } from './forbidden.component'; * Themed wrapper for ForbiddenComponent */ @Component({ - selector: 'ds-themed-forbidden', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-forbidden', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedForbiddenComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/forgot-password/forgot-password-email/forgot-email.component.spec.ts b/src/app/forgot-password/forgot-password-email/forgot-email.component.spec.ts index 6ce13c31d3..97b43ccbaa 100644 --- a/src/app/forgot-password/forgot-password-email/forgot-email.component.spec.ts +++ b/src/app/forgot-password/forgot-password-email/forgot-email.component.spec.ts @@ -11,10 +11,9 @@ describe('ForgotEmailComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, TranslateModule.forRoot(), ReactiveFormsModule], - declarations: [ForgotEmailComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [CommonModule, TranslateModule.forRoot(), ReactiveFormsModule, ForgotEmailComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(ForgotEmailComponent); diff --git a/src/app/forgot-password/forgot-password-email/forgot-email.component.ts b/src/app/forgot-password/forgot-password-email/forgot-email.component.ts index 66a61ed7ee..758b4d9d23 100644 --- a/src/app/forgot-password/forgot-password-email/forgot-email.component.ts +++ b/src/app/forgot-password/forgot-password-email/forgot-email.component.ts @@ -1,10 +1,17 @@ import { Component } from '@angular/core'; -import { TYPE_REQUEST_FORGOT } from '../../register-email-form/register-email-form.component'; +import { + RegisterEmailFormComponent, + TYPE_REQUEST_FORGOT +} from '../../register-email-form/register-email-form.component'; @Component({ selector: 'ds-forgot-email', styleUrls: ['./forgot-email.component.scss'], - templateUrl: './forgot-email.component.html' + templateUrl: './forgot-email.component.html', + imports: [ + RegisterEmailFormComponent + ], + standalone: true }) /** * Component responsible the forgot password email step diff --git a/src/app/forgot-password/forgot-password-email/themed-forgot-email.component.ts b/src/app/forgot-password/forgot-password-email/themed-forgot-email.component.ts index da3848db1d..2727bd1e3e 100644 --- a/src/app/forgot-password/forgot-password-email/themed-forgot-email.component.ts +++ b/src/app/forgot-password/forgot-password-email/themed-forgot-email.component.ts @@ -6,9 +6,10 @@ import { ForgotEmailComponent } from './forgot-email.component'; * Themed wrapper for ForgotEmailComponent */ @Component({ - selector: 'ds-themed-forgot-email', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html' + selector: 'ds-themed-forgot-email', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedForgotEmailComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts index 92d72d83df..9b8276c602 100644 --- a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts +++ b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.spec.ts @@ -53,18 +53,17 @@ describe('ForgotPasswordFormComponent', () => { }); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule], - declarations: [ForgotPasswordFormComponent], - providers: [ - {provide: Router, useValue: router}, - {provide: ActivatedRoute, useValue: route}, - {provide: Store, useValue: store}, - {provide: EPersonDataService, useValue: ePersonDataService}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: notificationsService}, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule, ForgotPasswordFormComponent], + providers: [ + { provide: Router, useValue: router }, + { provide: ActivatedRoute, useValue: route }, + { provide: Store, useValue: store }, + { provide: EPersonDataService, useValue: ePersonDataService }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: notificationsService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(ForgotPasswordFormComponent); diff --git a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.ts b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.ts index e20683e6e3..6174fcae7f 100644 --- a/src/app/forgot-password/forgot-password-form/forgot-password-form.component.ts +++ b/src/app/forgot-password/forgot-password-form/forgot-password-form.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; import { EPersonDataService } from '../../core/eperson/eperson-data.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { Observable } from 'rxjs'; import { Registration } from '../../core/shared/registration.model'; @@ -12,11 +12,22 @@ import { RemoteData } from '../../core/data/remote-data'; import { EPerson } from '../../core/eperson/models/eperson.model'; import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload, } from '../../core/shared/operators'; import { CoreState } from '../../core/core-state.model'; +import { + ProfilePageSecurityFormComponent +} from '../../profile-page/profile-page-security-form/profile-page-security-form.component'; +import { AsyncPipe, NgIf } from '@angular/common'; @Component({ selector: 'ds-forgot-password-form', styleUrls: ['./forgot-password-form.component.scss'], - templateUrl: './forgot-password-form.component.html' + templateUrl: './forgot-password-form.component.html', + imports: [ + TranslateModule, + ProfilePageSecurityFormComponent, + AsyncPipe, + NgIf + ], + standalone: true }) /** * Component for a user to enter a new password for a forgot token. diff --git a/src/app/forgot-password/forgot-password-form/themed-forgot-password-form.component.ts b/src/app/forgot-password/forgot-password-form/themed-forgot-password-form.component.ts index 3fb1b67e01..24e8abfde7 100644 --- a/src/app/forgot-password/forgot-password-form/themed-forgot-password-form.component.ts +++ b/src/app/forgot-password/forgot-password-form/themed-forgot-password-form.component.ts @@ -6,9 +6,10 @@ import { ForgotPasswordFormComponent } from './forgot-password-form.component'; * Themed wrapper for ForgotPasswordFormComponent */ @Component({ - selector: 'ds-themed-forgot-password-form', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html' + selector: 'ds-themed-forgot-password-form', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedForgotPasswordFormComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/forgot-password/forgot-password.module.ts b/src/app/forgot-password/forgot-password.module.ts index 593149d2a5..23e03619ad 100644 --- a/src/app/forgot-password/forgot-password.module.ts +++ b/src/app/forgot-password/forgot-password.module.ts @@ -10,20 +10,18 @@ import { ThemedForgotPasswordFormComponent } from './forgot-password-form/themed import { ThemedForgotEmailComponent } from './forgot-password-email/themed-forgot-email.component'; @NgModule({ - imports: [ - CommonModule, - SharedModule, - ForgotPasswordRoutingModule, - RegisterEmailFormModule, - ProfilePageModule, - ], - declarations: [ - ForgotEmailComponent, - ThemedForgotEmailComponent, - ForgotPasswordFormComponent, - ThemedForgotPasswordFormComponent, - ], - providers: [] + imports: [ + CommonModule, + SharedModule, + ForgotPasswordRoutingModule, + RegisterEmailFormModule, + ProfilePageModule, + ForgotEmailComponent, + ThemedForgotEmailComponent, + ForgotPasswordFormComponent, + ThemedForgotPasswordFormComponent + ], + providers: [] }) /** diff --git a/src/app/header-nav-wrapper/header-navbar-wrapper.component.ts b/src/app/header-nav-wrapper/header-navbar-wrapper.component.ts index a610b2cb02..3ca19e7568 100644 --- a/src/app/header-nav-wrapper/header-navbar-wrapper.component.ts +++ b/src/app/header-nav-wrapper/header-navbar-wrapper.component.ts @@ -5,14 +5,19 @@ import { hasValue } from '../shared/empty.util'; import { Observable, Subscription } from 'rxjs'; import { MenuService } from '../shared/menu/menu.service'; import { MenuID } from '../shared/menu/menu-id.model'; +import { ThemedNavbarComponent } from '../navbar/themed-navbar.component'; +import { ThemedHeaderComponent } from '../header/themed-header.component'; +import { NgClass, AsyncPipe } from '@angular/common'; /** * This component represents a wrapper for the horizontal navbar and the header */ @Component({ - selector: 'ds-header-navbar-wrapper', - styleUrls: ['header-navbar-wrapper.component.scss'], - templateUrl: 'header-navbar-wrapper.component.html', + selector: 'ds-header-navbar-wrapper', + styleUrls: ['header-navbar-wrapper.component.scss'], + templateUrl: 'header-navbar-wrapper.component.html', + standalone: true, + imports: [NgClass, ThemedHeaderComponent, ThemedNavbarComponent, AsyncPipe] }) export class HeaderNavbarWrapperComponent implements OnInit, OnDestroy { @HostBinding('class.open') isOpen = false; diff --git a/src/app/header-nav-wrapper/themed-header-navbar-wrapper.component.ts b/src/app/header-nav-wrapper/themed-header-navbar-wrapper.component.ts index 02d09c44ef..aa324a7147 100644 --- a/src/app/header-nav-wrapper/themed-header-navbar-wrapper.component.ts +++ b/src/app/header-nav-wrapper/themed-header-navbar-wrapper.component.ts @@ -6,9 +6,10 @@ import { HeaderNavbarWrapperComponent } from './header-navbar-wrapper.component' * Themed wrapper for {@link HeaderNavbarWrapperComponent} */ @Component({ - selector: 'ds-themed-header-navbar-wrapper', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-header-navbar-wrapper', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedHeaderNavbarWrapperComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/header/context-help-toggle/context-help-toggle.component.spec.ts b/src/app/header/context-help-toggle/context-help-toggle.component.spec.ts index 2d1b5bad20..5e79beb1bd 100644 --- a/src/app/header/context-help-toggle/context-help-toggle.component.spec.ts +++ b/src/app/header/context-help-toggle/context-help-toggle.component.spec.ts @@ -17,12 +17,11 @@ describe('ContextHelpToggleComponent', () => { ]); contextHelpService.tooltipCount$.and.returnValue(observableOf(0)); await TestBed.configureTestingModule({ - declarations: [ ContextHelpToggleComponent ], - providers: [ + providers: [ { provide: ContextHelpService, useValue: contextHelpService }, - ], - imports: [ TranslateModule.forRoot() ] - }) + ], + imports: [TranslateModule.forRoot(), ContextHelpToggleComponent] +}) .compileComponents(); }); diff --git a/src/app/header/context-help-toggle/context-help-toggle.component.ts b/src/app/header/context-help-toggle/context-help-toggle.component.ts index 6685df7106..ee46b88806 100644 --- a/src/app/header/context-help-toggle/context-help-toggle.component.ts +++ b/src/app/header/context-help-toggle/context-help-toggle.component.ts @@ -2,15 +2,19 @@ import { Component, OnInit } from '@angular/core'; import { ContextHelpService } from '../../shared/context-help.service'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * Renders a "context help toggle" button that toggles the visibility of tooltip buttons on the page. * If there are no tooltip buttons available on the current page, the toggle is unclickable. */ @Component({ - selector: 'ds-context-help-toggle', - templateUrl: './context-help-toggle.component.html', - styleUrls: ['./context-help-toggle.component.scss'] + selector: 'ds-context-help-toggle', + templateUrl: './context-help-toggle.component.html', + styleUrls: ['./context-help-toggle.component.scss'], + standalone: true, + imports: [NgIf, AsyncPipe, TranslateModule] }) export class ContextHelpToggleComponent implements OnInit { buttonVisible$: Observable; diff --git a/src/app/header/header.component.spec.ts b/src/app/header/header.component.spec.ts index 9bc952cee3..f8e9933db6 100644 --- a/src/app/header/header.component.spec.ts +++ b/src/app/header/header.component.spec.ts @@ -20,16 +20,17 @@ describe('HeaderComponent', () => { // waitForAsync beforeEach beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), NoopAnimationsModule, - ReactiveFormsModule], - declarations: [HeaderComponent], - providers: [ + ReactiveFormsModule, + HeaderComponent + ], + providers: [ { provide: MenuService, useValue: menuService } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); // compile template and css })); diff --git a/src/app/header/header.component.ts b/src/app/header/header.component.ts index 366b4f5e7a..4abcc8bcf0 100644 --- a/src/app/header/header.component.ts +++ b/src/app/header/header.component.ts @@ -2,14 +2,24 @@ import { Component } from '@angular/core'; import { Observable } from 'rxjs'; import { MenuService } from '../shared/menu/menu.service'; import { MenuID } from '../shared/menu/menu-id.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { ImpersonateNavbarComponent } from '../shared/impersonate-navbar/impersonate-navbar.component'; +import { ThemedAuthNavMenuComponent } from '../shared/auth-nav-menu/themed-auth-nav-menu.component'; +import { ContextHelpToggleComponent } from './context-help-toggle/context-help-toggle.component'; +import { LangSwitchComponent } from '../shared/lang-switch/lang-switch.component'; +import { ThemedSearchNavbarComponent } from '../search-navbar/themed-search-navbar.component'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { RouterLink } from '@angular/router'; /** * Represents the header with the logo and simple navigation */ @Component({ - selector: 'ds-header', - styleUrls: ['header.component.scss'], - templateUrl: 'header.component.html', + selector: 'ds-header', + styleUrls: ['header.component.scss'], + templateUrl: 'header.component.html', + standalone: true, + imports: [RouterLink, NgbDropdownModule, ThemedSearchNavbarComponent, LangSwitchComponent, ContextHelpToggleComponent, ThemedAuthNavMenuComponent, ImpersonateNavbarComponent, TranslateModule] }) export class HeaderComponent { /** diff --git a/src/app/header/themed-header.component.ts b/src/app/header/themed-header.component.ts index 51c817b63d..670ffc5755 100644 --- a/src/app/header/themed-header.component.ts +++ b/src/app/header/themed-header.component.ts @@ -6,9 +6,10 @@ import { HeaderComponent } from './header.component'; * Themed wrapper for HeaderComponent */ @Component({ - selector: 'ds-themed-header', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-header', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedHeaderComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/health-page/health-info/health-info-component/health-info-component.component.spec.ts b/src/app/health-page/health-info/health-info-component/health-info-component.component.spec.ts index b4532415b8..cf5bb48079 100644 --- a/src/app/health-page/health-info/health-info-component/health-info-component.component.spec.ts +++ b/src/app/health-page/health-info/health-info-component/health-info-component.component.spec.ts @@ -17,22 +17,20 @@ describe('HealthInfoComponentComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, NgbCollapseModule, NoopAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), HealthInfoComponentComponent, ObjNgFor - ] - }) + ] +}) .compileComponents(); }); diff --git a/src/app/health-page/health-info/health-info-component/health-info-component.component.ts b/src/app/health-page/health-info/health-info-component/health-info-component.component.ts index d2cb393f09..c37e2217da 100644 --- a/src/app/health-page/health-info/health-info-component/health-info-component.component.ts +++ b/src/app/health-page/health-info/health-info-component/health-info-component.component.ts @@ -1,15 +1,20 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, forwardRef } from '@angular/core'; import { HealthInfoComponent } from '../../models/health-component.model'; import { HealthComponentComponent } from '../../health-panel/health-component/health-component.component'; +import { ObjNgFor } from '../../../shared/utils/object-ngfor.pipe'; +import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgFor, NgIf, TitleCasePipe } from '@angular/common'; /** * Shows a health info object */ @Component({ - selector: 'ds-health-info-component', - templateUrl: './health-info-component.component.html', - styleUrls: ['./health-info-component.component.scss'] + selector: 'ds-health-info-component', + templateUrl: './health-info-component.component.html', + styleUrls: ['./health-info-component.component.scss'], + standalone: true, + imports: [NgFor, NgIf, NgbCollapseModule, forwardRef(() => HealthInfoComponentComponent), TitleCasePipe, ObjNgFor] }) export class HealthInfoComponentComponent extends HealthComponentComponent { diff --git a/src/app/health-page/health-info/health-info.component.spec.ts b/src/app/health-page/health-info/health-info.component.spec.ts index 5a9b8bf0aa..7adc2bc96e 100644 --- a/src/app/health-page/health-info/health-info.component.spec.ts +++ b/src/app/health-page/health-info/health-info.component.spec.ts @@ -15,21 +15,19 @@ describe('HealthInfoComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ NgbAccordionModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), HealthInfoComponent, ObjNgFor - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); }); diff --git a/src/app/health-page/health-info/health-info.component.ts b/src/app/health-page/health-info/health-info.component.ts index 186d00299c..818b85e5ce 100644 --- a/src/app/health-page/health-info/health-info.component.ts +++ b/src/app/health-page/health-info/health-info.component.ts @@ -3,6 +3,11 @@ import { Component, Input, OnInit } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { HealthInfoResponse } from '../models/health-component.model'; +import { ObjNgFor } from '../../shared/utils/object-ngfor.pipe'; +import { HealthInfoComponentComponent } from './health-info-component/health-info-component.component'; +import { HealthStatusComponent } from '../health-panel/health-status/health-status.component'; +import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgFor, TitleCasePipe } from '@angular/common'; /** * A component to render a "health-info component" object. @@ -12,9 +17,11 @@ import { HealthInfoResponse } from '../models/health-component.model'; * API. */ @Component({ - selector: 'ds-health-info', - templateUrl: './health-info.component.html', - styleUrls: ['./health-info.component.scss'] + selector: 'ds-health-info', + templateUrl: './health-info.component.html', + styleUrls: ['./health-info.component.scss'], + standalone: true, + imports: [NgIf, NgbAccordionModule, NgFor, HealthStatusComponent, HealthInfoComponentComponent, TitleCasePipe, ObjNgFor] }) export class HealthInfoComponent implements OnInit { diff --git a/src/app/health-page/health-page.component.spec.ts b/src/app/health-page/health-page.component.spec.ts index f3847ab092..fa48724b6a 100644 --- a/src/app/health-page/health-page.component.spec.ts +++ b/src/app/health-page/health-page.component.spec.ts @@ -35,21 +35,21 @@ describe('HealthPageComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, NgbNavModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ HealthPageComponent ], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + HealthPageComponent + ], + providers: [ { provide: HealthService, useValue: healthService } - ] - }) + ] +}) .compileComponents(); }); diff --git a/src/app/health-page/health-page.component.ts b/src/app/health-page/health-page.component.ts index aa7bd7cba4..50ab79427c 100644 --- a/src/app/health-page/health-page.component.ts +++ b/src/app/health-page/health-page.component.ts @@ -5,11 +5,19 @@ import { take } from 'rxjs/operators'; import { HealthService } from './health.service'; import { HealthInfoResponse, HealthResponse } from './models/health-component.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { AlertComponent } from '../shared/alert/alert.component'; +import { HealthInfoComponent } from './health-info/health-info.component'; +import { HealthPanelComponent } from './health-panel/health-panel.component'; +import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-health-page', - templateUrl: './health-page.component.html', - styleUrls: ['./health-page.component.scss'] + selector: 'ds-health-page', + templateUrl: './health-page.component.html', + styleUrls: ['./health-page.component.scss'], + standalone: true, + imports: [NgIf, NgbNavModule, HealthPanelComponent, HealthInfoComponent, AlertComponent, AsyncPipe, TranslateModule] }) export class HealthPageComponent implements OnInit { diff --git a/src/app/health-page/health-page.module.ts b/src/app/health-page/health-page.module.ts index 02a6a91a5f..5b27a0ab35 100644 --- a/src/app/health-page/health-page.module.ts +++ b/src/app/health-page/health-page.module.ts @@ -15,21 +15,19 @@ import { HealthInfoComponentComponent } from './health-info/health-info-componen @NgModule({ - imports: [ - CommonModule, - HealthPageRoutingModule, - NgbModule, - SharedModule, - TranslateModule - ], - declarations: [ - HealthPageComponent, - HealthPanelComponent, - HealthStatusComponent, - HealthComponentComponent, - HealthInfoComponent, - HealthInfoComponentComponent, - ] + imports: [ + CommonModule, + HealthPageRoutingModule, + NgbModule, + SharedModule, + TranslateModule, + HealthPageComponent, + HealthPanelComponent, + HealthStatusComponent, + HealthComponentComponent, + HealthInfoComponent, + HealthInfoComponentComponent + ] }) export class HealthPageModule { } diff --git a/src/app/health-page/health-panel/health-component/health-component.component.spec.ts b/src/app/health-page/health-panel/health-component/health-component.component.spec.ts index a8ec2b65e0..f3285d4cf5 100644 --- a/src/app/health-page/health-panel/health-component/health-component.component.spec.ts +++ b/src/app/health-page/health-panel/health-component/health-component.component.spec.ts @@ -18,23 +18,21 @@ describe('HealthComponentComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, NgbCollapseModule, NoopAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), HealthComponentComponent, ObjNgFor - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); }); diff --git a/src/app/health-page/health-panel/health-component/health-component.component.ts b/src/app/health-page/health-panel/health-component/health-component.component.ts index f2391c9c4c..df970b49a0 100644 --- a/src/app/health-page/health-panel/health-component/health-component.component.ts +++ b/src/app/health-page/health-panel/health-component/health-component.component.ts @@ -1,9 +1,13 @@ -import { Component, Input } from '@angular/core'; +import { Component, Input, forwardRef } from '@angular/core'; import { TranslateService } from '@ngx-translate/core'; import { HealthComponent } from '../../models/health-component.model'; import { AlertType } from '../../../shared/alert/alert-type'; +import { ObjNgFor } from '../../../shared/utils/object-ngfor.pipe'; +import { AlertComponent } from '../../../shared/alert/alert.component'; +import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgFor, TitleCasePipe } from '@angular/common'; /** * A component to render a "health component" object. @@ -13,9 +17,11 @@ import { AlertType } from '../../../shared/alert/alert-type'; * API. */ @Component({ - selector: 'ds-health-component', - templateUrl: './health-component.component.html', - styleUrls: ['./health-component.component.scss'] + selector: 'ds-health-component', + templateUrl: './health-component.component.html', + styleUrls: ['./health-component.component.scss'], + standalone: true, + imports: [NgIf, NgFor, NgbCollapseModule, forwardRef(() => HealthComponentComponent), AlertComponent, TitleCasePipe, ObjNgFor] }) export class HealthComponentComponent { diff --git a/src/app/health-page/health-panel/health-panel.component.spec.ts b/src/app/health-page/health-panel/health-panel.component.spec.ts index 1d9c856ddb..d3b0a64808 100644 --- a/src/app/health-page/health-panel/health-panel.component.spec.ts +++ b/src/app/health-page/health-panel/health-panel.component.spec.ts @@ -18,24 +18,22 @@ describe('HealthPanelComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ NgbNavModule, NgbAccordionModule, CommonModule, BrowserAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [ HealthPanelComponent, ObjNgFor - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/health-page/health-panel/health-panel.component.ts b/src/app/health-page/health-panel/health-panel.component.ts index 1c056daf20..c8f1b140f3 100644 --- a/src/app/health-page/health-panel/health-panel.component.ts +++ b/src/app/health-page/health-panel/health-panel.component.ts @@ -1,16 +1,23 @@ import { Component, Input, OnInit } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { HealthResponse } from '../models/health-component.model'; +import { ObjNgFor } from '../../shared/utils/object-ngfor.pipe'; +import { HealthComponentComponent } from './health-component/health-component.component'; +import { NgFor, NgIf, TitleCasePipe } from '@angular/common'; +import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap'; +import { HealthStatusComponent } from './health-status/health-status.component'; /** * Show the health panel */ @Component({ - selector: 'ds-health-panel', - templateUrl: './health-panel.component.html', - styleUrls: ['./health-panel.component.scss'] + selector: 'ds-health-panel', + templateUrl: './health-panel.component.html', + styleUrls: ['./health-panel.component.scss'], + standalone: true, + imports: [HealthStatusComponent, NgbAccordionModule, NgFor, NgIf, HealthComponentComponent, TitleCasePipe, ObjNgFor, TranslateModule] }) export class HealthPanelComponent implements OnInit { diff --git a/src/app/health-page/health-panel/health-status/health-status.component.spec.ts b/src/app/health-page/health-panel/health-status/health-status.component.spec.ts index f0f61ebdbb..54ee844282 100644 --- a/src/app/health-page/health-panel/health-status/health-status.component.spec.ts +++ b/src/app/health-page/health-panel/health-status/health-status.component.spec.ts @@ -13,17 +13,17 @@ describe('HealthStatusComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ NgbTooltipModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ HealthStatusComponent ] - }) + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + HealthStatusComponent + ] +}) .compileComponents(); }); diff --git a/src/app/health-page/health-panel/health-status/health-status.component.ts b/src/app/health-page/health-panel/health-status/health-status.component.ts index 172baeee71..341c498382 100644 --- a/src/app/health-page/health-panel/health-status/health-status.component.ts +++ b/src/app/health-page/health-panel/health-status/health-status.component.ts @@ -1,13 +1,18 @@ import { Component, Input } from '@angular/core'; import { HealthStatus } from '../../models/health-component.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgSwitch, NgSwitchCase } from '@angular/common'; /** * Show a health status object */ @Component({ - selector: 'ds-health-status', - templateUrl: './health-status.component.html', - styleUrls: ['./health-status.component.scss'] + selector: 'ds-health-status', + templateUrl: './health-status.component.html', + styleUrls: ['./health-status.component.scss'], + standalone: true, + imports: [NgSwitch, NgSwitchCase, NgbTooltipModule, TranslateModule] }) export class HealthStatusComponent { /** diff --git a/src/app/home-page/home-news/home-news.component.ts b/src/app/home-page/home-news/home-news.component.ts index 62c8e94671..8d7890de48 100644 --- a/src/app/home-page/home-news/home-news.component.ts +++ b/src/app/home-page/home-news/home-news.component.ts @@ -1,9 +1,10 @@ import { Component, } from '@angular/core'; @Component({ - selector: 'ds-home-news', - styleUrls: ['./home-news.component.scss'], - templateUrl: './home-news.component.html' + selector: 'ds-home-news', + styleUrls: ['./home-news.component.scss'], + templateUrl: './home-news.component.html', + standalone: true }) /** diff --git a/src/app/home-page/home-news/themed-home-news.component.ts b/src/app/home-page/home-news/themed-home-news.component.ts index da7233f4a4..fcc16a3485 100644 --- a/src/app/home-page/home-news/themed-home-news.component.ts +++ b/src/app/home-page/home-news/themed-home-news.component.ts @@ -3,9 +3,10 @@ import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { HomeNewsComponent } from './home-news.component'; @Component({ - selector: 'ds-themed-home-news', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-home-news', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) /** diff --git a/src/app/home-page/home-page.component.ts b/src/app/home-page/home-page.component.ts index c151cbbb16..92f15b9c88 100644 --- a/src/app/home-page/home-page.component.ts +++ b/src/app/home-page/home-page.component.ts @@ -4,10 +4,19 @@ import { ActivatedRoute } from '@angular/router'; import { Observable } from 'rxjs'; import { Site } from '../core/shared/site.model'; import { environment } from '../../environments/environment'; +import { TranslateModule } from '@ngx-translate/core'; +import { RecentItemListComponent } from './recent-item-list/recent-item-list.component'; +import { ThemedTopLevelCommunityListComponent } from './top-level-community-list/themed-top-level-community-list.component'; +import { ThemedSearchFormComponent } from '../shared/search-form/themed-search-form.component'; +import { ViewTrackerComponent } from '../statistics/angulartics/dspace/view-tracker.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { ThemedHomeNewsComponent } from './home-news/themed-home-news.component'; @Component({ - selector: 'ds-home-page', - styleUrls: ['./home-page.component.scss'], - templateUrl: './home-page.component.html' + selector: 'ds-home-page', + styleUrls: ['./home-page.component.scss'], + templateUrl: './home-page.component.html', + standalone: true, + imports: [ThemedHomeNewsComponent, NgIf, ViewTrackerComponent, ThemedSearchFormComponent, ThemedTopLevelCommunityListComponent, RecentItemListComponent, AsyncPipe, TranslateModule] }) export class HomePageComponent implements OnInit { diff --git a/src/app/home-page/home-page.module.ts b/src/app/home-page/home-page.module.ts index 1681abd805..1d9f6f9bc0 100644 --- a/src/app/home-page/home-page.module.ts +++ b/src/app/home-page/home-page.module.ts @@ -25,20 +25,18 @@ const DECLARATIONS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule.withEntryComponents(), - JournalEntitiesModule.withEntryComponents(), - ResearchEntitiesModule.withEntryComponents(), - HomePageRoutingModule, - StatisticsModule.forRoot() - ], - declarations: [ - ...DECLARATIONS, - ], - exports: [ - ...DECLARATIONS, - ], + imports: [ + CommonModule, + SharedModule.withEntryComponents(), + JournalEntitiesModule.withEntryComponents(), + ResearchEntitiesModule.withEntryComponents(), + HomePageRoutingModule, + StatisticsModule.forRoot(), + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS, + ] }) export class HomePageModule { diff --git a/src/app/home-page/recent-item-list/recent-item-list.component.spec.ts b/src/app/home-page/recent-item-list/recent-item-list.component.spec.ts index edcb4f84f8..2969e320f9 100644 --- a/src/app/home-page/recent-item-list/recent-item-list.component.spec.ts +++ b/src/app/home-page/recent-item-list/recent-item-list.component.spec.ts @@ -40,15 +40,15 @@ describe('RecentItemListComponent', () => { }; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ RecentItemListComponent], - providers: [ + imports: [RecentItemListComponent], + providers: [ { provide: SearchService, useValue: searchServiceStub }, { provide: PaginationService, useValue: paginationService }, { provide: SearchConfigurationService, useValue: searchConfigServiceStub }, { provide: APP_CONFIG, useValue: environment }, { provide: PLATFORM_ID, useValue: 'browser' }, - ], - }) + ] +}) .compileComponents(); }); diff --git a/src/app/home-page/recent-item-list/recent-item-list.component.ts b/src/app/home-page/recent-item-list/recent-item-list.component.ts index 9a8535d970..41a214f527 100644 --- a/src/app/home-page/recent-item-list/recent-item-list.component.ts +++ b/src/app/home-page/recent-item-list/recent-item-list.component.ts @@ -15,19 +15,26 @@ import { toDSpaceObjectListRD } from '../../core/shared/operators'; import { Observable } from 'rxjs'; import { followLink, FollowLinkConfig } from '../../shared/utils/follow-link-config.model'; import { APP_CONFIG, AppConfig } from '../../../config/app-config.interface'; -import { isPlatformBrowser } from '@angular/common'; +import { isPlatformBrowser, NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; import { setPlaceHolderAttributes } from '../../shared/utils/object-list-utils'; import { DSpaceObjectType } from '../../core/shared/dspace-object-type.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { LoadingComponent } from '../../shared/loading/loading.component'; +import { ErrorComponent } from '../../shared/error/error.component'; +import { ListableObjectComponentLoaderComponent } from '../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { VarDirective } from '../../shared/utils/var.directive'; @Component({ - selector: 'ds-recent-item-list', - templateUrl: './recent-item-list.component.html', - styleUrls: ['./recent-item-list.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, - animations: [ - fadeIn, - fadeInOut - ] + selector: 'ds-recent-item-list', + templateUrl: './recent-item-list.component.html', + styleUrls: ['./recent-item-list.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, + animations: [ + fadeIn, + fadeInOut + ], + standalone: true, + imports: [VarDirective, NgIf, NgClass, NgFor, ListableObjectComponentLoaderComponent, ErrorComponent, LoadingComponent, AsyncPipe, TranslateModule] }) export class RecentItemListComponent implements OnInit { itemRD$: Observable>>; diff --git a/src/app/home-page/themed-home-page.component.ts b/src/app/home-page/themed-home-page.component.ts index c0ef723b38..96e0ec70c4 100644 --- a/src/app/home-page/themed-home-page.component.ts +++ b/src/app/home-page/themed-home-page.component.ts @@ -3,9 +3,10 @@ import { HomePageComponent } from './home-page.component'; import { Component } from '@angular/core'; @Component({ - selector: 'ds-themed-home-page', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-home-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedHomePageComponent extends ThemedComponent { diff --git a/src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts b/src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts index 6eb74cc0a9..5ccf8c713d 100644 --- a/src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts +++ b/src/app/home-page/top-level-community-list/themed-top-level-community-list.component.ts @@ -3,9 +3,10 @@ import { TopLevelCommunityListComponent } from './top-level-community-list.compo import { ThemedComponent } from '../../shared/theme-support/themed.component'; @Component({ - selector: 'ds-themed-top-level-community-list', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-top-level-community-list', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedTopLevelCommunityListComponent extends ThemedComponent { protected inAndOutputNames: (keyof TopLevelCommunityListComponent & keyof this)[]; diff --git a/src/app/home-page/top-level-community-list/top-level-community-list.component.spec.ts b/src/app/home-page/top-level-community-list/top-level-community-list.component.spec.ts index d1a3d3631f..58f4159e1c 100644 --- a/src/app/home-page/top-level-community-list/top-level-community-list.component.spec.ts +++ b/src/app/home-page/top-level-community-list/top-level-community-list.component.spec.ts @@ -141,15 +141,15 @@ describe('TopLevelCommunityList Component', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([]), NgbModule, - NoopAnimationsModule - ], - declarations: [TopLevelCommunityListComponent], - providers: [ + NoopAnimationsModule, + TopLevelCommunityListComponent + ], + providers: [ { provide: APP_CONFIG, useValue: environment }, { provide: CommunityDataService, useValue: communityDataServiceStub }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, @@ -160,9 +160,9 @@ describe('TopLevelCommunityList Component', () => { { provide: LinkHeadService, useValue: linkHeadService }, { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/home-page/top-level-community-list/top-level-community-list.component.ts b/src/app/home-page/top-level-community-list/top-level-community-list.component.ts index 7d58f57196..8de99ab412 100644 --- a/src/app/home-page/top-level-community-list/top-level-community-list.component.ts +++ b/src/app/home-page/top-level-community-list/top-level-community-list.component.ts @@ -13,16 +13,24 @@ import { hasValue } from '../../shared/empty.util'; import { switchMap } from 'rxjs/operators'; import { PaginationService } from '../../core/pagination/pagination.service'; import { AppConfig, APP_CONFIG } from 'src/config/app-config.interface'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { ErrorComponent } from '../../shared/error/error.component'; +import { ObjectCollectionComponent } from '../../shared/object-collection/object-collection.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * this component renders the Top-Level Community list */ @Component({ - selector: 'ds-top-level-community-list', - styleUrls: ['./top-level-community-list.component.scss'], - templateUrl: './top-level-community-list.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, - animations: [fadeInOut] + selector: 'ds-top-level-community-list', + styleUrls: ['./top-level-community-list.component.scss'], + templateUrl: './top-level-community-list.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, + animations: [fadeInOut], + standalone: true, + imports: [VarDirective, NgIf, ObjectCollectionComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) export class TopLevelCommunityListComponent implements OnInit, OnDestroy { diff --git a/src/app/import-external-page/import-external-page.component.spec.ts b/src/app/import-external-page/import-external-page.component.spec.ts index 00bdd4be28..38a836a63d 100644 --- a/src/app/import-external-page/import-external-page.component.spec.ts +++ b/src/app/import-external-page/import-external-page.component.spec.ts @@ -10,12 +10,12 @@ describe('ImportExternalPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ ImportExternalPageComponent ], - providers:[ + imports: [ImportExternalPageComponent], + providers: [ { provide: ThemeService, useValue: getMockThemeService() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/import-external-page/import-external-page.component.ts b/src/app/import-external-page/import-external-page.component.ts index 00709dad16..4cb8062ceb 100644 --- a/src/app/import-external-page/import-external-page.component.ts +++ b/src/app/import-external-page/import-external-page.component.ts @@ -1,4 +1,7 @@ import { Component } from '@angular/core'; +import { + ThemedSubmissionImportExternalComponent +} from '../submission/import-external/themed-submission-import-external.component'; /** * Component representing the external import page of the submission. @@ -6,7 +9,11 @@ import { Component } from '@angular/core'; @Component({ selector: 'ds-import-external-page', templateUrl: './import-external-page.component.html', - styleUrls: ['./import-external-page.component.scss'] + styleUrls: ['./import-external-page.component.scss'], + imports: [ + ThemedSubmissionImportExternalComponent + ], + standalone: true }) export class ImportExternalPageComponent { diff --git a/src/app/import-external-page/import-external-page.module.ts b/src/app/import-external-page/import-external-page.module.ts index 1a0fd9e360..a0147838d4 100644 --- a/src/app/import-external-page/import-external-page.module.ts +++ b/src/app/import-external-page/import-external-page.module.ts @@ -10,18 +10,16 @@ import { JournalEntitiesModule } from '../entity-groups/journal-entities/journal import { ResearchEntitiesModule } from '../entity-groups/research-entities/research-entities.module'; @NgModule({ - imports: [ - CommonModule, - SharedModule.withEntryComponents(), - CoreModule.forRoot(), - ImportExternalRoutingModule, - SubmissionModule, - JournalEntitiesModule.withEntryComponents(), - ResearchEntitiesModule.withEntryComponents() - ], - declarations: [ - ImportExternalPageComponent - ] + imports: [ + CommonModule, + SharedModule.withEntryComponents(), + CoreModule.forRoot(), + ImportExternalRoutingModule, + SubmissionModule, + JournalEntitiesModule.withEntryComponents(), + ResearchEntitiesModule.withEntryComponents(), + ImportExternalPageComponent + ] }) /** diff --git a/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.spec.ts b/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.spec.ts index 64a15bfc4e..c8c142d12d 100644 --- a/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.spec.ts +++ b/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.spec.ts @@ -9,10 +9,9 @@ describe('EndUserAgreementContentComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [EndUserAgreementContentComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), EndUserAgreementContentComponent], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.ts b/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.ts index faa7d5a78f..a7fb34f285 100644 --- a/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.ts +++ b/src/app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component.ts @@ -1,9 +1,13 @@ import { Component } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; @Component({ - selector: 'ds-end-user-agreement-content', - templateUrl: './end-user-agreement-content.component.html', - styleUrls: ['./end-user-agreement-content.component.scss'] + selector: 'ds-end-user-agreement-content', + templateUrl: './end-user-agreement-content.component.html', + styleUrls: ['./end-user-agreement-content.component.scss'], + standalone: true, + imports: [RouterLink, TranslateModule] }) /** * Component displaying the contents of the End User Agreement diff --git a/src/app/info/end-user-agreement/end-user-agreement.component.spec.ts b/src/app/info/end-user-agreement/end-user-agreement.component.spec.ts index dc4f4cf412..8e436521c9 100644 --- a/src/app/info/end-user-agreement/end-user-agreement.component.spec.ts +++ b/src/app/info/end-user-agreement/end-user-agreement.component.spec.ts @@ -48,18 +48,17 @@ describe('EndUserAgreementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [EndUserAgreementComponent], - providers: [ + imports: [TranslateModule.forRoot(), EndUserAgreementComponent], + providers: [ { provide: EndUserAgreementService, useValue: endUserAgreementService }, { provide: NotificationsService, useValue: notificationsService }, { provide: AuthService, useValue: authService }, { provide: Store, useValue: store }, { provide: Router, useValue: router }, { provide: ActivatedRoute, useValue: route } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/info/end-user-agreement/end-user-agreement.component.ts b/src/app/info/end-user-agreement/end-user-agreement.component.ts index bcb5e0ce9d..3b041e411c 100644 --- a/src/app/info/end-user-agreement/end-user-agreement.component.ts +++ b/src/app/info/end-user-agreement/end-user-agreement.component.ts @@ -7,14 +7,18 @@ import { AppState } from '../../app.reducer'; import { LogOutAction } from '../../core/auth/auth.actions'; import { EndUserAgreementService } from '../../core/end-user-agreement/end-user-agreement.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { of as observableOf } from 'rxjs'; import { isNotEmpty } from '../../shared/empty.util'; +import { FormsModule } from '@angular/forms'; +import { EndUserAgreementContentComponent } from './end-user-agreement-content/end-user-agreement-content.component'; @Component({ - selector: 'ds-end-user-agreement', - templateUrl: './end-user-agreement.component.html', - styleUrls: ['./end-user-agreement.component.scss'] + selector: 'ds-end-user-agreement', + templateUrl: './end-user-agreement.component.html', + styleUrls: ['./end-user-agreement.component.scss'], + standalone: true, + imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule] }) /** * Component displaying the End User Agreement and an option to accept it diff --git a/src/app/info/end-user-agreement/themed-end-user-agreement.component.ts b/src/app/info/end-user-agreement/themed-end-user-agreement.component.ts index 74eb545b8a..9f02abf28a 100644 --- a/src/app/info/end-user-agreement/themed-end-user-agreement.component.ts +++ b/src/app/info/end-user-agreement/themed-end-user-agreement.component.ts @@ -6,9 +6,10 @@ import { EndUserAgreementComponent } from './end-user-agreement.component'; * Themed wrapper for EndUserAgreementComponent */ @Component({ - selector: 'ds-themed-end-user-agreement', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-end-user-agreement', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedEndUserAgreementComponent extends ThemedComponent { diff --git a/src/app/info/feedback/feedback-form/feedback-form.component.spec.ts b/src/app/info/feedback/feedback-form/feedback-form.component.spec.ts index c3d38a2876..d07ad8be57 100644 --- a/src/app/info/feedback/feedback-form/feedback-form.component.spec.ts +++ b/src/app/info/feedback/feedback-form/feedback-form.component.spec.ts @@ -37,9 +37,8 @@ describe('FeedbackFormComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [FeedbackFormComponent], - providers: [ + imports: [TranslateModule.forRoot(), FeedbackFormComponent], + providers: [ { provide: RouteService, useValue: routeServiceStub }, { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, { provide: NotificationsService, useValue: notificationService }, @@ -47,9 +46,9 @@ describe('FeedbackFormComponent', () => { { provide: AuthService, useValue: authService }, { provide: NativeWindowService, useFactory: NativeWindowMockFactory }, { provide: Router, useValue: routerStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/info/feedback/feedback-form/feedback-form.component.ts b/src/app/info/feedback/feedback-form/feedback-form.component.ts index 684f974701..8e442efc85 100644 --- a/src/app/info/feedback/feedback-form/feedback-form.component.ts +++ b/src/app/info/feedback/feedback-form/feedback-form.component.ts @@ -3,9 +3,9 @@ import { NoContent } from '../../../core/shared/NoContent.model'; import { FeedbackDataService } from '../../../core/feedback/feedback-data.service'; import { Component, Inject, OnInit } from '@angular/core'; import { RouteService } from '../../../core/services/route.service'; -import { UntypedFormBuilder, Validators } from '@angular/forms'; +import { UntypedFormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { AuthService } from '../../../core/auth/auth.service'; import { EPerson } from '../../../core/eperson/models/eperson.model'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; @@ -14,11 +14,15 @@ import { getHomePageRoute } from '../../../app-routing-paths'; import { take } from 'rxjs/operators'; import { NativeWindowRef, NativeWindowService } from '../../../core/services/window.service'; import { URLCombiner } from '../../../core/url-combiner/url-combiner'; +import { ErrorComponent } from '../../../shared/error/error.component'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-feedback-form', - templateUrl: './feedback-form.component.html', - styleUrls: ['./feedback-form.component.scss'] + selector: 'ds-feedback-form', + templateUrl: './feedback-form.component.html', + styleUrls: ['./feedback-form.component.scss'], + standalone: true, + imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule] }) /** * Component displaying the contents of the Feedback Statement diff --git a/src/app/info/feedback/feedback-form/themed-feedback-form.component.ts b/src/app/info/feedback/feedback-form/themed-feedback-form.component.ts index 9b42db629f..1a6253ae7f 100644 --- a/src/app/info/feedback/feedback-form/themed-feedback-form.component.ts +++ b/src/app/info/feedback/feedback-form/themed-feedback-form.component.ts @@ -6,9 +6,10 @@ import { FeedbackFormComponent } from './feedback-form.component'; * Themed wrapper for {@link FeedbackFormComponent} */ @Component({ - selector: 'ds-themed-feedback-form', - styleUrls: [], - templateUrl: '../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-feedback-form', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedFeedbackFormComponent extends ThemedComponent { diff --git a/src/app/info/feedback/feedback.component.spec.ts b/src/app/info/feedback/feedback.component.spec.ts index 810c3b703f..ced48410d2 100644 --- a/src/app/info/feedback/feedback.component.spec.ts +++ b/src/app/info/feedback/feedback.component.spec.ts @@ -9,10 +9,9 @@ describe('FeedbackComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [FeedbackComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), FeedbackComponent], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/info/feedback/feedback.component.ts b/src/app/info/feedback/feedback.component.ts index 3c0924b4de..a1bbd99212 100644 --- a/src/app/info/feedback/feedback.component.ts +++ b/src/app/info/feedback/feedback.component.ts @@ -1,9 +1,12 @@ import { Component } from '@angular/core'; +import { ThemedFeedbackFormComponent } from './feedback-form/themed-feedback-form.component'; @Component({ - selector: 'ds-feedback', - templateUrl: './feedback.component.html', - styleUrls: ['./feedback.component.scss'] + selector: 'ds-feedback', + templateUrl: './feedback.component.html', + styleUrls: ['./feedback.component.scss'], + standalone: true, + imports: [ThemedFeedbackFormComponent] }) /** * Component displaying the Feedback Statement diff --git a/src/app/info/feedback/themed-feedback.component.ts b/src/app/info/feedback/themed-feedback.component.ts index 68581c32fd..144453daa6 100644 --- a/src/app/info/feedback/themed-feedback.component.ts +++ b/src/app/info/feedback/themed-feedback.component.ts @@ -6,9 +6,10 @@ import { FeedbackComponent } from './feedback.component'; * Themed wrapper for FeedbackComponent */ @Component({ - selector: 'ds-themed-feedback', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-feedback', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedFeedbackComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/info/info.module.ts b/src/app/info/info.module.ts index ccc4af0a7d..7c7a9c4647 100644 --- a/src/app/info/info.module.ts +++ b/src/app/info/info.module.ts @@ -29,18 +29,16 @@ const DECLARATIONS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - InfoRoutingModule, - ], - declarations: [ - ...DECLARATIONS - ], - exports: [ - ...DECLARATIONS - ], - providers: [FeedbackGuard] + imports: [ + CommonModule, + SharedModule, + InfoRoutingModule, + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS + ], + providers: [FeedbackGuard] }) export class InfoModule { } diff --git a/src/app/info/privacy/privacy-content/privacy-content.component.spec.ts b/src/app/info/privacy/privacy-content/privacy-content.component.spec.ts index 682e30273a..d510551649 100644 --- a/src/app/info/privacy/privacy-content/privacy-content.component.spec.ts +++ b/src/app/info/privacy/privacy-content/privacy-content.component.spec.ts @@ -9,10 +9,9 @@ describe('PrivacyContentComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [PrivacyContentComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), PrivacyContentComponent], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/info/privacy/privacy-content/privacy-content.component.ts b/src/app/info/privacy/privacy-content/privacy-content.component.ts index 6a7b394cf4..5d5a10580c 100644 --- a/src/app/info/privacy/privacy-content/privacy-content.component.ts +++ b/src/app/info/privacy/privacy-content/privacy-content.component.ts @@ -1,9 +1,13 @@ import { Component } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; @Component({ - selector: 'ds-privacy-content', - templateUrl: './privacy-content.component.html', - styleUrls: ['./privacy-content.component.scss'] + selector: 'ds-privacy-content', + templateUrl: './privacy-content.component.html', + styleUrls: ['./privacy-content.component.scss'], + standalone: true, + imports: [RouterLink, TranslateModule] }) /** * Component displaying the contents of the Privacy Statement diff --git a/src/app/info/privacy/privacy.component.spec.ts b/src/app/info/privacy/privacy.component.spec.ts index 6f93adec12..fe548131cb 100644 --- a/src/app/info/privacy/privacy.component.spec.ts +++ b/src/app/info/privacy/privacy.component.spec.ts @@ -9,10 +9,9 @@ describe('PrivacyComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [PrivacyComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), PrivacyComponent], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/info/privacy/privacy.component.ts b/src/app/info/privacy/privacy.component.ts index dc9d3d69dc..7640e19b9e 100644 --- a/src/app/info/privacy/privacy.component.ts +++ b/src/app/info/privacy/privacy.component.ts @@ -1,9 +1,12 @@ import { Component } from '@angular/core'; +import { PrivacyContentComponent } from './privacy-content/privacy-content.component'; @Component({ - selector: 'ds-privacy', - templateUrl: './privacy.component.html', - styleUrls: ['./privacy.component.scss'] + selector: 'ds-privacy', + templateUrl: './privacy.component.html', + styleUrls: ['./privacy.component.scss'], + standalone: true, + imports: [PrivacyContentComponent] }) /** * Component displaying the Privacy Statement diff --git a/src/app/info/privacy/themed-privacy.component.ts b/src/app/info/privacy/themed-privacy.component.ts index 7f2ee80ffc..e99f583dbd 100644 --- a/src/app/info/privacy/themed-privacy.component.ts +++ b/src/app/info/privacy/themed-privacy.component.ts @@ -6,9 +6,10 @@ import { PrivacyComponent } from './privacy.component'; * Themed wrapper for PrivacyComponent */ @Component({ - selector: 'ds-themed-privacy', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-privacy', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedPrivacyComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/item-page/alerts/item-alerts.component.spec.ts b/src/app/item-page/alerts/item-alerts.component.spec.ts index a933eb6a58..c44c17eb47 100644 --- a/src/app/item-page/alerts/item-alerts.component.spec.ts +++ b/src/app/item-page/alerts/item-alerts.component.spec.ts @@ -12,10 +12,9 @@ describe('ItemAlertsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ItemAlertsComponent], - imports: [TranslateModule.forRoot()], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [TranslateModule.forRoot(), ItemAlertsComponent], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/item-page/alerts/item-alerts.component.ts b/src/app/item-page/alerts/item-alerts.component.ts index 2b1df58c9f..4612b94f17 100644 --- a/src/app/item-page/alerts/item-alerts.component.ts +++ b/src/app/item-page/alerts/item-alerts.component.ts @@ -1,11 +1,22 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../core/shared/item.model'; import { AlertType } from '../../shared/alert/alert-type'; +import { AlertComponent } from '../../shared/alert/alert.component'; +import { NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; @Component({ selector: 'ds-item-alerts', templateUrl: './item-alerts.component.html', - styleUrls: ['./item-alerts.component.scss'] + styleUrls: ['./item-alerts.component.scss'], + imports: [ + AlertComponent, + NgIf, + TranslateModule, + RouterLink + ], + standalone: true }) /** * Component displaying alerts for an item diff --git a/src/app/item-page/alerts/themed-item-alerts.component.ts b/src/app/item-page/alerts/themed-item-alerts.component.ts index 9ed9b51404..192d5bd058 100644 --- a/src/app/item-page/alerts/themed-item-alerts.component.ts +++ b/src/app/item-page/alerts/themed-item-alerts.component.ts @@ -7,9 +7,10 @@ import { ThemedComponent } from '../../shared/theme-support/themed.component'; * Themed wrapper for {@link ItemAlertsComponent} */ @Component({ - selector: 'ds-themed-item-alerts', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-item-alerts', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedItemAlertsComponent extends ThemedComponent { protected inAndOutputNames: (keyof ItemAlertsComponent & keyof this)[] = ['item']; diff --git a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts index cbfbdf361f..553f1f3d13 100644 --- a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts +++ b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.spec.ts @@ -100,20 +100,19 @@ describe('BitstreamRequestACopyPageComponent', () => { function initTestbed() { TestBed.configureTestingModule({ - imports: [CommonModule, TranslateModule.forRoot(), FormsModule, ReactiveFormsModule], - declarations: [BitstreamRequestACopyPageComponent], - providers: [ - {provide: Location, useValue: location}, - {provide: ActivatedRoute, useValue: activatedRoute}, - {provide: Router, useValue: router}, - {provide: AuthorizationDataService, useValue: authorizationService}, - {provide: AuthService, useValue: authService}, - {provide: ItemRequestDataService, useValue: itemRequestDataService}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: DSONameService, useValue: new DSONameServiceMock()}, - {provide: BitstreamDataService, useValue: bitstreamDataService}, - ] - }) + imports: [CommonModule, TranslateModule.forRoot(), FormsModule, ReactiveFormsModule, BitstreamRequestACopyPageComponent], + providers: [ + { provide: Location, useValue: location }, + { provide: ActivatedRoute, useValue: activatedRoute }, + { provide: Router, useValue: router }, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: AuthService, useValue: authService }, + { provide: ItemRequestDataService, useValue: itemRequestDataService }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: DSONameService, useValue: new DSONameServiceMock() }, + { provide: BitstreamDataService, useValue: bitstreamDataService }, + ] +}) .compileComponents(); } diff --git a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts index 77e1049d87..2891caa004 100644 --- a/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts +++ b/src/app/item-page/bitstreams/request-a-copy/bitstream-request-a-copy-page.component.ts @@ -1,6 +1,6 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { filter, map, switchMap, take } from 'rxjs/operators'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { hasValue, isNotEmpty } from '../../../shared/empty.util'; import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators'; import { Bitstream } from '../../../core/shared/bitstream.model'; @@ -9,21 +9,35 @@ import { FeatureID } from '../../../core/data/feature-authorization/feature-id'; import { AuthService } from '../../../core/auth/auth.service'; import { combineLatest as observableCombineLatest, Observable, of as observableOf, Subscription } from 'rxjs'; import { getBitstreamDownloadRoute, getForbiddenRoute } from '../../../app-routing-paths'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { EPerson } from '../../../core/eperson/models/eperson.model'; -import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; +import { + ReactiveFormsModule, + UntypedFormBuilder, + UntypedFormControl, + UntypedFormGroup, + Validators +} from '@angular/forms'; import { ItemRequestDataService } from '../../../core/data/item-request-data.service'; import { ItemRequest } from '../../../core/shared/item-request.model'; import { Item } from '../../../core/shared/item.model'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; -import { Location } from '@angular/common'; +import { AsyncPipe, Location, NgIf } from '@angular/common'; import { BitstreamDataService } from '../../../core/data/bitstream-data.service'; import { getItemPageRoute } from '../../item-page-routing-paths'; @Component({ selector: 'ds-bitstream-request-a-copy-page', - templateUrl: './bitstream-request-a-copy-page.component.html' + templateUrl: './bitstream-request-a-copy-page.component.html', + imports: [ + TranslateModule, + RouterLink, + AsyncPipe, + ReactiveFormsModule, + NgIf + ], + standalone: true }) /** * Page component for requesting a copy for a bitstream diff --git a/src/app/item-page/bitstreams/upload/upload-bitstream.component.spec.ts b/src/app/item-page/bitstreams/upload/upload-bitstream.component.spec.ts index e85dca2a98..cbbbab5c53 100644 --- a/src/app/item-page/bitstreams/upload/upload-bitstream.component.spec.ts +++ b/src/app/item-page/bitstreams/upload/upload-bitstream.component.spec.ts @@ -287,9 +287,8 @@ describe('UploadBitstreamComponent', () => { }; TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [UploadBitstreamComponent, VarDirective], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, UploadBitstreamComponent, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, @@ -297,10 +296,10 @@ describe('UploadBitstreamComponent', () => { { provide: AuthService, useValue: authServiceStub }, { provide: BundleDataService, useValue: bundleService }, { provide: RequestService, useValue: requestService } - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); } /** diff --git a/src/app/item-page/bitstreams/upload/upload-bitstream.component.ts b/src/app/item-page/bitstreams/upload/upload-bitstream.component.ts index 56b88806ed..1474ab53a9 100644 --- a/src/app/item-page/bitstreams/upload/upload-bitstream.component.ts +++ b/src/app/item-page/bitstreams/upload/upload-bitstream.component.ts @@ -9,7 +9,7 @@ import { hasValue, isEmpty, isNotEmpty } from '../../../shared/empty.util'; import { ItemDataService } from '../../../core/data/item-data.service'; import { AuthService } from '../../../core/auth/auth.service'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { PaginatedList } from '../../../core/data/paginated-list.model'; import { Bundle } from '../../../core/shared/bundle.model'; import { BundleDataService } from '../../../core/data/bundle-data.service'; @@ -20,10 +20,26 @@ import { getBitstreamModuleRoute } from '../../../app-routing-paths'; import { getEntityEditRoute } from '../../item-page-routing-paths'; import { environment } from '../../../../environments/environment'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../../shared/utils/var.directive'; +import { + DsoInputSuggestionsComponent +} from '../../../shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component'; +import { FormsModule } from '@angular/forms'; @Component({ selector: 'ds-upload-bitstream', - templateUrl: './upload-bitstream.component.html' + templateUrl: './upload-bitstream.component.html', + imports: [ + TranslateModule, + AsyncPipe, + VarDirective, + NgIf, + DsoInputSuggestionsComponent, + FormsModule, + UploaderComponent + ], + standalone: true }) /** * Page component for uploading a bitstream to an item diff --git a/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts b/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts index 80002f614b..11487d0d29 100644 --- a/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts +++ b/src/app/item-page/edit-item-page/abstract-item-update/abstract-item-update.component.ts @@ -18,8 +18,9 @@ import { FieldUpdate } from '../../../core/data/object-updates/field-update.mode import { FieldUpdates } from '../../../core/data/object-updates/field-updates.model'; @Component({ - selector: 'ds-abstract-item-update', - template: '' + selector: 'ds-abstract-item-update', + template: '', + standalone: true }) /** * Abstract component for managing object updates of an item diff --git a/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts b/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts index 2521f7e67d..46f48cb00a 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.component.spec.ts @@ -65,22 +65,20 @@ describe('ItemPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [EditItemPageComponent], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), EditItemPageComponent], + providers: [ { provide: ActivatedRoute, useValue: mockRoute }, { provide: Router, useValue: mockRouter }, AcceptAllGuard, AcceptNoneGuard, - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(EditItemPageComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(EditItemPageComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/edit-item-page/edit-item-page.component.ts b/src/app/item-page/edit-item-page/edit-item-page.component.ts index 652b85916e..e6ed337699 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.component.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.component.ts @@ -1,6 +1,6 @@ import { fadeIn, fadeInOut } from '../../shared/animations/fade'; import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core'; -import { ActivatedRoute, CanActivate, Route, Router } from '@angular/router'; +import { ActivatedRoute, CanActivate, Route, Router, RouterLink, RouterOutlet } from '@angular/router'; import { RemoteData } from '../../core/data/remote-data'; import { Item } from '../../core/shared/item.model'; import { combineLatest as observableCombineLatest, Observable, of as observableOf } from 'rxjs'; @@ -8,6 +8,9 @@ import { map } from 'rxjs/operators'; import { isNotEmpty } from '../../shared/empty.util'; import { getItemPageRoute } from '../item-page-routing-paths'; import { GenericConstructor } from '../../core/shared/generic-constructor'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; @Component({ selector: 'ds-edit-item-page', @@ -16,7 +19,18 @@ import { GenericConstructor } from '../../core/shared/generic-constructor'; animations: [ fadeIn, fadeInOut - ] + ], + imports: [ + TranslateModule, + NgClass, + NgIf, + NgForOf, + AsyncPipe, + NgbTooltipModule, + RouterLink, + RouterOutlet + ], + standalone: true }) /** * Page component for editing an item diff --git a/src/app/item-page/edit-item-page/edit-item-page.module.ts b/src/app/item-page/edit-item-page/edit-item-page.module.ts index 0a75394ddd..e33a0a0b2b 100644 --- a/src/app/item-page/edit-item-page/edit-item-page.module.ts +++ b/src/app/item-page/edit-item-page/edit-item-page.module.ts @@ -51,58 +51,56 @@ import { * Module that contains all components related to the Edit Item page administrator functionality */ @NgModule({ - imports: [ - CommonModule, - SharedModule, - NgbTooltipModule, - EditItemPageRoutingModule, - SearchPageModule, - DragDropModule, - ResourcePoliciesModule, - NgbModule, - ItemVersionsModule, - DsoSharedModule, - ResultsBackButtonModule, - AccessControlFormModule, - ], - declarations: [ - EditItemPageComponent, - ItemOperationComponent, - AbstractSimpleItemActionComponent, - AbstractItemUpdateComponent, - ItemWithdrawComponent, - ItemReinstateComponent, - ItemPrivateComponent, - ItemPublicComponent, - ItemDeleteComponent, - ItemStatusComponent, - ThemedItemStatusComponent, - ItemRelationshipsComponent, - ItemBitstreamsComponent, - ItemVersionHistoryComponent, - ItemEditBitstreamComponent, - ItemEditBitstreamBundleComponent, - PaginatedDragAndDropBitstreamListComponent, - EditRelationshipComponent, - EditRelationshipListComponent, - ItemCollectionMapperComponent, - ItemMoveComponent, - ItemEditBitstreamDragHandleComponent, - VirtualMetadataComponent, - ItemAuthorizationsComponent, - IdentifierDataComponent, - ItemRegisterDoiComponent, - ItemCurateComponent, - ItemAccessControlComponent, - ], - providers: [ - BundleDataService, - IdentifierDataService, - ObjectValuesPipe - ], - exports: [ - ItemOperationComponent, - ] + imports: [ + CommonModule, + SharedModule, + NgbTooltipModule, + EditItemPageRoutingModule, + SearchPageModule, + DragDropModule, + ResourcePoliciesModule, + NgbModule, + ItemVersionsModule, + DsoSharedModule, + ResultsBackButtonModule, + AccessControlFormModule, + EditItemPageComponent, + ItemOperationComponent, + AbstractSimpleItemActionComponent, + AbstractItemUpdateComponent, + ItemWithdrawComponent, + ItemReinstateComponent, + ItemPrivateComponent, + ItemPublicComponent, + ItemDeleteComponent, + ItemStatusComponent, + ThemedItemStatusComponent, + ItemRelationshipsComponent, + ItemBitstreamsComponent, + ItemVersionHistoryComponent, + ItemEditBitstreamComponent, + ItemEditBitstreamBundleComponent, + PaginatedDragAndDropBitstreamListComponent, + EditRelationshipComponent, + EditRelationshipListComponent, + ItemCollectionMapperComponent, + ItemMoveComponent, + ItemEditBitstreamDragHandleComponent, + VirtualMetadataComponent, + ItemAuthorizationsComponent, + IdentifierDataComponent, + ItemRegisterDoiComponent, + ItemCurateComponent, + ItemAccessControlComponent + ], + providers: [ + BundleDataService, + IdentifierDataService, + ObjectValuesPipe + ], + exports: [ + ItemOperationComponent, + ] }) export class EditItemPageModule { diff --git a/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.spec.ts b/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.spec.ts index d841b97e2a..3af22dd61f 100644 --- a/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.spec.ts @@ -8,8 +8,8 @@ xdescribe('ItemAccessControlComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ ItemAccessControlComponent ] - }) + imports: [ItemAccessControlComponent] +}) .compileComponents(); }); diff --git a/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.ts b/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.ts index 874b624494..80ba803fae 100644 --- a/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.ts +++ b/src/app/item-page/edit-item-page/item-access-control/item-access-control.component.ts @@ -5,11 +5,21 @@ import { getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { RemoteData } from '../../../core/data/remote-data'; import { Item } from '../../../core/shared/item.model'; import { ActivatedRoute } from '@angular/router'; +import { + AccessControlFormContainerComponent +} from '../../../shared/access-control-form-container/access-control-form-container.component'; +import { AsyncPipe, NgIf } from '@angular/common'; @Component({ selector: 'ds-item-access-control', templateUrl: './item-access-control.component.html', - styleUrls: [ './item-access-control.component.scss' ], + styleUrls: ['./item-access-control.component.scss'], + imports: [ + AccessControlFormContainerComponent, + NgIf, + AsyncPipe + ], + standalone: true }) export class ItemAccessControlComponent implements OnInit { diff --git a/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.spec.ts b/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.spec.ts index 5d2afbaf4c..a95977c389 100644 --- a/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.spec.ts @@ -73,23 +73,21 @@ describe('ItemAuthorizationsComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), ItemAuthorizationsComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: LinkService, useValue: linkService }, { provide: ActivatedRoute, useValue: routeStub }, ItemAuthorizationsComponent - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -167,8 +165,9 @@ describe('ItemAuthorizationsComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { diff --git a/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts b/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts index 635cf455b5..f3f6ebd0bb 100644 --- a/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts +++ b/src/app/item-page/edit-item-page/item-authorizations/item-authorizations.component.ts @@ -17,6 +17,12 @@ import { LinkService } from '../../../core/cache/builders/link.service'; import { Bundle } from '../../../core/shared/bundle.model'; import { hasValue, isNotEmpty } from '../../../shared/empty.util'; import { Bitstream } from '../../../core/shared/bitstream.model'; +import { ResourcePoliciesComponent } from '../../../shared/resource-policies/resource-policies.component'; +import { NgbCollapseModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { AlertComponent } from '../../../shared/alert/alert.component'; +import { NgForTrackByIdDirective } from '../../../shared/ng-for-track-by-id.directive'; /** * Interface for a bundle's bitstream map entry @@ -29,7 +35,18 @@ interface BundleBitstreamsMapEntry { @Component({ selector: 'ds-item-authorizations', templateUrl: './item-authorizations.component.html', - styleUrls:['./item-authorizations.component.scss'] + styleUrls: ['./item-authorizations.component.scss'], + imports: [ + ResourcePoliciesComponent, + NgbCollapseModule, + TranslateModule, + NgForOf, + NgForTrackByIdDirective, + AsyncPipe, + NgIf, + AlertComponent + ], + standalone: true }) /** * Component that handles the item Authorizations diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.spec.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.spec.ts index 10e1812131..f82765c68f 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.spec.ts @@ -149,9 +149,8 @@ describe('ItemBitstreamsComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ItemBitstreamsComponent, ObjectValuesPipe, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), ItemBitstreamsComponent, ObjectValuesPipe, VarDirective], + providers: [ { provide: ItemDataService, useValue: itemService }, { provide: ObjectUpdatesService, useValue: objectUpdatesService }, { provide: Router, useValue: router }, @@ -163,10 +162,10 @@ describe('ItemBitstreamsComponent', () => { { provide: SearchConfigurationService, useValue: searchConfig }, { provide: BundleDataService, useValue: bundleService }, ChangeDetectorRef - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts index ee53bd919c..b02d2f2571 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-bitstreams.component.ts @@ -4,9 +4,9 @@ import { filter, map, switchMap, take } from 'rxjs/operators'; import { Observable, Subscription, zip as observableZip } from 'rxjs'; import { ItemDataService } from '../../../core/data/item-data.service'; import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { BitstreamDataService } from '../../../core/data/bitstream-data.service'; import { hasValue, isNotEmpty } from '../../../shared/empty.util'; import { ObjectCacheService } from '../../../core/cache/object-cache.service'; @@ -25,11 +25,28 @@ import { Operation } from 'fast-json-patch'; import { FieldUpdate } from '../../../core/data/object-updates/field-update.model'; import { FieldUpdates } from '../../../core/data/object-updates/field-updates.model'; import { FieldChangeType } from '../../../core/data/object-updates/field-change-type.model'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { ItemEditBitstreamBundleComponent } from './item-edit-bitstream-bundle/item-edit-bitstream-bundle.component'; +import { + ItemEditBitstreamDragHandleComponent +} from './item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component'; +import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component'; @Component({ selector: 'ds-item-bitstreams', styleUrls: ['./item-bitstreams.component.scss'], templateUrl: './item-bitstreams.component.html', + imports: [ + AsyncPipe, + TranslateModule, + ItemEditBitstreamBundleComponent, + RouterLink, + NgIf, + ItemEditBitstreamDragHandleComponent, + NgForOf, + ThemedLoadingComponent + ], + standalone: true }) /** * Component for displaying an item's bitstreams edit page diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts index c26f99eb8f..dc0dffd4ec 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.spec.ts @@ -33,12 +33,11 @@ describe('ItemEditBitstreamBundleComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ItemEditBitstreamBundleComponent], - schemas: [ + imports: [TranslateModule.forRoot(), ItemEditBitstreamBundleComponent], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts index 70f4b63217..0223542ca1 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/item-edit-bitstream-bundle.component.ts @@ -5,11 +5,26 @@ import { ResponsiveColumnSizes } from '../../../../shared/responsive-table-sizes import { ResponsiveTableSizes } from '../../../../shared/responsive-table-sizes/responsive-table-sizes'; import { getItemPageRoute } from '../../../item-page-routing-paths'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { + PaginatedDragAndDropBitstreamListComponent +} from './paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { + ItemEditBitstreamDragHandleComponent +} from '../item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component'; @Component({ selector: 'ds-item-edit-bitstream-bundle', styleUrls: ['../item-bitstreams.component.scss'], templateUrl: './item-edit-bitstream-bundle.component.html', + imports: [ + PaginatedDragAndDropBitstreamListComponent, + TranslateModule, + RouterLink, + ItemEditBitstreamDragHandleComponent + ], + standalone: true }) /** * Component that displays a single bundle of an item on the item bitstreams edit page diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts index 7317eb93be..fd3cd3d21b 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.spec.ts @@ -115,18 +115,17 @@ describe('PaginatedDragAndDropBitstreamListComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [PaginatedDragAndDropBitstreamListComponent, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), PaginatedDragAndDropBitstreamListComponent, VarDirective], + providers: [ { provide: ObjectUpdatesService, useValue: objectUpdatesService }, { provide: BundleDataService, useValue: bundleService }, { provide: ObjectValuesPipe, useValue: objectValuesPipe }, { provide: RequestService, useValue: requestService }, { provide: PaginationService, useValue: paginationService } - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts index 2c81a4e2cb..b8ee2b9477 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-bundle/paginated-drag-and-drop-bitstream-list/paginated-drag-and-drop-bitstream-list.component.ts @@ -12,11 +12,37 @@ import { ObjectValuesPipe } from '../../../../../shared/utils/object-values-pipe import { RequestService } from '../../../../../core/data/request.service'; import { PaginationService } from '../../../../../core/pagination/pagination.service'; import { PaginationComponentOptions } from '../../../../../shared/pagination/pagination-component-options.model'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; +import { PaginationComponent } from '../../../../../shared/pagination/pagination.component'; +import { VarDirective } from '../../../../../shared/utils/var.directive'; +import { CdkDrag, CdkDragHandle, CdkDropList } from '@angular/cdk/drag-drop'; +import { ItemEditBitstreamComponent } from '../../item-edit-bitstream/item-edit-bitstream.component'; +import { + ItemEditBitstreamDragHandleComponent +} from '../../item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component'; +import { ThemedLoadingComponent } from '../../../../../shared/loading/themed-loading.component'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-paginated-drag-and-drop-bitstream-list', styleUrls: ['../../item-bitstreams.component.scss'], templateUrl: './paginated-drag-and-drop-bitstream-list.component.html', + imports: [ + AsyncPipe, + NgIf, + PaginationComponent, + NgClass, + VarDirective, + CdkDropList, + NgForOf, + CdkDrag, + ItemEditBitstreamComponent, + ItemEditBitstreamDragHandleComponent, + CdkDragHandle, + ThemedLoadingComponent, + TranslateModule + ], + standalone: true }) /** * A component listing edit-bitstream rows for each bitstream within the given bundle. diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts index e5cb9ba403..6c7b2a380a 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream-drag-handle/item-edit-bitstream-drag-handle.component.ts @@ -1,9 +1,14 @@ import { Component, OnInit, ViewChild, ViewContainerRef } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-item-edit-bitstream-drag-handle', styleUrls: ['../item-bitstreams.component.scss'], templateUrl: './item-edit-bitstream-drag-handle.component.html', + imports: [ + TranslateModule + ], + standalone: true }) /** * Component displaying a drag handle for the item-edit-bitstream page diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts index aafa5a4fe4..28ce707536 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.spec.ts @@ -72,18 +72,15 @@ describe('ItemEditBitstreamComponent', () => { ); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ - ItemEditBitstreamComponent, - VarDirective, - BrowserOnlyMockPipe, - ], - providers: [ + imports: [TranslateModule.forRoot(), ItemEditBitstreamComponent, + VarDirective], + declarations: [BrowserOnlyMockPipe], + providers: [ { provide: ObjectUpdatesService, useValue: objectUpdatesService } - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts index fcb5c706ac..aec01cfa57 100644 --- a/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts +++ b/src/app/item-page/edit-item-page/item-bitstreams/item-edit-bitstream/item-edit-bitstream.component.ts @@ -10,11 +10,24 @@ import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; import { FieldUpdate } from '../../../../core/data/object-updates/field-update.model'; import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model'; import { getBitstreamDownloadRoute } from '../../../../app-routing-paths'; +import { RouterLink } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; +import { BrowserOnlyPipe } from '../../../../shared/utils/browser-only.pipe'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { AsyncPipe } from '@angular/common'; @Component({ selector: 'ds-item-edit-bitstream', styleUrls: ['../item-bitstreams.component.scss'], templateUrl: './item-edit-bitstream.component.html', + imports: [ + RouterLink, + TranslateModule, + BrowserOnlyPipe, + NgbTooltipModule, + AsyncPipe + ], + standalone: true }) /** * Component that displays a single bitstream of an item on the edit page diff --git a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts index f9962643f8..a74503992a 100644 --- a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.spec.ts @@ -117,9 +117,8 @@ describe('ItemCollectionMapperComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemCollectionMapperComponent, CollectionSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemCollectionMapperComponent, CollectionSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Router, useValue: routerStub }, { provide: SearchConfigurationService, useValue: searchConfigServiceStub }, @@ -131,8 +130,8 @@ describe('ItemCollectionMapperComponent', () => { { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: CollectionDataService, useValue: collectionDataServiceStub }, { provide: AuthorizationDataService, useValue: authorizationDataService } - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts index d94abfaa9f..3433b24313 100644 --- a/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts +++ b/src/app/item-page/edit-item-page/item-collection-mapper/item-collection-mapper.component.ts @@ -19,7 +19,7 @@ import { import { ActivatedRoute, Router } from '@angular/router'; import { filter, map, startWith, switchMap, take } from 'rxjs/operators'; import { ItemDataService } from '../../../core/data/item-data.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { hasValue, isNotEmpty } from '../../../shared/empty.util'; @@ -28,6 +28,10 @@ import { SearchConfigurationService } from '../../../core/shared/search/search-c import { SearchService } from '../../../core/shared/search/search.service'; import { NoContent } from '../../../core/shared/NoContent.model'; import { getItemPageRoute } from '../../item-page-routing-paths'; +import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { CollectionSelectComponent } from '../../../shared/object-select/collection-select/collection-select.component'; +import { ThemedSearchFormComponent } from '../../../shared/search-form/themed-search-form.component'; +import { AsyncPipe, NgIf } from '@angular/common'; @Component({ selector: 'ds-item-collection-mapper', @@ -37,7 +41,16 @@ import { getItemPageRoute } from '../../item-page-routing-paths'; animations: [ fadeIn, fadeInOut - ] + ], + imports: [ + NgbNavModule, + CollectionSelectComponent, + ThemedSearchFormComponent, + AsyncPipe, + TranslateModule, + NgIf + ], + standalone: true }) /** * Component for mapping collections to an item diff --git a/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts b/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts index c104b4400b..e96e14651d 100644 --- a/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-curate/item-curate.component.spec.ts @@ -35,14 +35,13 @@ describe('ItemCurateComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ItemCurateComponent], - providers: [ - {provide: ActivatedRoute, useValue: routeStub}, - {provide: DSONameService, useValue: dsoNameService} - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), ItemCurateComponent], + providers: [ + { provide: ActivatedRoute, useValue: routeStub }, + { provide: DSONameService, useValue: dsoNameService } + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-curate/item-curate.component.ts b/src/app/item-page/edit-item-page/item-curate/item-curate.component.ts index fa1e0287fa..67c80fc25e 100644 --- a/src/app/item-page/edit-item-page/item-curate/item-curate.component.ts +++ b/src/app/item-page/edit-item-page/item-curate/item-curate.component.ts @@ -6,6 +6,9 @@ import { ActivatedRoute } from '@angular/router'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { hasValue } from '../../../shared/empty.util'; import { Item } from '../../../core/shared/item.model'; +import { CurationFormComponent } from '../../../curation-form/curation-form.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; /** * Component for managing a collection's curation tasks @@ -13,6 +16,13 @@ import { Item } from '../../../core/shared/item.model'; @Component({ selector: 'ds-item-curate', templateUrl: './item-curate.component.html', + imports: [ + CurationFormComponent, + NgIf, + TranslateModule, + AsyncPipe + ], + standalone: true }) export class ItemCurateComponent implements OnInit { dsoRD$: Observable>; diff --git a/src/app/item-page/edit-item-page/item-delete/item-delete.component.spec.ts b/src/app/item-page/edit-item-page/item-delete/item-delete.component.spec.ts index 2a9f7fae52..f1ee0b9cf3 100644 --- a/src/app/item-page/edit-item-page/item-delete/item-delete.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-delete/item-delete.component.spec.ts @@ -146,9 +146,8 @@ describe('ItemDeleteComponent', () => { notificationsServiceStub = new NotificationsServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemDeleteComponent, VarDirective], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemDeleteComponent, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, @@ -158,10 +157,10 @@ describe('ItemDeleteComponent', () => { { provide: EntityTypeDataService, useValue: entityTypeService }, { provide: RelationshipTypeDataService, useValue: {} }, { provide: LinkService, useValue: linkService }, - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-delete/item-delete.component.ts b/src/app/item-page/edit-item-page/item-delete/item-delete.component.ts index 9012ebe7d7..27d9cbeb93 100644 --- a/src/app/item-page/edit-item-page/item-delete/item-delete.component.ts +++ b/src/app/item-page/edit-item-page/item-delete/item-delete.component.ts @@ -24,10 +24,10 @@ import { hasValue, isNotEmpty } from '../../../shared/empty.util'; import { Item } from '../../../core/shared/item.model'; import { MetadataValue } from '../../../core/shared/metadata.models'; import { ViewMode } from '../../../core/shared/view-mode.model'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { ItemDataService } from '../../../core/data/item-data.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service'; import { RelationshipDataService } from '../../../core/data/relationship-data.service'; import { EntityTypeDataService } from '../../../core/data/entity-type-data.service'; @@ -36,10 +36,27 @@ import { followLink } from '../../../shared/utils/follow-link-config.model'; import { getItemEditRoute } from '../../item-page-routing-paths'; import { RemoteData } from '../../../core/data/remote-data'; import { NoContent } from '../../../core/shared/NoContent.model'; +import { + ListableObjectComponentLoaderComponent +} from '../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { ModifyItemOverviewComponent } from '../modify-item-overview/modify-item-overview.component'; +import { VarDirective } from '../../../shared/utils/var.directive'; @Component({ selector: 'ds-item-delete', - templateUrl: '../item-delete/item-delete.component.html' + templateUrl: '../item-delete/item-delete.component.html', + imports: [ + TranslateModule, + ListableObjectComponentLoaderComponent, + NgIf, + ModifyItemOverviewComponent, + AsyncPipe, + VarDirective, + NgForOf, + RouterLink + ], + standalone: true }) /** * Component responsible for rendering the item delete page diff --git a/src/app/item-page/edit-item-page/item-move/item-move.component.spec.ts b/src/app/item-page/edit-item-page/item-move/item-move.component.spec.ts index 43ac47e37b..5ce28d9d05 100644 --- a/src/app/item-page/edit-item-page/item-move/item-move.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-move/item-move.component.spec.ts @@ -92,19 +92,18 @@ describe('ItemMoveComponent', () => { itemDataService = mockItemDataService; TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemMoveComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemMoveComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, { provide: NotificationsService, useValue: notificationsServiceStub }, { provide: SearchService, useValue: mockSearchService }, { provide: RequestService, useValue: getMockRequestService() }, - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); fixture = TestBed.createComponent(ItemMoveComponent); comp = fixture.componentInstance; fixture.detectChanges(); diff --git a/src/app/item-page/edit-item-page/item-move/item-move.component.ts b/src/app/item-page/edit-item-page/item-move/item-move.component.ts index 0f9df588a1..b2c07ca00d 100644 --- a/src/app/item-page/edit-item-page/item-move/item-move.component.ts +++ b/src/app/item-page/edit-item-page/item-move/item-move.component.ts @@ -3,9 +3,9 @@ import { map, switchMap } from 'rxjs/operators'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { RemoteData } from '../../../core/data/remote-data'; import { Item } from '../../../core/shared/item.model'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { getAllSucceededRemoteDataPayload, getFirstCompletedRemoteData, getFirstSucceededRemoteData, getRemoteDataPayload, } from '../../../core/shared/operators'; @@ -17,10 +17,24 @@ import { getItemEditRoute, getItemPageRoute } from '../../item-page-routing-path import { followLink } from '../../../shared/utils/follow-link-config.model'; import { RequestService } from '../../../core/data/request.service'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { FormsModule } from '@angular/forms'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { + AuthorizedCollectionSelectorComponent +} from '../../../shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component'; @Component({ selector: 'ds-item-move', - templateUrl: './item-move.component.html' + templateUrl: './item-move.component.html', + imports: [ + TranslateModule, + FormsModule, + RouterLink, + AsyncPipe, + AuthorizedCollectionSelectorComponent, + NgIf + ], + standalone: true }) /** * Component that handles the moving of an item to a different collection diff --git a/src/app/item-page/edit-item-page/item-operation/item-operation.component.spec.ts b/src/app/item-page/edit-item-page/item-operation/item-operation.component.spec.ts index 7570119b3a..d9da662e41 100644 --- a/src/app/item-page/edit-item-page/item-operation/item-operation.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-operation/item-operation.component.spec.ts @@ -13,9 +13,8 @@ describe('ItemOperationComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - declarations: [ItemOperationComponent] - }).compileComponents(); + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ItemOperationComponent] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts b/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts index 76d056df95..69fabce6b5 100644 --- a/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts +++ b/src/app/item-page/edit-item-page/item-operation/item-operation.component.ts @@ -1,9 +1,20 @@ import {Component, Input} from '@angular/core'; import {ItemOperation} from './itemOperation.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf } from '@angular/common'; @Component({ selector: 'ds-item-operation', - templateUrl: './item-operation.component.html' + templateUrl: './item-operation.component.html', + imports: [ + TranslateModule, + RouterLink, + NgbTooltipModule, + NgIf + ], + standalone: true }) /** * Operation that can be performed on an item diff --git a/src/app/item-page/edit-item-page/item-private/item-private.component.spec.ts b/src/app/item-page/edit-item-page/item-private/item-private.component.spec.ts index 323255e3d7..0786d97e0f 100644 --- a/src/app/item-page/edit-item-page/item-private/item-private.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-private/item-private.component.spec.ts @@ -57,17 +57,16 @@ describe('ItemPrivateComponent', () => { notificationsServiceStub = new NotificationsServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemPrivateComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemPrivateComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, { provide: NotificationsService, useValue: notificationsServiceStub }, - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-private/item-private.component.ts b/src/app/item-page/edit-item-page/item-private/item-private.component.ts index 937eaad1c4..c23b5797ff 100644 --- a/src/app/item-page/edit-item-page/item-private/item-private.component.ts +++ b/src/app/item-page/edit-item-page/item-private/item-private.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { AbstractSimpleItemActionComponent } from '../simple-item-action/abstract-simple-item-action.component'; import { RemoteData } from '../../../core/data/remote-data'; @@ -9,10 +9,17 @@ import { Item } from '../../../core/shared/item.model'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { ItemDataService } from '../../../core/data/item-data.service'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; +import { ModifyItemOverviewComponent } from '../modify-item-overview/modify-item-overview.component'; @Component({ selector: 'ds-item-private', - templateUrl: '../simple-item-action/abstract-simple-item-action.component.html' + templateUrl: '../simple-item-action/abstract-simple-item-action.component.html', + standalone: true, + imports: [ + ModifyItemOverviewComponent, + TranslateModule, + RouterLink + ], }) /** * Component responsible for rendering the make item private page diff --git a/src/app/item-page/edit-item-page/item-public/item-public.component.spec.ts b/src/app/item-page/edit-item-page/item-public/item-public.component.spec.ts index 1f741fcc59..456b90578c 100644 --- a/src/app/item-page/edit-item-page/item-public/item-public.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-public/item-public.component.spec.ts @@ -54,17 +54,16 @@ describe('ItemPublicComponent', () => { notificationsServiceStub = new NotificationsServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemPublicComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemPublicComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, { provide: NotificationsService, useValue: notificationsServiceStub }, - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-public/item-public.component.ts b/src/app/item-page/edit-item-page/item-public/item-public.component.ts index 97e7b765eb..2c72056a0d 100644 --- a/src/app/item-page/edit-item-page/item-public/item-public.component.ts +++ b/src/app/item-page/edit-item-page/item-public/item-public.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { AbstractSimpleItemActionComponent } from '../simple-item-action/abstract-simple-item-action.component'; import { RemoteData } from '../../../core/data/remote-data'; @@ -8,10 +8,17 @@ import { Item } from '../../../core/shared/item.model'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { ItemDataService } from '../../../core/data/item-data.service'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; +import { ModifyItemOverviewComponent } from '../modify-item-overview/modify-item-overview.component'; @Component({ selector: 'ds-item-public', - templateUrl: '../simple-item-action/abstract-simple-item-action.component.html' + templateUrl: '../simple-item-action/abstract-simple-item-action.component.html', + standalone: true, + imports: [ + ModifyItemOverviewComponent, + TranslateModule, + RouterLink + ], }) /** * Component responsible for rendering the make item public page diff --git a/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts b/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts index af52114642..ecd4aae58c 100644 --- a/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.spec.ts @@ -64,18 +64,17 @@ describe('ItemRegisterDoiComponent', () => { notificationsServiceStub = new NotificationsServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemRegisterDoiComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemRegisterDoiComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, - { provide: IdentifierDataService, useValue: mockIdentifierDataService}, + { provide: IdentifierDataService, useValue: mockIdentifierDataService }, { provide: NotificationsService, useValue: notificationsServiceStub } - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.ts b/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.ts index 54878c6026..d1b5548219 100644 --- a/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.ts +++ b/src/app/item-page/edit-item-page/item-register-doi/item-register-doi.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { AbstractSimpleItemActionComponent } from '../simple-item-action/abstract-simple-item-action.component'; import { RemoteData } from '../../../core/data/remote-data'; @@ -14,10 +14,21 @@ import { Observable } from 'rxjs'; import { getItemPageRoute } from '../../item-page-routing-paths'; import { IdentifierDataService } from '../../../core/data/identifier-data.service'; import { Identifier } from '../../../shared/object-list/identifier-data/identifier.model'; +import { ModifyItemOverviewComponent } from '../modify-item-overview/modify-item-overview.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; @Component({ selector: 'ds-item-register-doi', - templateUrl: './item-register-doi-component.html' + templateUrl: './item-register-doi-component.html', + imports: [ + ModifyItemOverviewComponent, + RouterLink, + TranslateModule, + AsyncPipe, + NgIf, + NgForOf + ], + standalone: true }) /** * Component responsible for rendering the Item Register DOI page diff --git a/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts b/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts index 594e7b806a..eea4b7bafb 100644 --- a/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts @@ -56,17 +56,16 @@ describe('ItemReinstateComponent', () => { notificationsServiceStub = new NotificationsServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemReinstateComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemReinstateComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, { provide: NotificationsService, useValue: notificationsServiceStub }, - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.ts b/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.ts index 951585d156..57f7c4551b 100644 --- a/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.ts +++ b/src/app/item-page/edit-item-page/item-reinstate/item-reinstate.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { AbstractSimpleItemActionComponent } from '../simple-item-action/abstract-simple-item-action.component'; import { RemoteData } from '../../../core/data/remote-data'; @@ -8,10 +8,17 @@ import { Item } from '../../../core/shared/item.model'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { ItemDataService } from '../../../core/data/item-data.service'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; +import { ModifyItemOverviewComponent } from '../modify-item-overview/modify-item-overview.component'; @Component({ selector: 'ds-item-reinstate', - templateUrl: '../simple-item-action/abstract-simple-item-action.component.html' + templateUrl: '../simple-item-action/abstract-simple-item-action.component.html', + standalone: true, + imports: [ + ModifyItemOverviewComponent, + TranslateModule, + RouterLink + ], }) /** * Component responsible for rendering the Item Reinstate page diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts index 4cd663f0fb..bce66160f1 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts @@ -209,9 +209,8 @@ describe('EditRelationshipListComponent', () => { }; TestBed.configureTestingModule({ - imports: [SharedModule, TranslateModule.forRoot()], - declarations: [EditRelationshipListComponent], - providers: [ + imports: [SharedModule, TranslateModule.forRoot(), EditRelationshipListComponent], + providers: [ { provide: ObjectUpdatesService, useValue: objectUpdatesService }, { provide: RelationshipDataService, useValue: relationshipService }, { provide: SelectableListService, useValue: selectableListService }, @@ -225,10 +224,10 @@ describe('EditRelationshipListComponent', () => { { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); resetComponent(); })); diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts index b8542f5806..321d6d7910 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.ts @@ -41,11 +41,30 @@ import { FieldUpdates } from '../../../../core/data/object-updates/field-updates import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model'; import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface'; import { itemLinksToFollow } from '../../../../shared/utils/relation-query.utils'; +import { EditRelationshipComponent } from '../edit-relationship/edit-relationship.component'; +import { PaginationComponent } from '../../../../shared/pagination/pagination.component'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; +import { ObjectValuesPipe } from '../../../../shared/utils/object-values-pipe'; +import { VarDirective } from '../../../../shared/utils/var.directive'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../../../shared/loading/themed-loading.component'; @Component({ selector: 'ds-edit-relationship-list', styleUrls: ['./edit-relationship-list.component.scss'], templateUrl: './edit-relationship-list.component.html', + imports: [ + EditRelationshipComponent, + PaginationComponent, + AsyncPipe, + ObjectValuesPipe, + VarDirective, + NgIf, + TranslateModule, + NgClass, + ThemedLoadingComponent + ], + standalone: true }) /** * A component creating a list of editable relationships of a certain type diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.spec.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.spec.ts index a3062abf7e..ffff73b621 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.spec.ts @@ -117,20 +117,19 @@ describe('EditRelationshipComponent', () => { spyOn(objectUpdatesService, 'isSelectedVirtualMetadata').and.callFake((a, b, uuid) => observableOf(itemSelection[uuid])); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [EditRelationshipComponent], - providers: [ + imports: [TranslateModule.forRoot(), EditRelationshipComponent], + providers: [ { provide: ObjectUpdatesService, useValue: objectUpdatesService }, { - provide: NgbModal, useValue: { - open: () => {/*comment*/ - } - }, + provide: NgbModal, useValue: { + open: () => { + } + }, }, - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts index 742cc7181c..38f72ac4e7 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship/edit-relationship.component.ts @@ -13,12 +13,26 @@ import { hasValue, isNotEmpty } from '../../../../shared/empty.util'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { FieldUpdate } from '../../../../core/data/object-updates/field-update.model'; import { FieldChangeType } from '../../../../core/data/object-updates/field-change-type.model'; +import { + ListableObjectComponentLoaderComponent +} from '../../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { VirtualMetadataComponent } from '../../virtual-metadata/virtual-metadata.component'; @Component({ // eslint-disable-next-line @angular-eslint/component-selector selector: 'ds-edit-relationship', styleUrls: ['./edit-relationship.component.scss'], templateUrl: './edit-relationship.component.html', + imports: [ + ListableObjectComponentLoaderComponent, + AsyncPipe, + NgIf, + TranslateModule, + VirtualMetadataComponent + ], + standalone: true }) export class EditRelationshipComponent implements OnChanges { /** diff --git a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts index aa711c8ea3..f843b92df1 100644 --- a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.spec.ts @@ -210,9 +210,8 @@ describe('ItemRelationshipsComponent', () => { scheduler = getTestScheduler(); TestBed.configureTestingModule({ - imports: [SharedModule, TranslateModule.forRoot()], - declarations: [ItemRelationshipsComponent], - providers: [ + imports: [SharedModule, TranslateModule.forRoot(), ItemRelationshipsComponent], + providers: [ { provide: ThemeService, useValue: getMockThemeService() }, { provide: ItemDataService, useValue: itemService }, { provide: ObjectUpdatesService, useValue: objectUpdatesService }, @@ -225,10 +224,10 @@ describe('ItemRelationshipsComponent', () => { { provide: RequestService, useValue: requestService }, { provide: RelationshipTypeDataService, useValue: relationshipTypeService }, ChangeDetectorRef - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts index 8f7c43e79f..90f87add7d 100644 --- a/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts +++ b/src/app/item-page/edit-item-page/item-relationships/item-relationships.component.ts @@ -12,7 +12,7 @@ import { ItemDataService } from '../../../core/data/item-data.service'; import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service'; import { ActivatedRoute, Router } from '@angular/router'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { RelationshipDataService } from '../../../core/data/relationship-data.service'; import { RemoteData } from '../../../core/data/remote-data'; import { ObjectCacheService } from '../../../core/cache/object-cache.service'; @@ -30,11 +30,25 @@ import { FieldChangeType } from '../../../core/data/object-updates/field-change- import { RelationshipTypeDataService } from '../../../core/data/relationship-type-data.service'; import { PaginatedList } from '../../../core/data/paginated-list.model'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { EditRelationshipListComponent } from './edit-relationship-list/edit-relationship-list.component'; +import { VarDirective } from '../../../shared/utils/var.directive'; @Component({ selector: 'ds-item-relationships', styleUrls: ['./item-relationships.component.scss'], templateUrl: './item-relationships.component.html', + imports: [ + ThemedLoadingComponent, + AsyncPipe, + TranslateModule, + NgIf, + EditRelationshipListComponent, + NgForOf, + VarDirective + ], + standalone: true }) /** * Component for displaying an item's relationships edit page diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts b/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts index a67de2f435..c8e302bd14 100644 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.spec.ts @@ -64,16 +64,15 @@ describe('ItemStatusComponent', () => { }); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [ItemStatusComponent], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemStatusComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: IdentifierDataService, useValue: mockIdentifierDataService }, { provide: ConfigurationDataService, useValue: mockConfigurationDataService } - ], schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.ts b/src/app/item-page/edit-item-page/item-status/item-status.component.ts index 828f8d7439..8501d4a6d3 100644 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.ts +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { fadeIn, fadeInOut } from '../../../shared/animations/fade'; import { Item } from '../../../core/shared/item.model'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; import { ItemOperation } from '../item-operation/itemOperation.model'; import { distinctUntilChanged, map, mergeMap, switchMap, toArray } from 'rxjs/operators'; import { BehaviorSubject, Observable, Subscription } from 'rxjs'; @@ -18,6 +18,9 @@ import { Identifier } from '../../../shared/object-list/identifier-data/identifi import { ConfigurationProperty } from '../../../core/shared/configuration-property.model'; import { ConfigurationDataService } from '../../../core/data/configuration-data.service'; import { IdentifierData } from '../../../shared/object-list/identifier-data/identifier-data.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; +import { ItemOperationComponent } from '../item-operation/item-operation.component'; @Component({ selector: 'ds-item-status', @@ -26,7 +29,17 @@ import { IdentifierData } from '../../../shared/object-list/identifier-data/iden animations: [ fadeIn, fadeInOut - ] + ], + imports: [ + TranslateModule, + NgForOf, + AsyncPipe, + NgIf, + RouterLink, + ItemOperationComponent, + NgClass + ], + standalone: true }) /** * Component for displaying an item's status diff --git a/src/app/item-page/edit-item-page/item-status/themed-item-status.component.ts b/src/app/item-page/edit-item-page/item-status/themed-item-status.component.ts index eac5a53702..7864777507 100644 --- a/src/app/item-page/edit-item-page/item-status/themed-item-status.component.ts +++ b/src/app/item-page/edit-item-page/item-status/themed-item-status.component.ts @@ -3,9 +3,10 @@ import { ThemedComponent } from '../../../shared/theme-support/themed.component' import { ItemStatusComponent } from './item-status.component'; @Component({ - selector: 'ds-themed-item-status', - styleUrls: [], - templateUrl: '../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-item-status', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedItemStatusComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts index f4ed04c2c8..326f2554c1 100644 --- a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.spec.ts @@ -28,13 +28,12 @@ describe('ItemVersionHistoryComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ItemVersionHistoryComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ItemVersionHistoryComponent, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: activatedRoute } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts index 3845c03578..519e00a3b3 100644 --- a/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts +++ b/src/app/item-page/edit-item-page/item-version-history/item-version-history.component.ts @@ -6,10 +6,20 @@ import { map } from 'rxjs/operators'; import { getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { ActivatedRoute } from '@angular/router'; import { AlertType } from '../../../shared/alert/alert-type'; +import { ItemVersionsComponent } from '../../versions/item-versions.component'; +import { VarDirective } from '../../../shared/utils/var.directive'; +import { AsyncPipe, NgIf } from '@angular/common'; @Component({ selector: 'ds-item-version-history', - templateUrl: './item-version-history.component.html' + templateUrl: './item-version-history.component.html', + imports: [ + ItemVersionsComponent, + VarDirective, + NgIf, + AsyncPipe + ], + standalone: true }) /** * Component for listing and managing an item's version history diff --git a/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts b/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts index 3397742f5b..11c9323c07 100644 --- a/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts @@ -54,17 +54,16 @@ describe('ItemWithdrawComponent', () => { notificationsServiceStub = new NotificationsServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule,], - declarations: [ItemWithdrawComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, ItemWithdrawComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, { provide: NotificationsService, useValue: notificationsServiceStub }, - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.ts b/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.ts index cbd710ba1c..2b68b7dd09 100644 --- a/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.ts +++ b/src/app/item-page/edit-item-page/item-withdraw/item-withdraw.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { AbstractSimpleItemActionComponent } from '../simple-item-action/abstract-simple-item-action.component'; import { RemoteData } from '../../../core/data/remote-data'; @@ -9,10 +9,17 @@ import { Item } from '../../../core/shared/item.model'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { ItemDataService } from '../../../core/data/item-data.service'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; +import { ModifyItemOverviewComponent } from '../modify-item-overview/modify-item-overview.component'; @Component({ selector: 'ds-item-withdraw', - templateUrl: '../simple-item-action/abstract-simple-item-action.component.html' + templateUrl: '../simple-item-action/abstract-simple-item-action.component.html', + standalone: true, + imports: [ + ModifyItemOverviewComponent, + TranslateModule, + RouterLink + ], }) /** * Component responsible for rendering the Item Withdraw page diff --git a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts index 748231be1c..a6c58c68e5 100644 --- a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts +++ b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.spec.ts @@ -24,9 +24,8 @@ const mockItem = Object.assign(new Item(), { describe('ModifyItemOverviewComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ModifyItemOverviewComponent], - }).compileComponents(); + imports: [TranslateModule.forRoot(), ModifyItemOverviewComponent] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts index 974bc8d37f..4b7101760a 100644 --- a/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts +++ b/src/app/item-page/edit-item-page/modify-item-overview/modify-item-overview.component.ts @@ -1,10 +1,14 @@ import {Component, Input, OnInit} from '@angular/core'; import {Item} from '../../../core/shared/item.model'; import {MetadataMap} from '../../../core/shared/metadata.models'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgFor, KeyValuePipe } from '@angular/common'; @Component({ - selector: 'ds-modify-item-overview', - templateUrl: './modify-item-overview.component.html' + selector: 'ds-modify-item-overview', + templateUrl: './modify-item-overview.component.html', + standalone: true, + imports: [NgFor, KeyValuePipe, TranslateModule] }) /** * Component responsible for rendering a table containing the metadatavalues from the to be edited item diff --git a/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts b/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts index 9a19837665..dc2b0d62ba 100644 --- a/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts +++ b/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts @@ -27,8 +27,10 @@ import { getItemEditRoute } from '../../item-page-routing-paths'; * AbstractSimpleItemActionComponent component */ @Component({ - selector: 'ds-simple-action', - templateUrl: './abstract-simple-item-action.component.html' + selector: 'ds-simple-action', + templateUrl: './abstract-simple-item-action.component.html', + standalone: true, + imports: [CommonModule, FormsModule, NgbModule] }) export class MySimpleItemActionComponent extends AbstractSimpleItemActionComponent { @@ -83,17 +85,16 @@ describe('AbstractSimpleItemActionComponent', () => { notificationsServiceStub = new NotificationsServiceStub(); TestBed.configureTestingModule({ - imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [MySimpleItemActionComponent], - providers: [ + imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, MySimpleItemActionComponent], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: ItemDataService, useValue: mockItemDataService }, { provide: NotificationsService, useValue: notificationsServiceStub }, - ], schemas: [ + ], schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts b/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts index f4028354de..b3207fffee 100644 --- a/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts +++ b/src/app/item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.ts @@ -1,8 +1,8 @@ import { Component, OnInit, Predicate } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { ItemDataService } from '../../../core/data/item-data.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { Item } from '../../../core/shared/item.model'; import { RemoteData } from '../../../core/data/remote-data'; import { Observable } from 'rxjs'; @@ -10,6 +10,7 @@ import { getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { first, map } from 'rxjs/operators'; import { findSuccessfulAccordingTo } from '../edit-item-operators'; import { getItemEditRoute, getItemPageRoute } from '../../item-page-routing-paths'; +import { ModifyItemOverviewComponent } from '../modify-item-overview/modify-item-overview.component'; /** * Component to render and handle simple item edit actions such as withdrawal and reinstatement. @@ -17,7 +18,13 @@ import { getItemEditRoute, getItemPageRoute } from '../../item-page-routing-path */ @Component({ selector: 'ds-simple-action', - templateUrl: './abstract-simple-item-action.component.html' + templateUrl: './abstract-simple-item-action.component.html', + imports: [ + ModifyItemOverviewComponent, + TranslateModule, + RouterLink + ], + standalone: true }) export class AbstractSimpleItemActionComponent implements OnInit { diff --git a/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.spec.ts b/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.spec.ts index 9391df4755..c3a4b07be5 100644 --- a/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.spec.ts +++ b/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.spec.ts @@ -44,15 +44,14 @@ describe('VirtualMetadataComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [VirtualMetadataComponent, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), VirtualMetadataComponent, VarDirective], + providers: [ { provide: ObjectUpdatesService, useValue: objectUpdatesService }, { provide: APP_CONFIG, useValue: environment } - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); fixture = TestBed.createComponent(VirtualMetadataComponent); comp = fixture.componentInstance; diff --git a/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts b/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts index 6f8991dc73..2c85997dfa 100644 --- a/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts +++ b/src/app/item-page/edit-item-page/virtual-metadata/virtual-metadata.component.ts @@ -4,10 +4,25 @@ import {Item} from '../../../core/shared/item.model'; import {MetadataValue} from '../../../core/shared/metadata.models'; import {ObjectUpdatesService} from '../../../core/data/object-updates/object-updates.service'; import { APP_CONFIG, AppConfig } from '../../../../config/app-config.interface'; +import { AsyncPipe, NgClass, NgForOf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { VarDirective } from '../../../shared/utils/var.directive'; +import { + ListableObjectComponentLoaderComponent +} from '../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; @Component({ selector: 'ds-virtual-metadata', - templateUrl: './virtual-metadata.component.html' + templateUrl: './virtual-metadata.component.html', + imports: [ + NgClass, + TranslateModule, + NgForOf, + VarDirective, + AsyncPipe, + ListableObjectComponentLoaderComponent + ], + standalone: true }) /** * Component that lists both items of a relationship, along with their virtual metadata of the relationship. diff --git a/src/app/item-page/field-components/collections/collections.component.spec.ts b/src/app/item-page/field-components/collections/collections.component.spec.ts index 8ea5219308..8e926d7e74 100644 --- a/src/app/item-page/field-components/collections/collections.component.spec.ts +++ b/src/app/item-page/field-components/collections/collections.component.spec.ts @@ -45,16 +45,14 @@ describe('CollectionsComponent', () => { mockCollection4 = createMockCollection('c4'); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ CollectionsComponent ], - providers: [ + imports: [TranslateModule.forRoot(), CollectionsComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, - { provide: RemoteDataBuildService, useValue: getMockRemoteDataBuildService()}, + { provide: RemoteDataBuildService, useValue: getMockRemoteDataBuildService() }, { provide: CollectionDataService, useValue: collectionDataService }, - ], - - schemas: [ NO_ERRORS_SCHEMA ] - }).overrideComponent(CollectionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CollectionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/field-components/collections/collections.component.ts b/src/app/item-page/field-components/collections/collections.component.ts index 78d7c985a3..729d20a970 100644 --- a/src/app/item-page/field-components/collections/collections.component.ts +++ b/src/app/item-page/field-components/collections/collections.component.ts @@ -15,6 +15,10 @@ import { } from '../../../core/shared/operators'; import { FindListOptions } from '../../../core/data/find-list-options.model'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { MetadataFieldWrapperComponent } from '../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { RouterLink } from '@angular/router'; /** * This component renders the parent collections section of the item @@ -23,7 +27,16 @@ import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; @Component({ selector: 'ds-item-page-collections', - templateUrl: './collections.component.html' + templateUrl: './collections.component.html', + imports: [ + MetadataFieldWrapperComponent, + TranslateModule, + NgForOf, + AsyncPipe, + RouterLink, + NgIf + ], + standalone: true }) export class CollectionsComponent implements OnInit { diff --git a/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts b/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts index f869ab8aaf..90b90d84c4 100644 --- a/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts +++ b/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.spec.ts @@ -29,18 +29,17 @@ const mockLinkText = 'fake link text'; describe('MetadataUriValuesComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), MetadataUriValuesComponent], + providers: [ { provide: APP_CONFIG, useValue: environment }, - ], - declarations: [MetadataUriValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MetadataUriValuesComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MetadataUriValuesComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.ts b/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.ts index e070eccf2d..82ee16a627 100644 --- a/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.ts +++ b/src/app/item-page/field-components/metadata-uri-values/metadata-uri-values.component.ts @@ -2,6 +2,9 @@ import { Component, Input } from '@angular/core'; import { MetadataValuesComponent } from '../metadata-values/metadata-values.component'; import { MetadataValue } from '../../../core/shared/metadata.models'; +import { MetadataFieldWrapperComponent } from '../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgForOf, NgIf } from '@angular/common'; /** * This component renders the configured 'values' into the ds-metadata-field-wrapper component as a link. @@ -13,7 +16,14 @@ import { MetadataValue } from '../../../core/shared/metadata.models'; @Component({ selector: 'ds-metadata-uri-values', styleUrls: ['./metadata-uri-values.component.scss'], - templateUrl: './metadata-uri-values.component.html' + templateUrl: './metadata-uri-values.component.html', + imports: [ + MetadataFieldWrapperComponent, + TranslateModule, + NgForOf, + NgIf + ], + standalone: true }) export class MetadataUriValuesComponent extends MetadataValuesComponent { diff --git a/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts b/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts index 23f8098207..6a04de78e8 100644 --- a/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts +++ b/src/app/item-page/field-components/metadata-values/metadata-values.component.spec.ts @@ -30,18 +30,17 @@ const mockLabel = 'fake.message'; describe('MetadataValuesComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - }, - })], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + }, + }), MetadataValuesComponent], + providers: [ { provide: APP_CONFIG, useValue: environment }, - ], - declarations: [MetadataValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MetadataValuesComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MetadataValuesComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/item-page/field-components/metadata-values/metadata-values.component.ts b/src/app/item-page/field-components/metadata-values/metadata-values.component.ts index cbbae9006d..255b21c6bd 100644 --- a/src/app/item-page/field-components/metadata-values/metadata-values.component.ts +++ b/src/app/item-page/field-components/metadata-values/metadata-values.component.ts @@ -4,15 +4,22 @@ import { APP_CONFIG, AppConfig } from '../../../../config/app-config.interface'; import { BrowseDefinition } from '../../../core/shared/browse-definition.model'; import { hasValue } from '../../../shared/empty.util'; import { VALUE_LIST_BROWSE_DEFINITION } from '../../../core/shared/value-list-browse-definition.resource-type'; +import { TranslateModule } from '@ngx-translate/core'; +import { MarkdownPipe as MarkdownPipe_1 } from '../../../shared/utils/markdown.pipe'; +import { RouterLink } from '@angular/router'; +import { NgFor, NgTemplateOutlet, NgIf, AsyncPipe } from '@angular/common'; +import { MetadataFieldWrapperComponent } from '../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; /** * This component renders the configured 'values' into the ds-metadata-field-wrapper component. * It puts the given 'separator' between each two values. */ @Component({ - selector: 'ds-metadata-values', - styleUrls: ['./metadata-values.component.scss'], - templateUrl: './metadata-values.component.html' + selector: 'ds-metadata-values', + styleUrls: ['./metadata-values.component.scss'], + templateUrl: './metadata-values.component.html', + standalone: true, + imports: [MetadataFieldWrapperComponent, NgFor, NgTemplateOutlet, NgIf, RouterLink, AsyncPipe, MarkdownPipe_1, TranslateModule] }) export class MetadataValuesComponent implements OnChanges { diff --git a/src/app/item-page/full/field-components/file-section/full-file-section.component.spec.ts b/src/app/item-page/full/field-components/file-section/full-file-section.component.spec.ts index f8a8a83f29..98f62cf759 100644 --- a/src/app/item-page/full/field-components/file-section/full-file-section.component.spec.ts +++ b/src/app/item-page/full/field-components/file-section/full-file-section.component.spec.ts @@ -61,22 +61,20 @@ describe('FullFileSectionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), BrowserAnimationsModule], - declarations: [FullFileSectionComponent, VarDirective, FileSizePipe, MetadataFieldWrapperComponent], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), BrowserAnimationsModule, FullFileSectionComponent, VarDirective, FileSizePipe, MetadataFieldWrapperComponent], + providers: [ { provide: BitstreamDataService, useValue: bitstreamDataService }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: PaginationService, useValue: paginationService }, { provide: APP_CONFIG, useValue: environment }, - ], - - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(waitForAsync(() => { diff --git a/src/app/item-page/full/field-components/file-section/full-file-section.component.ts b/src/app/item-page/full/field-components/file-section/full-file-section.component.ts index d34edeb025..f1f111a6d1 100644 --- a/src/app/item-page/full/field-components/file-section/full-file-section.component.ts +++ b/src/app/item-page/full/field-components/file-section/full-file-section.component.ts @@ -11,11 +11,22 @@ import { PaginatedList } from '../../../../core/data/paginated-list.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { switchMap, tap } from 'rxjs/operators'; import { NotificationsService } from '../../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { hasValue, isEmpty } from '../../../../shared/empty.util'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; import { AppConfig, APP_CONFIG } from 'src/config/app-config.interface'; +import { PaginationComponent } from '../../../../shared/pagination/pagination.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { VarDirective } from '../../../../shared/utils/var.directive'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { + ThemedFileDownloadLinkComponent +} from '../../../../shared/file-download-link/themed-file-download-link.component'; +import { FileSizePipe } from '../../../../shared/utils/file-size-pipe'; +import { + MetadataFieldWrapperComponent +} from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; /** * This component renders the file section of the item @@ -25,7 +36,20 @@ import { AppConfig, APP_CONFIG } from 'src/config/app-config.interface'; @Component({ selector: 'ds-item-page-full-file-section', styleUrls: ['./full-file-section.component.scss'], - templateUrl: './full-file-section.component.html' + templateUrl: './full-file-section.component.html', + imports: [ + PaginationComponent, + NgIf, + TranslateModule, + AsyncPipe, + VarDirective, + ThemedThumbnailComponent, + NgForOf, + ThemedFileDownloadLinkComponent, + FileSizePipe, + MetadataFieldWrapperComponent + ], + standalone: true }) export class FullFileSectionComponent extends FileSectionComponent implements OnDestroy, OnInit { diff --git a/src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts b/src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts index 015eec285c..c3421cbcda 100644 --- a/src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts +++ b/src/app/item-page/full/field-components/file-section/themed-full-file-section.component.ts @@ -7,9 +7,10 @@ import { Item } from '../../../../core/shared/item.model'; * Themed wrapper for {@link FullFileSectionComponent} */ @Component({ - selector: 'ds-themed-item-page-full-file-section', - styleUrls: [], - templateUrl: './../../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-item-page-full-file-section', + styleUrls: [], + templateUrl: './../../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedFullFileSectionComponent extends ThemedComponent { diff --git a/src/app/item-page/full/full-item-page.component.spec.ts b/src/app/item-page/full/full-item-page.component.spec.ts index 9fc078c2cd..46ca9d5a9d 100644 --- a/src/app/item-page/full/full-item-page.component.spec.ts +++ b/src/app/item-page/full/full-item-page.component.spec.ts @@ -106,14 +106,13 @@ describe('FullItemPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), RouterTestingModule.withRoutes([]), BrowserAnimationsModule], - declarations: [FullItemPageComponent, TruncatePipe, VarDirective], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), RouterTestingModule.withRoutes([]), BrowserAnimationsModule, FullItemPageComponent, TruncatePipe, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: ItemDataService, useValue: {} }, { provide: MetadataService, useValue: metadataServiceStub }, @@ -123,9 +122,9 @@ describe('FullItemPageComponent', () => { { provide: SignpostingDataService, useValue: signpostingDataService }, { provide: LinkHeadService, useValue: linkHeadService }, { provide: PLATFORM_ID, useValue: 'server' } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(FullItemPageComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(FullItemPageComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/full/full-item-page.component.ts b/src/app/item-page/full/full-item-page.component.ts index 31dd2c5fc2..3d5a0d5940 100644 --- a/src/app/item-page/full/full-item-page.component.ts +++ b/src/app/item-page/full/full-item-page.component.ts @@ -1,6 +1,6 @@ import { filter, map } from 'rxjs/operators'; import { ChangeDetectionStrategy, Component, Inject, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core'; -import { ActivatedRoute, Data, Router } from '@angular/router'; +import { ActivatedRoute, Data, Router, RouterLink } from '@angular/router'; import { BehaviorSubject, Observable } from 'rxjs'; @@ -14,11 +14,25 @@ import { Item } from '../../core/shared/item.model'; import { fadeInOut } from '../../shared/animations/fade'; import { hasValue } from '../../shared/empty.util'; import { AuthService } from '../../core/auth/auth.service'; -import { Location } from '@angular/common'; +import { AsyncPipe, KeyValuePipe, Location, NgForOf, NgIf } from '@angular/common'; import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service'; import { ServerResponseService } from '../../core/services/server-response.service'; import { SignpostingDataService } from '../../core/data/signposting-data.service'; import { LinkHeadService } from '../../core/services/link-head.service'; +import { ErrorComponent } from '../../shared/error/error.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedFullFileSectionComponent } from './field-components/file-section/themed-full-file-section.component'; +import { CollectionsComponent } from '../field-components/collections/collections.component'; +import { ItemVersionsComponent } from '../versions/item-versions.component'; +import { + ThemedItemPageTitleFieldComponent +} from '../simple/field-components/specific-field/title/themed-item-page-field.component'; +import { DsoEditMenuComponent } from '../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { ItemVersionsNoticeComponent } from '../versions/notice/item-versions-notice.component'; +import { ViewTrackerComponent } from '../../statistics/angulartics/dspace/view-tracker.component'; +import { ThemedItemAlertsComponent } from '../alerts/themed-item-alerts.component'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * This component renders a full item page. @@ -30,7 +44,27 @@ import { LinkHeadService } from '../../core/services/link-head.service'; styleUrls: ['./full-item-page.component.scss'], templateUrl: './full-item-page.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - animations: [fadeInOut] + animations: [fadeInOut], + imports: [ + ErrorComponent, + ThemedLoadingComponent, + TranslateModule, + ThemedFullFileSectionComponent, + CollectionsComponent, + ItemVersionsComponent, + NgIf, + NgForOf, + AsyncPipe, + KeyValuePipe, + RouterLink, + ThemedItemPageTitleFieldComponent, + DsoEditMenuComponent, + ItemVersionsNoticeComponent, + ViewTrackerComponent, + ThemedItemAlertsComponent, + VarDirective + ], + standalone: true }) export class FullItemPageComponent extends ItemPageComponent implements OnInit, OnDestroy { diff --git a/src/app/item-page/full/themed-full-item-page.component.ts b/src/app/item-page/full/themed-full-item-page.component.ts index a3b19e6f93..3c82e62cdd 100644 --- a/src/app/item-page/full/themed-full-item-page.component.ts +++ b/src/app/item-page/full/themed-full-item-page.component.ts @@ -6,9 +6,10 @@ import { FullItemPageComponent } from './full-item-page.component'; * Themed wrapper for FullItemPageComponent */ @Component({ - selector: 'ds-themed-full-item-page', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html', + selector: 'ds-themed-full-item-page', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedFullItemPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/item-page/item-page.module.ts b/src/app/item-page/item-page.module.ts index a8d41d1535..79a994f766 100644 --- a/src/app/item-page/item-page.module.ts +++ b/src/app/item-page/item-page.module.ts @@ -106,29 +106,26 @@ const DECLARATIONS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule.withEntryComponents(), - ItemPageRoutingModule, - EditItemPageModule, - ItemVersionsModule, - ItemSharedModule, - StatisticsModule.forRoot(), - JournalEntitiesModule.withEntryComponents(), - ResearchEntitiesModule.withEntryComponents(), - NgxGalleryModule, - NgbAccordionModule, - ResultsBackButtonModule, - UploadModule, - DsoPageModule, - ], - declarations: [ - ...DECLARATIONS, - - ], - exports: [ - ...DECLARATIONS, - ] + imports: [ + CommonModule, + SharedModule.withEntryComponents(), + ItemPageRoutingModule, + EditItemPageModule, + ItemVersionsModule, + ItemSharedModule, + StatisticsModule.forRoot(), + JournalEntitiesModule.withEntryComponents(), + ResearchEntitiesModule.withEntryComponents(), + NgxGalleryModule, + NgbAccordionModule, + ResultsBackButtonModule, + UploadModule, + DsoPageModule, + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS, + ] }) export class ItemPageModule { /** diff --git a/src/app/item-page/item-shared.module.ts b/src/app/item-page/item-shared.module.ts index 9c2bbba619..10ea5f4171 100644 --- a/src/app/item-page/item-shared.module.ts +++ b/src/app/item-page/item-shared.module.ts @@ -35,24 +35,22 @@ const COMPONENTS = [ ]; @NgModule({ - declarations: [ - ...COMPONENTS - ], - imports: [ - CommonModule, - SearchModule, - SharedModule, - TranslateModule - ], - exports: [ - ...COMPONENTS - ], - providers: [ - { - provide: DYNAMIC_FORM_CONTROL_MAP_FN, - useValue: dsDynamicFormControlMapFn - }, - ...ENTRY_COMPONENTS, - ] + imports: [ + CommonModule, + SearchModule, + SharedModule, + TranslateModule, + ...COMPONENTS + ], + exports: [ + ...COMPONENTS + ], + providers: [ + { + provide: DYNAMIC_FORM_CONTROL_MAP_FN, + useValue: dsDynamicFormControlMapFn + }, + ...ENTRY_COMPONENTS, + ] }) export class ItemSharedModule { } diff --git a/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.spec.ts b/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.spec.ts index 98d0ac08a6..b4bc2c2db4 100644 --- a/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.spec.ts +++ b/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.spec.ts @@ -57,13 +57,12 @@ describe('MediaViewerImageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports:[], - declarations: [MediaViewerImageComponent], - schemas: [NO_ERRORS_SCHEMA], - providers: [ + imports: [MediaViewerImageComponent], + schemas: [NO_ERRORS_SCHEMA], + providers: [ { provide: AuthService, useValue: authService }, - ], - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.ts b/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.ts index 2ad43f6883..d52ad43dbb 100644 --- a/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.ts +++ b/src/app/item-page/media-viewer/media-viewer-image/media-viewer-image.component.ts @@ -1,9 +1,9 @@ import { Component, Input, OnChanges, OnInit } from '@angular/core'; -import { NgxGalleryImage, NgxGalleryOptions } from '@kolkov/ngx-gallery'; +import { NgxGalleryAnimation, NgxGalleryImage, NgxGalleryModule, NgxGalleryOptions } from '@kolkov/ngx-gallery'; import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model'; -import { NgxGalleryAnimation } from '@kolkov/ngx-gallery'; import { Observable } from 'rxjs'; import { AuthService } from '../../../core/auth/auth.service'; +import { AsyncPipe } from '@angular/common'; /** * This componenet render an image gallery for the image viewer @@ -12,6 +12,11 @@ import { AuthService } from '../../../core/auth/auth.service'; selector: 'ds-media-viewer-image', templateUrl: './media-viewer-image.component.html', styleUrls: ['./media-viewer-image.component.scss'], + imports: [ + NgxGalleryModule, + AsyncPipe + ], + standalone: true }) export class MediaViewerImageComponent implements OnChanges, OnInit { @Input() images: MediaViewerItem[]; diff --git a/src/app/item-page/media-viewer/media-viewer-image/themed-media-viewer-image.component.ts b/src/app/item-page/media-viewer/media-viewer-image/themed-media-viewer-image.component.ts index 85ac779817..43eeb1cb0e 100644 --- a/src/app/item-page/media-viewer/media-viewer-image/themed-media-viewer-image.component.ts +++ b/src/app/item-page/media-viewer/media-viewer-image/themed-media-viewer-image.component.ts @@ -7,9 +7,10 @@ import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model'; * Themed wrapper for {@link MediaViewerImageComponent}. */ @Component({ - selector: 'ds-themed-media-viewer-image', - styleUrls: [], - templateUrl: '../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-media-viewer-image', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedMediaViewerImageComponent extends ThemedComponent { diff --git a/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.spec.ts b/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.spec.ts index 92aa229b01..b3730b2833 100644 --- a/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.spec.ts +++ b/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.spec.ts @@ -19,23 +19,21 @@ describe('MediaViewerVideoComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), BrowserAnimationsModule, - ], - declarations: [ MediaViewerVideoComponent, VarDirective, FileSizePipe, - MetadataFieldWrapperComponent, - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + MetadataFieldWrapperComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); const mockBitstream: Bitstream = Object.assign(new Bitstream(), { diff --git a/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts b/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts index 52cd3cac34..b29fee7e99 100644 --- a/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts +++ b/src/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts @@ -4,6 +4,9 @@ import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { languageHelper } from './language-helper'; import { CaptionInfo } from './caption-info'; import { Bitstream } from 'src/app/core/shared/bitstream.model'; +import { NgForOf, NgIf } from '@angular/common'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component renders a video viewer and playlist for the media viewer @@ -12,6 +15,13 @@ import { Bitstream } from 'src/app/core/shared/bitstream.model'; selector: 'ds-media-viewer-video', templateUrl: './media-viewer-video.component.html', styleUrls: ['./media-viewer-video.component.scss'], + imports: [ + NgForOf, + NgbDropdownModule, + TranslateModule, + NgIf + ], + standalone: true }) export class MediaViewerVideoComponent { @Input() medias: MediaViewerItem[]; diff --git a/src/app/item-page/media-viewer/media-viewer-video/themed-media-viewer-video.component.ts b/src/app/item-page/media-viewer/media-viewer-video/themed-media-viewer-video.component.ts index 8ae45b2dd3..eb0d1740da 100644 --- a/src/app/item-page/media-viewer/media-viewer-video/themed-media-viewer-video.component.ts +++ b/src/app/item-page/media-viewer/media-viewer-video/themed-media-viewer-video.component.ts @@ -8,9 +8,10 @@ import { Bitstream } from '../../../core/shared/bitstream.model'; * Themed wrapper for {@link MediaViewerVideoComponent}. */ @Component({ - selector: 'ds-themed-media-viewer-video', - styleUrls: [], - templateUrl: '../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-media-viewer-video', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedMediaViewerVideoComponent extends ThemedComponent { diff --git a/src/app/item-page/media-viewer/media-viewer.component.spec.ts b/src/app/item-page/media-viewer/media-viewer.component.spec.ts index 0c170ac8cf..a405c17131 100644 --- a/src/app/item-page/media-viewer/media-viewer.component.spec.ts +++ b/src/app/item-page/media-viewer/media-viewer.component.spec.ts @@ -62,27 +62,24 @@ describe('MediaViewerComponent', () => { beforeEach(waitForAsync(() => { return TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), BrowserAnimationsModule, - ], - declarations: [ MediaViewerComponent, VarDirective, FileSizePipe, - MetadataFieldWrapperComponent, - ], - providers: [ + MetadataFieldWrapperComponent + ], + providers: [ { provide: BitstreamDataService, useValue: bitstreamDataService }, - ], - - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/media-viewer/media-viewer.component.ts b/src/app/item-page/media-viewer/media-viewer.component.ts index 242e50646e..ebae23074c 100644 --- a/src/app/item-page/media-viewer/media-viewer.component.ts +++ b/src/app/item-page/media-viewer/media-viewer.component.ts @@ -14,6 +14,13 @@ import { followLink } from '../../shared/utils/follow-link-config.model'; import { MediaViewerConfig } from '../../../config/media-viewer-config.interface'; import { environment } from '../../../environments/environment'; import { Subscription } from 'rxjs/internal/Subscription'; +import { ThemedMediaViewerImageComponent } from './media-viewer-image/themed-media-viewer-image.component'; +import { ThumbnailComponent } from '../../thumbnail/thumbnail.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ThemedMediaViewerVideoComponent } from './media-viewer-video/themed-media-viewer-video.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * This component renders the media viewers @@ -22,6 +29,17 @@ import { Subscription } from 'rxjs/internal/Subscription'; selector: 'ds-media-viewer', templateUrl: './media-viewer.component.html', styleUrls: ['./media-viewer.component.scss'], + imports: [ + ThemedMediaViewerImageComponent, + ThumbnailComponent, + AsyncPipe, + NgIf, + ThemedMediaViewerVideoComponent, + TranslateModule, + ThemedLoadingComponent, + VarDirective + ], + standalone: true }) export class MediaViewerComponent implements OnDestroy, OnInit { @Input() item: Item; diff --git a/src/app/item-page/media-viewer/themed-media-viewer.component.ts b/src/app/item-page/media-viewer/themed-media-viewer.component.ts index 6acf948616..5627296993 100644 --- a/src/app/item-page/media-viewer/themed-media-viewer.component.ts +++ b/src/app/item-page/media-viewer/themed-media-viewer.component.ts @@ -8,9 +8,10 @@ import { MediaViewerConfig } from '../../../config/media-viewer-config.interface * Themed wrapper for {@link MediaViewerComponent}. */ @Component({ - selector: 'ds-themed-media-viewer', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-media-viewer', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedMediaViewerComponent extends ThemedComponent { diff --git a/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts b/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts index 2727391dff..f39189296e 100644 --- a/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts +++ b/src/app/item-page/mirador-viewer/mirador-viewer.component.spec.ts @@ -38,20 +38,19 @@ describe('MiradorViewerComponent with search', () => { beforeEach(waitForAsync(() => { viewerService.showEmbeddedViewer.and.returnValue(true); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [MiradorViewerComponent], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), MiradorViewerComponent], + providers: [ { provide: BitstreamDataService, useValue: {} }, { provide: BundleDataService, useValue: {} }, { provide: HostWindowService, useValue: mockHostWindowService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MiradorViewerComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MiradorViewerComponent, { set: { providers: [ { provide: MiradorViewerService, useValue: viewerService } @@ -101,20 +100,19 @@ describe('MiradorViewerComponent with multiple images', () => { viewerService.showEmbeddedViewer.and.returnValue(true); viewerService.getImageCount.and.returnValue(observableOf(2)); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [MiradorViewerComponent], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), MiradorViewerComponent], + providers: [ { provide: BitstreamDataService, useValue: {} }, { provide: BundleDataService, useValue: {} }, - { provide: HostWindowService, useValue: mockHostWindowService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MiradorViewerComponent, { + { provide: HostWindowService, useValue: mockHostWindowService } + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MiradorViewerComponent, { set: { providers: [ { provide: MiradorViewerService, useValue: viewerService } @@ -161,20 +159,19 @@ describe('MiradorViewerComponent with a single image', () => { viewerService.showEmbeddedViewer.and.returnValue(true); viewerService.getImageCount.and.returnValue(observableOf(1)); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [MiradorViewerComponent], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), MiradorViewerComponent], + providers: [ { provide: BitstreamDataService, useValue: {} }, { provide: BundleDataService, useValue: {} }, { provide: HostWindowService, useValue: mockHostWindowService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MiradorViewerComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MiradorViewerComponent, { set: { providers: [ { provide: MiradorViewerService, useValue: viewerService } @@ -214,18 +211,17 @@ describe('MiradorViewerComponent in development mode', () => { viewerService.showEmbeddedViewer.and.returnValue(false); viewerService.getImageCount.and.returnValue(observableOf(1)); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [MiradorViewerComponent], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), MiradorViewerComponent], + providers: [ { provide: BitstreamDataService, useValue: {} } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MiradorViewerComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MiradorViewerComponent, { set: { providers: [ { provide: MiradorViewerService, useValue: viewerService }, diff --git a/src/app/item-page/mirador-viewer/mirador-viewer.component.ts b/src/app/item-page/mirador-viewer/mirador-viewer.component.ts index fee8046272..c7252f3201 100644 --- a/src/app/item-page/mirador-viewer/mirador-viewer.component.ts +++ b/src/app/item-page/mirador-viewer/mirador-viewer.component.ts @@ -5,17 +5,24 @@ import { environment } from '../../../environments/environment'; import { BitstreamDataService } from '../../core/data/bitstream-data.service'; import { Observable, of } from 'rxjs'; import { map, take } from 'rxjs/operators'; -import { isPlatformBrowser } from '@angular/common'; +import { AsyncPipe, isPlatformBrowser, NgIf } from '@angular/common'; import { MiradorViewerService } from './mirador-viewer.service'; import { HostWindowService, WidthCategory } from '../../shared/host-window.service'; import { BundleDataService } from '../../core/data/bundle-data.service'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-mirador-viewer', styleUrls: ['./mirador-viewer.component.scss'], templateUrl: './mirador-viewer.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - providers: [ MiradorViewerService ] + providers: [MiradorViewerService], + imports: [ + TranslateModule, + AsyncPipe, + NgIf + ], + standalone: true }) export class MiradorViewerComponent implements OnInit { diff --git a/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.spec.ts b/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.spec.ts index e96e5996fb..0efa7a42f9 100644 --- a/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.spec.ts +++ b/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.spec.ts @@ -123,24 +123,24 @@ describe('OrcidAuthComponent test suite', () => { }); void TestBed.configureTestingModule({ - imports: [ + imports: [ NgbAccordionModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - RouterTestingModule.withRoutes([]) - ], - declarations: [OrcidAuthComponent], - providers: [ + RouterTestingModule.withRoutes([]), + OrcidAuthComponent + ], + providers: [ { provide: NativeWindowService, useFactory: NativeWindowMockFactory }, { provide: NotificationsService, useClass: NotificationsServiceStub }, { provide: OrcidAuthService, useValue: orcidAuthService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrcidAuthComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrcidAuthComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.ts b/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.ts index ea970e7d31..b2d874a7cd 100644 --- a/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.ts +++ b/src/app/item-page/orcid-page/orcid-auth/orcid-auth.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Inject, Input, OnChanges, OnInit, Output, SimpleChanges } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { NativeWindowRef, NativeWindowService } from '../../../core/services/window.service'; @@ -10,11 +10,21 @@ import { RemoteData } from '../../../core/data/remote-data'; import { ResearcherProfile } from '../../../core/profile/model/researcher-profile.model'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service'; +import { AsyncPipe, NgForOf, NgIf } from "@angular/common"; +import { AlertComponent } from "../../../shared/alert/alert.component"; @Component({ selector: 'ds-orcid-auth', templateUrl: './orcid-auth.component.html', - styleUrls: ['./orcid-auth.component.scss'] + styleUrls: ['./orcid-auth.component.scss'], + imports: [ + NgForOf, + TranslateModule, + AsyncPipe, + NgIf, + AlertComponent + ], + standalone: true }) export class OrcidAuthComponent implements OnInit, OnChanges { diff --git a/src/app/item-page/orcid-page/orcid-page.component.html b/src/app/item-page/orcid-page/orcid-page.component.html index 33c3125d67..1eac8b4369 100644 --- a/src/app/item-page/orcid-page/orcid-page.component.html +++ b/src/app/item-page/orcid-page/orcid-page.component.html @@ -10,7 +10,7 @@
- {{'person.page.orcid.link.error.message' | translate}} + {{'person.page.orcid.link.error.message' | translate}}
diff --git a/src/app/item-page/orcid-page/orcid-page.component.spec.ts b/src/app/item-page/orcid-page/orcid-page.component.spec.ts index 1ed237943e..0db026d7f9 100644 --- a/src/app/item-page/orcid-page/orcid-page.component.spec.ts +++ b/src/app/item-page/orcid-page/orcid-page.component.spec.ts @@ -98,26 +98,25 @@ describe('OrcidPageComponent test suite', () => { }); void TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - RouterTestingModule.withRoutes([]) - ], - declarations: [OrcidPageComponent], - providers: [ + RouterTestingModule.withRoutes([]), + OrcidPageComponent + ], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: OrcidAuthService, useValue: orcidAuthService }, { provide: AuthService, useValue: authService }, { provide: ItemDataService, useValue: itemDataService }, { provide: PLATFORM_ID, useValue: 'browser' }, - ], - - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(waitForAsync(() => { diff --git a/src/app/item-page/orcid-page/orcid-page.component.ts b/src/app/item-page/orcid-page/orcid-page.component.ts index f3dbb569d9..da08c02202 100644 --- a/src/app/item-page/orcid-page/orcid-page.component.ts +++ b/src/app/item-page/orcid-page/orcid-page.component.ts @@ -1,6 +1,6 @@ import { Component, Inject, OnInit, PLATFORM_ID } from '@angular/core'; -import { ActivatedRoute, ParamMap, Router } from '@angular/router'; -import { isPlatformBrowser } from '@angular/common'; +import { ActivatedRoute, ParamMap, Router, RouterLink } from '@angular/router'; +import { CommonModule, isPlatformBrowser } from '@angular/common'; import { BehaviorSubject, combineLatest } from 'rxjs'; import { map, take } from 'rxjs/operators'; @@ -15,6 +15,13 @@ import { redirectOn4xx } from '../../core/shared/authorized.operators'; import { ItemDataService } from '../../core/data/item-data.service'; import { isNotEmpty } from '../../shared/empty.util'; import { ResearcherProfile } from '../../core/profile/model/researcher-profile.model'; +import { LoadingComponent } from '../../shared/loading/loading.component'; +import { AlertComponent } from '../../shared/alert/alert.component'; +import { OrcidAuthComponent } from './orcid-auth/orcid-auth.component'; +import { OrcidSyncSettingsComponent } from './orcid-sync-settings/orcid-sync-settings.component'; +import { OrcidQueueComponent } from './orcid-queue/orcid-queue.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { AlertType } from '../../shared/alert/alert-type'; /** * A component that represents the orcid settings page @@ -22,9 +29,21 @@ import { ResearcherProfile } from '../../core/profile/model/researcher-profile.m @Component({ selector: 'ds-orcid-page', templateUrl: './orcid-page.component.html', - styleUrls: ['./orcid-page.component.scss'] + styleUrls: ['./orcid-page.component.scss'], + imports: [ + CommonModule, + LoadingComponent, + AlertComponent, + OrcidAuthComponent, + OrcidSyncSettingsComponent, + OrcidQueueComponent, + TranslateModule, + RouterLink + ], + standalone: true }) export class OrcidPageComponent implements OnInit { + protected readonly AlertType = AlertType; /** * A boolean representing if the connection operation with orcid profile is in progress @@ -150,4 +169,5 @@ export class OrcidPageComponent implements OnInit { const redirectUrl = this.router.url.split('?')[0]; this.router.navigate([redirectUrl]); } + } diff --git a/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.spec.ts b/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.spec.ts index d0f52531d4..5726663389 100644 --- a/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.spec.ts +++ b/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.spec.ts @@ -108,25 +108,25 @@ describe('OrcidQueueComponent test suite', () => { }); void TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - RouterTestingModule.withRoutes([]) - ], - declarations: [OrcidQueueComponent], - providers: [ + RouterTestingModule.withRoutes([]), + OrcidQueueComponent + ], + providers: [ { provide: OrcidAuthService, useValue: orcidAuthService }, { provide: OrcidQueueDataService, useValue: orcidQueueServiceSpy }, { provide: OrcidHistoryDataService, useValue: {} }, { provide: PaginationService, useValue: new PaginationServiceStub() }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); orcidQueueService = TestBed.inject(OrcidQueueDataService); })); diff --git a/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts b/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts index 3e88826952..756fdeb962 100644 --- a/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts +++ b/src/app/item-page/orcid-page/orcid-queue/orcid-queue.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest, Observable, Subscription } from 'rxjs'; import { debounceTime, distinctUntilChanged, switchMap, tap } from 'rxjs/operators'; @@ -18,11 +18,25 @@ import { PaginationComponentOptions } from '../../../shared/pagination/paginatio import { AlertType } from '../../../shared/alert/alert-type'; import { Item } from '../../../core/shared/item.model'; import { OrcidAuthService } from '../../../core/orcid/orcid-auth.service'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { CommonModule } from '@angular/common'; +import { LoadingComponent } from '../../../shared/loading/loading.component'; +import { AlertComponent } from '../../../shared/alert/alert.component'; +import { PaginationComponent } from '../../../shared/pagination/pagination.component'; @Component({ selector: 'ds-orcid-queue', templateUrl: './orcid-queue.component.html', - styleUrls: ['./orcid-queue.component.scss'] + styleUrls: ['./orcid-queue.component.scss'], + imports: [ + CommonModule, + NgbTooltipModule, + TranslateModule, + LoadingComponent, + AlertComponent, + PaginationComponent, + ], + standalone: true }) export class OrcidQueueComponent implements OnInit, OnDestroy { diff --git a/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.html b/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.html index ee9a15268a..19044e5a70 100644 --- a/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.html +++ b/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.html @@ -8,7 +8,7 @@
- + {{ 'person.page.orcid.synchronization-mode-message' | translate}}
@@ -32,7 +32,7 @@
- + {{ 'person.page.orcid.synchronization-mode-publication-message' | translate}}
@@ -55,7 +55,7 @@
- + {{ 'person.page.orcid.synchronization-mode-funding-message' | translate}}
@@ -77,7 +77,7 @@
- + {{ 'person.page.orcid.synchronization-mode-profile-message' | translate}}
diff --git a/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.spec.ts b/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.spec.ts index f2fa9d2440..e3e33de107 100644 --- a/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.spec.ts +++ b/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.spec.ts @@ -134,25 +134,25 @@ describe('OrcidSyncSettingsComponent test suite', () => { }); void TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, NgbAccordionModule, ReactiveFormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - RouterTestingModule.withRoutes([]) - ], - declarations: [OrcidSyncSettingsComponent], - providers: [ + RouterTestingModule.withRoutes([]), + OrcidSyncSettingsComponent + ], + providers: [ { provide: NotificationsService, useClass: NotificationsServiceStub }, { provide: ResearcherProfileDataService, useValue: researcherProfileService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(OrcidSyncSettingsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(OrcidSyncSettingsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.ts b/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.ts index 0bcbc295ac..96654ee423 100644 --- a/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.ts +++ b/src/app/item-page/orcid-page/orcid-sync-settings/orcid-sync-settings.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { FormsModule, UntypedFormGroup } from '@angular/forms'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { Operation } from 'fast-json-patch'; import { of } from 'rxjs'; import { switchMap } from 'rxjs/operators'; @@ -12,13 +12,24 @@ import { Item } from '../../../core/shared/item.model'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { ResearcherProfile } from '../../../core/profile/model/researcher-profile.model'; +import { AlertComponent } from '../../../shared/alert/alert.component'; +import { AlertType } from '../../../shared/alert/alert-type'; +import { NgForOf } from '@angular/common'; @Component({ selector: 'ds-orcid-sync-setting', templateUrl: './orcid-sync-settings.component.html', - styleUrls: ['./orcid-sync-settings.component.scss'] + styleUrls: ['./orcid-sync-settings.component.scss'], + imports: [ + AlertComponent, + FormsModule, + TranslateModule, + NgForOf + ], + standalone: true }) export class OrcidSyncSettingsComponent implements OnInit { + protected readonly AlertType = AlertType; /** * The item for which showing the orcid settings diff --git a/src/app/item-page/simple/abstract-incremental-list/abstract-incremental-list.component.ts b/src/app/item-page/simple/abstract-incremental-list/abstract-incremental-list.component.ts index e788e6e575..8c459ee861 100644 --- a/src/app/item-page/simple/abstract-incremental-list/abstract-incremental-list.component.ts +++ b/src/app/item-page/simple/abstract-incremental-list/abstract-incremental-list.component.ts @@ -3,8 +3,9 @@ import { Subscription } from 'rxjs'; import { hasValue, isNotEmpty } from '../../../shared/empty.util'; @Component({ - selector: 'ds-abstract-incremental-list', - template: ``, + selector: 'ds-abstract-incremental-list', + template: ``, + standalone: true }) /** * An abstract component for displaying an incremental list of objects diff --git a/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts b/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts index 8acf405b55..240d3a9539 100644 --- a/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts +++ b/src/app/item-page/simple/field-components/file-section/file-section.component.spec.ts @@ -58,21 +58,19 @@ describe('FileSectionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), BrowserAnimationsModule], - declarations: [FileSectionComponent, VarDirective, FileSizePipe, MetadataFieldWrapperComponent], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), BrowserAnimationsModule, FileSectionComponent, VarDirective, FileSizePipe, MetadataFieldWrapperComponent], + providers: [ { provide: BitstreamDataService, useValue: bitstreamDataService }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: APP_CONFIG, useValue: environment } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(waitForAsync(() => { diff --git a/src/app/item-page/simple/field-components/file-section/file-section.component.ts b/src/app/item-page/simple/field-components/file-section/file-section.component.ts index 3c41731c5f..1f1d1b6cd2 100644 --- a/src/app/item-page/simple/field-components/file-section/file-section.component.ts +++ b/src/app/item-page/simple/field-components/file-section/file-section.component.ts @@ -8,10 +8,20 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { hasValue } from '../../../../shared/empty.util'; import { PaginatedList } from '../../../../core/data/paginated-list.model'; import { NotificationsService } from '../../../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; -import { AppConfig, APP_CONFIG } from 'src/config/app-config.interface'; +import { APP_CONFIG, AppConfig } from 'src/config/app-config.interface'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { + ThemedFileDownloadLinkComponent +} from '../../../../shared/file-download-link/themed-file-download-link.component'; +import { + MetadataFieldWrapperComponent +} from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { ThemedLoadingComponent } from '../../../../shared/loading/themed-loading.component'; +import { FileSizePipe } from '../../../../shared/utils/file-size-pipe'; +import { VarDirective } from '../../../../shared/utils/var.directive'; +import { CommonModule } from '@angular/common'; /** * This component renders the file section of the item @@ -19,7 +29,17 @@ import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; */ @Component({ selector: 'ds-item-page-file-section', - templateUrl: './file-section.component.html' + templateUrl: './file-section.component.html', + imports: [ + CommonModule, + ThemedFileDownloadLinkComponent, + MetadataFieldWrapperComponent, + ThemedLoadingComponent, + TranslateModule, + FileSizePipe, + VarDirective, + ], + standalone: true }) export class FileSectionComponent implements OnInit { diff --git a/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts b/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts index ba5a9e87c0..80d2ba8ba7 100644 --- a/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts +++ b/src/app/item-page/simple/field-components/file-section/themed-file-section.component.ts @@ -6,6 +6,7 @@ import {Item} from '../../../../core/shared/item.model'; @Component({ selector: 'ds-themed-item-page-file-section', templateUrl: '../../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedFileSectionComponent extends ThemedComponent { diff --git a/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts index 4fb8889440..035c7d1385 100644 --- a/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.spec.ts @@ -16,22 +16,22 @@ let fixture: ComponentFixture; describe('ItemPageAbstractFieldComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), SharedModule, - ], - providers: [ + ItemPageAbstractFieldComponent + ], + providers: [ { provide: APP_CONFIG, useValue: environment }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - declarations: [ItemPageAbstractFieldComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemPageAbstractFieldComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemPageAbstractFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.ts b/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.ts index f29bef31a7..7f9842790e 100644 --- a/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/abstract/item-page-abstract-field.component.ts @@ -2,10 +2,17 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../../../../core/shared/item.model'; import { ItemPageFieldComponent } from '../item-page-field.component'; +import { MetadataValuesComponent } from '../../../../field-components/metadata-values/metadata-values.component'; +import { AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-item-page-abstract-field', - templateUrl: '../item-page-field.component.html' + selector: 'ds-item-page-abstract-field', + templateUrl: '../item-page-field.component.html', + standalone: true, + imports: [ + MetadataValuesComponent, + AsyncPipe + ], }) /** * This component is used for displaying the abstract (dc.description.abstract) of an item diff --git a/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.spec.ts index 855a995142..818dc5811e 100644 --- a/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.spec.ts @@ -19,19 +19,18 @@ const mockValue = 'test value'; describe('ItemPageAuthorFieldComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), ItemPageAuthorFieldComponent, MetadataValuesComponent], + providers: [ { provide: APP_CONFIG, useValue: environment }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - declarations: [ItemPageAuthorFieldComponent, MetadataValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemPageAuthorFieldComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemPageAuthorFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.ts b/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.ts index 2da0dc154b..aad5297f8a 100644 --- a/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/author/item-page-author-field.component.ts @@ -2,10 +2,17 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../../../../core/shared/item.model'; import { ItemPageFieldComponent } from '../item-page-field.component'; +import { MetadataValuesComponent } from '../../../../field-components/metadata-values/metadata-values.component'; +import { AsyncPipe } from '@angular/common'; @Component({ selector: 'ds-item-page-author-field', - templateUrl: '../item-page-field.component.html' + templateUrl: '../item-page-field.component.html', + standalone: true, + imports: [ + MetadataValuesComponent, + AsyncPipe + ], }) /** * This component is used for displaying the author (dc.contributor.author, dc.creator and diff --git a/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.spec.ts index be124dab82..d9db550215 100644 --- a/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.spec.ts @@ -19,19 +19,18 @@ const mockValue = 'test value'; describe('ItemPageDateFieldComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), ItemPageDateFieldComponent, MetadataValuesComponent], + providers: [ { provide: APP_CONFIG, useValue: environment }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - declarations: [ItemPageDateFieldComponent, MetadataValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemPageDateFieldComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemPageDateFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.ts b/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.ts index 5a7d56b7da..d712f409e1 100644 --- a/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/date/item-page-date-field.component.ts @@ -2,10 +2,17 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../../../../core/shared/item.model'; import { ItemPageFieldComponent } from '../item-page-field.component'; +import { MetadataValuesComponent } from '../../../../field-components/metadata-values/metadata-values.component'; +import { AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-item-page-date-field', - templateUrl: '../item-page-field.component.html' + selector: 'ds-item-page-date-field', + templateUrl: '../item-page-field.component.html', + standalone: true, + imports: [ + MetadataValuesComponent, + AsyncPipe + ], }) /** * This component is used for displaying the issue date (dc.date.issued) metadata of an item diff --git a/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.spec.ts index fdf5ac1bb5..fc1f28197e 100644 --- a/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.spec.ts @@ -21,19 +21,18 @@ const mockFields = [mockField]; describe('GenericItemPageFieldComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), GenericItemPageFieldComponent, MetadataValuesComponent], + providers: [ { provide: APP_CONFIG, useValue: environment }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - declarations: [GenericItemPageFieldComponent, MetadataValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(GenericItemPageFieldComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(GenericItemPageFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.ts b/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.ts index 53d2f6aa20..53011978d2 100644 --- a/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/generic/generic-item-page-field.component.ts @@ -2,10 +2,14 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../../../../core/shared/item.model'; import { ItemPageFieldComponent } from '../item-page-field.component'; +import { AsyncPipe } from '@angular/common'; +import { MetadataValuesComponent } from '../../../../field-components/metadata-values/metadata-values.component'; @Component({ - selector: 'ds-generic-item-page-field', - templateUrl: '../item-page-field.component.html' + selector: 'ds-generic-item-page-field', + templateUrl: '../item-page-field.component.html', + standalone: true, + imports: [MetadataValuesComponent, AsyncPipe] }) /** * This component can be used to represent metadata on a simple item page. diff --git a/src/app/item-page/simple/field-components/specific-field/item-page-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/item-page-field.component.spec.ts index 15b7a9df21..e2706be0bd 100644 --- a/src/app/item-page/simple/field-components/specific-field/item-page-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/item-page-field.component.spec.ts @@ -39,23 +39,23 @@ describe('ItemPageFieldComponent', () => { const buildTestEnvironment = async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ RouterTestingModule.withRoutes([]), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), SharedModule, - ], - providers: [ + ItemPageFieldComponent, MetadataValuesComponent + ], + providers: [ { provide: APP_CONFIG, useValue: appConfig }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - declarations: [ItemPageFieldComponent, MetadataValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemPageFieldComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemPageFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); markdownSpy = spyOn(MarkdownPipe.prototype, 'transform'); diff --git a/src/app/item-page/simple/field-components/specific-field/item-page-field.component.ts b/src/app/item-page/simple/field-components/specific-field/item-page-field.component.ts index fc526dabcc..bc6d549710 100644 --- a/src/app/item-page/simple/field-components/specific-field/item-page-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/item-page-field.component.ts @@ -5,6 +5,8 @@ import { Observable } from 'rxjs'; import { BrowseDefinition } from '../../../../core/shared/browse-definition.model'; import { BrowseDefinitionDataService } from '../../../../core/browse/browse-definition-data.service'; import { getRemoteDataPayload } from '../../../../core/shared/operators'; +import { MetadataValuesComponent } from '../../../field-components/metadata-values/metadata-values.component'; +import { AsyncPipe } from '@angular/common'; /** * This component can be used to represent metadata on a simple item page. @@ -13,7 +15,12 @@ import { getRemoteDataPayload } from '../../../../core/shared/operators'; */ @Component({ - templateUrl: './item-page-field.component.html' + templateUrl: './item-page-field.component.html', + imports: [ + MetadataValuesComponent, + AsyncPipe + ], + standalone: true }) export class ItemPageFieldComponent { diff --git a/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.spec.ts index 316e08e564..c4a10398bf 100644 --- a/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.spec.ts @@ -15,15 +15,14 @@ const mockValue = 'test value'; describe('ItemPageTitleFieldComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [ItemPageTitleFieldComponent, MetadataValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemPageTitleFieldComponent, { + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), ItemPageTitleFieldComponent, MetadataValuesComponent], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemPageTitleFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.ts b/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.ts index a8d9e8ad8e..8011570e08 100644 --- a/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/title/item-page-title-field.component.ts @@ -2,10 +2,14 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../../../../core/shared/item.model'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-item-page-title-field', - templateUrl: './item-page-title-field.component.html' + selector: 'ds-item-page-title-field', + templateUrl: './item-page-title-field.component.html', + standalone: true, + imports: [NgIf, TranslateModule] }) /** * This component is used for displaying the title (defined by the {@link DSONameService}) of an item diff --git a/src/app/item-page/simple/field-components/specific-field/title/themed-item-page-field.component.ts b/src/app/item-page/simple/field-components/specific-field/title/themed-item-page-field.component.ts index 7007b8fed3..cd73046310 100644 --- a/src/app/item-page/simple/field-components/specific-field/title/themed-item-page-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/title/themed-item-page-field.component.ts @@ -7,9 +7,10 @@ import { Item } from '../../../../../core/shared/item.model'; * Themed wrapper for {@link ItemPageTitleFieldComponent} */ @Component({ - selector: 'ds-themed-item-page-title-field', - styleUrls: [], - templateUrl: '../../../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-item-page-title-field', + styleUrls: [], + templateUrl: '../../../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedItemPageTitleFieldComponent extends ThemedComponent { diff --git a/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.spec.ts b/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.spec.ts index cc55b76e3e..e9f370e56e 100644 --- a/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.spec.ts +++ b/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.spec.ts @@ -20,19 +20,18 @@ const mockLabel = 'test label'; describe('ItemPageUriFieldComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), ItemPageUriFieldComponent, MetadataUriValuesComponent], + providers: [ { provide: APP_CONFIG, useValue: environment }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - declarations: [ItemPageUriFieldComponent, MetadataUriValuesComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemPageUriFieldComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemPageUriFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.ts b/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.ts index b70cbbd5e8..ff6ea96ed6 100644 --- a/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.ts +++ b/src/app/item-page/simple/field-components/specific-field/uri/item-page-uri-field.component.ts @@ -2,10 +2,17 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../../../../core/shared/item.model'; import { ItemPageFieldComponent } from '../item-page-field.component'; +import { + MetadataUriValuesComponent +} from '../../../../field-components/metadata-uri-values/metadata-uri-values.component'; @Component({ selector: 'ds-item-page-uri-field', - templateUrl: './item-page-uri-field.component.html' + templateUrl: './item-page-uri-field.component.html', + imports: [ + MetadataUriValuesComponent + ], + standalone: true }) /** * This component can be used to represent any uri on a simple item page. diff --git a/src/app/item-page/simple/item-page.component.spec.ts b/src/app/item-page/simple/item-page.component.spec.ts index b3202108f4..90ea41c2ba 100644 --- a/src/app/item-page/simple/item-page.component.spec.ts +++ b/src/app/item-page/simple/item-page.component.spec.ts @@ -95,14 +95,13 @@ describe('ItemPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), BrowserAnimationsModule], - declarations: [ItemPageComponent, VarDirective], - providers: [ + imports: [TranslateModule.forRoot({ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), BrowserAnimationsModule, ItemPageComponent, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: mockRoute }, { provide: ItemDataService, useValue: {} }, { provide: MetadataService, useValue: mockMetadataService }, @@ -113,10 +112,9 @@ describe('ItemPageComponent', () => { { provide: SignpostingDataService, useValue: signpostingDataService }, { provide: LinkHeadService, useValue: linkHeadService }, { provide: PLATFORM_ID, useValue: 'server' }, - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemPageComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemPageComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/item-page.component.ts b/src/app/item-page/simple/item-page.component.ts index b9be6bebfb..a981d6dd04 100644 --- a/src/app/item-page/simple/item-page.component.ts +++ b/src/app/item-page/simple/item-page.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component, Inject, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { isPlatformServer } from '@angular/common'; +import { AsyncPipe, isPlatformServer, NgIf } from '@angular/common'; import { Observable } from 'rxjs'; import { map, take } from 'rxjs/operators'; @@ -21,6 +21,17 @@ import { SignpostingDataService } from '../../core/data/signposting-data.service import { SignpostingLink } from '../../core/data/signposting-links.model'; import { isNotEmpty } from '../../shared/empty.util'; import { LinkDefinition, LinkHeadService } from '../../core/services/link-head.service'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { ThemedItemAlertsComponent } from '../alerts/themed-item-alerts.component'; +import { ItemVersionsNoticeComponent } from '../versions/notice/item-versions-notice.component'; +import { ViewTrackerComponent } from '../../statistics/angulartics/dspace/view-tracker.component'; +import { + ListableObjectComponentLoaderComponent +} from '../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { ItemVersionsComponent } from '../versions/item-versions.component'; +import { ErrorComponent } from '../../shared/error/error.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component renders a simple item page. @@ -32,7 +43,21 @@ import { LinkDefinition, LinkHeadService } from '../../core/services/link-head.s styleUrls: ['./item-page.component.scss'], templateUrl: './item-page.component.html', changeDetection: ChangeDetectionStrategy.OnPush, - animations: [fadeInOut] + animations: [fadeInOut], + standalone: true, + imports: [ + VarDirective, + ThemedItemAlertsComponent, + ItemVersionsNoticeComponent, + ViewTrackerComponent, + ListableObjectComponentLoaderComponent, + ItemVersionsComponent, + ErrorComponent, + ThemedLoadingComponent, + TranslateModule, + AsyncPipe, + NgIf + ] }) export class ItemPageComponent implements OnInit, OnDestroy { diff --git a/src/app/item-page/simple/item-types/publication/publication.component.spec.ts b/src/app/item-page/simple/item-types/publication/publication.component.spec.ts index 211ec102bc..ecf80633e9 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.spec.ts +++ b/src/app/item-page/simple/item-types/publication/publication.component.spec.ts @@ -62,17 +62,17 @@ describe('PublicationComponent', () => { } }; TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), RouterTestingModule, - ], - declarations: [PublicationComponent, GenericItemPageFieldComponent, TruncatePipe], - providers: [ + PublicationComponent, GenericItemPageFieldComponent, TruncatePipe + ], + providers: [ { provide: ItemDataService, useValue: {} }, { provide: TruncatableService, useValue: {} }, { provide: RelationshipDataService, useValue: {} }, @@ -93,10 +93,9 @@ describe('PublicationComponent', () => { { provide: SearchService, useValue: {} }, { provide: RouteService, useValue: mockRouteService }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub }, - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PublicationComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PublicationComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }); })); diff --git a/src/app/item-page/simple/item-types/publication/publication.component.ts b/src/app/item-page/simple/item-types/publication/publication.component.ts index bd0d371183..0c2c10540d 100644 --- a/src/app/item-page/simple/item-types/publication/publication.component.ts +++ b/src/app/item-page/simple/item-types/publication/publication.component.ts @@ -1,7 +1,39 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ViewMode } from '../../../../core/shared/view-mode.model'; -import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; +import { + listableObjectComponent +} from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../shared/item.component'; +import { + ThemedResultsBackButtonComponent +} from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { MiradorViewerComponent } from '../../../mirador-viewer/mirador-viewer.component'; +import { + ThemedItemPageTitleFieldComponent +} from '../../field-components/specific-field/title/themed-item-page-field.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { + MetadataFieldWrapperComponent +} from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { ThemedMediaViewerComponent } from '../../../media-viewer/themed-media-viewer.component'; +import { ThemedFileSectionComponent } from '../../field-components/file-section/themed-file-section.component'; +import { ItemPageDateFieldComponent } from '../../field-components/specific-field/date/item-page-date-field.component'; +import { + ThemedMetadataRepresentationListComponent +} from '../../metadata-representation-list/themed-metadata-representation-list.component'; +import { + GenericItemPageFieldComponent +} from '../../field-components/specific-field/generic/generic-item-page-field.component'; +import { RelatedItemsComponent } from '../../related-items/related-items-component'; +import { + ItemPageAbstractFieldComponent +} from '../../field-components/specific-field/abstract/item-page-abstract-field.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ItemPageUriFieldComponent } from '../../field-components/specific-field/uri/item-page-uri-field.component'; +import { CollectionsComponent } from '../../../field-components/collections/collections.component'; +import { RouterLink } from '@angular/router'; +import { CommonModule } from '@angular/common'; /** * Component that represents a publication Item page @@ -13,6 +45,27 @@ import { ItemComponent } from '../shared/item.component'; styleUrls: ['./publication.component.scss'], templateUrl: './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 + ] }) export class PublicationComponent extends ItemComponent { diff --git a/src/app/item-page/simple/item-types/shared/item.component.spec.ts b/src/app/item-page/simple/item-types/shared/item.component.spec.ts index 5bf08fc004..8b2f104eee 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.spec.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.spec.ts @@ -100,43 +100,42 @@ export function getItemPageFieldsTest(mockItem: Item, component) { }); TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot({ - loader: { + imports: [ + TranslateModule.forRoot({ + loader: { provide: TranslateLoader, useClass: TranslateLoaderMock - } - }), - RouterTestingModule, - ], - declarations: [component, GenericItemPageFieldComponent, TruncatePipe], - providers: [ - { provide: ItemDataService, useValue: {} }, - { provide: TruncatableService, useValue: {} }, - { provide: RelationshipDataService, useValue: {} }, - { provide: ObjectCacheService, useValue: {} }, - { provide: UUIDService, useValue: {} }, - { provide: Store, useValue: {} }, - { provide: RemoteDataBuildService, useValue: {} }, - { provide: CommunityDataService, useValue: {} }, - { provide: HALEndpointService, useValue: {} }, - { provide: HttpClient, useValue: {} }, - { provide: DSOChangeAnalyzer, useValue: {} }, - { provide: VersionHistoryDataService, useValue: {} }, - { provide: VersionDataService, useValue: {} }, - { provide: NotificationsService, useValue: {} }, - { provide: DefaultChangeAnalyzer, useValue: {} }, - { provide: BitstreamDataService, useValue: mockBitstreamDataService }, - { provide: WorkspaceitemDataService, useValue: {} }, - { provide: SearchService, useValue: {} }, - { provide: RouteService, useValue: mockRouteService }, - { provide: AuthorizationDataService, useValue: authorizationService }, - { provide: ResearcherProfileDataService, useValue: {} }, - { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub }, - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(component, { + } + }), + RouterTestingModule, + component, GenericItemPageFieldComponent, TruncatePipe + ], + providers: [ + { provide: ItemDataService, useValue: {} }, + { provide: TruncatableService, useValue: {} }, + { provide: RelationshipDataService, useValue: {} }, + { provide: ObjectCacheService, useValue: {} }, + { provide: UUIDService, useValue: {} }, + { provide: Store, useValue: {} }, + { provide: RemoteDataBuildService, useValue: {} }, + { provide: CommunityDataService, useValue: {} }, + { provide: HALEndpointService, useValue: {} }, + { provide: HttpClient, useValue: {} }, + { provide: DSOChangeAnalyzer, useValue: {} }, + { provide: VersionHistoryDataService, useValue: {} }, + { provide: VersionDataService, useValue: {} }, + { provide: NotificationsService, useValue: {} }, + { provide: DefaultChangeAnalyzer, useValue: {} }, + { provide: BitstreamDataService, useValue: mockBitstreamDataService }, + { provide: WorkspaceitemDataService, useValue: {} }, + { provide: SearchService, useValue: {} }, + { provide: RouteService, useValue: mockRouteService }, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: ResearcherProfileDataService, useValue: {} }, + { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub }, + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(component, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -420,41 +419,41 @@ describe('ItemComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot({ + imports: [ + TranslateModule.forRoot({ loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock + provide: TranslateLoader, + useClass: TranslateLoaderMock } - }), - RouterTestingModule, - ], - declarations: [ItemComponent, GenericItemPageFieldComponent, TruncatePipe ], - providers: [ - { provide: ItemDataService, useValue: {} }, - { provide: TruncatableService, useValue: {} }, - { provide: RelationshipDataService, useValue: {} }, - { provide: ObjectCacheService, useValue: {} }, - { provide: UUIDService, useValue: {} }, - { provide: Store, useValue: {} }, - { provide: RemoteDataBuildService, useValue: {} }, - { provide: CommunityDataService, useValue: {} }, - { provide: HALEndpointService, useValue: {} }, - { provide: HttpClient, useValue: {} }, - { provide: DSOChangeAnalyzer, useValue: {} }, - { provide: VersionHistoryDataService, useValue: {} }, - { provide: VersionDataService, useValue: {} }, - { provide: NotificationsService, useValue: {} }, - { provide: DefaultChangeAnalyzer, useValue: {} }, - { provide: BitstreamDataService, useValue: {} }, - { provide: WorkspaceitemDataService, useValue: {} }, - { provide: SearchService, useValue: {} }, - { provide: RouteService, useValue: mockRouteService }, - { provide: AuthorizationDataService, useValue: {} }, - { provide: ResearcherProfileDataService, useValue: {} }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemComponent, { + }), + RouterTestingModule, + ItemComponent, GenericItemPageFieldComponent, TruncatePipe + ], + providers: [ + { provide: ItemDataService, useValue: {} }, + { provide: TruncatableService, useValue: {} }, + { provide: RelationshipDataService, useValue: {} }, + { provide: ObjectCacheService, useValue: {} }, + { provide: UUIDService, useValue: {} }, + { provide: Store, useValue: {} }, + { provide: RemoteDataBuildService, useValue: {} }, + { provide: CommunityDataService, useValue: {} }, + { provide: HALEndpointService, useValue: {} }, + { provide: HttpClient, useValue: {} }, + { provide: DSOChangeAnalyzer, useValue: {} }, + { provide: VersionHistoryDataService, useValue: {} }, + { provide: VersionDataService, useValue: {} }, + { provide: NotificationsService, useValue: {} }, + { provide: DefaultChangeAnalyzer, useValue: {} }, + { provide: BitstreamDataService, useValue: {} }, + { provide: WorkspaceitemDataService, useValue: {} }, + { provide: SearchService, useValue: {} }, + { provide: RouteService, useValue: mockRouteService }, + { provide: AuthorizationDataService, useValue: {} }, + { provide: ResearcherProfileDataService, useValue: {} }, + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }); })); diff --git a/src/app/item-page/simple/item-types/shared/item.component.ts b/src/app/item-page/simple/item-types/shared/item.component.ts index 93e6a0b346..543b92c35e 100644 --- a/src/app/item-page/simple/item-types/shared/item.component.ts +++ b/src/app/item-page/simple/item-types/shared/item.component.ts @@ -9,8 +9,9 @@ import { filter, map, take } from 'rxjs/operators'; import { Router } from '@angular/router'; @Component({ - selector: 'ds-item', - template: '' + selector: 'ds-item', + template: '', + standalone: true }) /** * A generic component for displaying metadata and relations of an item diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts index 4b7da40abe..bc1ae67786 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.spec.ts @@ -63,17 +63,17 @@ describe('UntypedItemComponent', () => { } }; TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), RouterTestingModule, - ], - declarations: [UntypedItemComponent, GenericItemPageFieldComponent, TruncatePipe ], - providers: [ + UntypedItemComponent, GenericItemPageFieldComponent, TruncatePipe + ], + providers: [ { provide: ItemDataService, useValue: {} }, { provide: TruncatableService, useValue: {} }, { provide: RelationshipDataService, useValue: {} }, @@ -96,9 +96,9 @@ describe('UntypedItemComponent', () => { { provide: ItemVersionsSharedService, useValue: {} }, { provide: RouteService, useValue: mockRouteService }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(UntypedItemComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(UntypedItemComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }); })); diff --git a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts index ead62008de..5da5734c7c 100644 --- a/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts +++ b/src/app/item-page/simple/item-types/untyped-item/untyped-item.component.ts @@ -1,8 +1,39 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { Item } from '../../../../core/shared/item.model'; import { ViewMode } from '../../../../core/shared/view-mode.model'; -import { listableObjectComponent } from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; +import { + listableObjectComponent +} from '../../../../shared/object-collection/shared/listable-object/listable-object.decorator'; import { ItemComponent } from '../shared/item.component'; +import { + ThemedItemPageTitleFieldComponent +} from '../../field-components/specific-field/title/themed-item-page-field.component'; +import { DsoEditMenuComponent } from '../../../../shared/dso-page/dso-edit-menu/dso-edit-menu.component'; +import { + MetadataFieldWrapperComponent +} from '../../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { ThemedMediaViewerComponent } from '../../../media-viewer/themed-media-viewer.component'; +import { ThemedFileSectionComponent } from '../../field-components/file-section/themed-file-section.component'; +import { ItemPageDateFieldComponent } from '../../field-components/specific-field/date/item-page-date-field.component'; +import { + ThemedMetadataRepresentationListComponent +} from '../../metadata-representation-list/themed-metadata-representation-list.component'; +import { + GenericItemPageFieldComponent +} from '../../field-components/specific-field/generic/generic-item-page-field.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { MiradorViewerComponent } from '../../../mirador-viewer/mirador-viewer.component'; +import { + ThemedResultsBackButtonComponent +} from '../../../../shared/results-back-button/themed-results-back-button.component'; +import { CollectionsComponent } from '../../../field-components/collections/collections.component'; +import { RouterLink } from '@angular/router'; +import { ItemPageUriFieldComponent } from '../../field-components/specific-field/uri/item-page-uri-field.component'; +import { CommonModule } from '@angular/common'; +import { + ItemPageAbstractFieldComponent +} from '../../field-components/specific-field/abstract/item-page-abstract-field.component'; /** * Component that represents a publication Item page @@ -14,6 +45,26 @@ import { ItemComponent } from '../shared/item.component'; styleUrls: ['./untyped-item.component.scss'], templateUrl: './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 + ] }) export class UntypedItemComponent extends ItemComponent { diff --git a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.spec.ts b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.spec.ts index 180eaaa2be..bc9b4bfbbd 100644 --- a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.spec.ts +++ b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.spec.ts @@ -103,14 +103,13 @@ describe('MetadataRepresentationListComponent', () => { }; TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [MetadataRepresentationListComponent, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), MetadataRepresentationListComponent, VarDirective], + providers: [ { provide: RelationshipDataService, useValue: relationshipService }, { provide: BrowseDefinitionDataService, useValue: BrowseDefinitionDataServiceStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MetadataRepresentationListComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MetadataRepresentationListComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts index 59a5377f77..cf06f59d0f 100644 --- a/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts +++ b/src/app/item-page/simple/metadata-representation-list/metadata-representation-list.component.ts @@ -15,10 +15,18 @@ import { } from '../../../core/shared/metadata-representation/metadatum/metadatum-representation.model'; import { BrowseService } from '../../../core/browse/browse.service'; import { BrowseDefinitionDataService } from '../../../core/browse/browse-definition-data.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component'; +import { MetadataRepresentationLoaderComponent } from '../../../shared/metadata-representation/metadata-representation-loader.component'; +import { VarDirective } from '../../../shared/utils/var.directive'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { MetadataFieldWrapperComponent } from '../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; @Component({ - selector: 'ds-metadata-representation-list', - templateUrl: './metadata-representation-list.component.html' + selector: 'ds-metadata-representation-list', + templateUrl: './metadata-representation-list.component.html', + standalone: true, + imports: [MetadataFieldWrapperComponent, NgFor, VarDirective, MetadataRepresentationLoaderComponent, NgIf, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) /** * This component is used for displaying metadata diff --git a/src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts b/src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts index a290b82dd9..8f1fd9e900 100644 --- a/src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts +++ b/src/app/item-page/simple/metadata-representation-list/themed-metadata-representation-list.component.ts @@ -4,9 +4,10 @@ import { Component, Input } from '@angular/core'; import { Item } from '../../../core/shared/item.model'; @Component({ - selector: 'ds-themed-metadata-representation-list', - styleUrls: [], - templateUrl: '../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-metadata-representation-list', + styleUrls: [], + templateUrl: '../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedMetadataRepresentationListComponent extends ThemedComponent { protected inAndOutputNames: (keyof MetadataRepresentationListComponent & keyof this)[] = ['parentItem', 'itemType', 'metadataFields', 'label', 'incrementBy']; diff --git a/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts b/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts index a9fd11b9ee..142e1b9988 100644 --- a/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts +++ b/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts @@ -19,10 +19,9 @@ describe('RelatedEntitiesSearchComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], - declarations: [RelatedEntitiesSearchComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, RelatedEntitiesSearchComponent], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts b/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts index a3f76c12d7..f5faf6b985 100644 --- a/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts +++ b/src/app/item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts @@ -2,10 +2,13 @@ import { Component, Input, OnInit } from '@angular/core'; import { Item } from '../../../../core/shared/item.model'; import { isNotEmpty } from '../../../../shared/empty.util'; import { getFilterByRelation } from '../../../../shared/utils/relation-query.utils'; +import { ConfigurationSearchPageComponent } from '../../../../search-page/configuration-search-page.component'; @Component({ - selector: 'ds-related-entities-search', - templateUrl: './related-entities-search.component.html' + selector: 'ds-related-entities-search', + templateUrl: './related-entities-search.component.html', + standalone: true, + imports: [ConfigurationSearchPageComponent] }) /** * A component to show related items as search results. diff --git a/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.spec.ts b/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.spec.ts index f7b9fb68e8..22348b8562 100644 --- a/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.spec.ts +++ b/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.spec.ts @@ -29,19 +29,18 @@ describe('TabbedRelatedEntitiesSearchComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, NgbModule], - declarations: [TabbedRelatedEntitiesSearchComponent, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, NgbModule, TabbedRelatedEntitiesSearchComponent, VarDirective], + providers: [ { - provide: ActivatedRoute, - useValue: { - queryParams: observableOf({ tab: mockRelationType }) - }, + provide: ActivatedRoute, + useValue: { + queryParams: observableOf({ tab: mockRelationType }) + }, }, { provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts b/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts index 116c8c2d79..515e89f706 100644 --- a/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts +++ b/src/app/item-page/simple/related-entities/tabbed-related-entities-search/tabbed-related-entities-search.component.ts @@ -3,10 +3,17 @@ import { Item } from '../../../../core/shared/item.model'; import { ActivatedRoute, Router } from '@angular/router'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; +import { TranslateModule } from '@ngx-translate/core'; +import { VarDirective } from '../../../../shared/utils/var.directive'; +import { RelatedEntitiesSearchComponent } from '../related-entities-search/related-entities-search.component'; +import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-tabbed-related-entities-search', - templateUrl: './tabbed-related-entities-search.component.html' + selector: 'ds-tabbed-related-entities-search', + templateUrl: './tabbed-related-entities-search.component.html', + standalone: true, + imports: [NgIf, NgbNavModule, NgFor, RelatedEntitiesSearchComponent, VarDirective, AsyncPipe, TranslateModule] }) /** * A component to show related items as search results, split into tabs by relationship-type diff --git a/src/app/item-page/simple/related-items/related-items-component.ts b/src/app/item-page/simple/related-items/related-items-component.ts index 2746670abe..9b704de9ff 100644 --- a/src/app/item-page/simple/related-items/related-items-component.ts +++ b/src/app/item-page/simple/related-items/related-items-component.ts @@ -9,12 +9,19 @@ import { AbstractIncrementalListComponent } from '../abstract-incremental-list/a import { FindListOptions } from '../../../core/data/find-list-options.model'; import { setPlaceHolderAttributes } from '../../../shared/utils/object-list-utils'; import { APP_CONFIG, AppConfig } from '../../../../config/app-config.interface'; -import { isPlatformBrowser } from '@angular/common'; +import { isPlatformBrowser, NgClass, NgFor, NgIf, AsyncPipe } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component'; +import { ListableObjectComponentLoaderComponent } from '../../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { VarDirective } from '../../../shared/utils/var.directive'; +import { MetadataFieldWrapperComponent } from '../../../shared/metadata-field-wrapper/metadata-field-wrapper.component'; @Component({ - selector: 'ds-related-items', - styleUrls: ['./related-items.component.scss'], - templateUrl: './related-items.component.html' + selector: 'ds-related-items', + styleUrls: ['./related-items.component.scss'], + templateUrl: './related-items.component.html', + standalone: true, + imports: [MetadataFieldWrapperComponent, NgClass, NgFor, VarDirective, ListableObjectComponentLoaderComponent, NgIf, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) /** * This component is used for displaying relations between items diff --git a/src/app/item-page/simple/related-items/related-items.component.spec.ts b/src/app/item-page/simple/related-items/related-items.component.spec.ts index 4307c1aaa2..50b57a780c 100644 --- a/src/app/item-page/simple/related-items/related-items.component.spec.ts +++ b/src/app/item-page/simple/related-items/related-items.component.spec.ts @@ -55,14 +55,13 @@ describe('RelatedItemsComponent', () => { ); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [RelatedItemsComponent, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), RelatedItemsComponent, VarDirective], + providers: [ { provide: RelationshipDataService, useValue: relationshipService }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(RelatedItemsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(RelatedItemsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -128,14 +127,13 @@ describe('RelatedItemsComponent', () => { ); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [RelatedItemsComponent, VarDirective], - providers: [ - {provide: RelationshipDataService, useValue: relationshipService}, - {provide: APP_CONFIG, useValue: enviromentNoThumbs} - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(RelatedItemsComponent, { + imports: [TranslateModule.forRoot(), RelatedItemsComponent, VarDirective], + providers: [ + { provide: RelationshipDataService, useValue: relationshipService }, + { provide: APP_CONFIG, useValue: enviromentNoThumbs } + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(RelatedItemsComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/item-page/simple/themed-item-page.component.ts b/src/app/item-page/simple/themed-item-page.component.ts index 5bb26fafc9..e28de90a20 100644 --- a/src/app/item-page/simple/themed-item-page.component.ts +++ b/src/app/item-page/simple/themed-item-page.component.ts @@ -6,9 +6,10 @@ import { ItemPageComponent } from './item-page.component'; * Themed wrapper for ItemPageComponent */ @Component({ - selector: 'ds-themed-item-page', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html', + selector: 'ds-themed-item-page', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedItemPageComponent extends ThemedComponent { diff --git a/src/app/item-page/version-page/version-page/version-page.component.spec.ts b/src/app/item-page/version-page/version-page/version-page.component.spec.ts index b1dd8bc161..c38de272a2 100644 --- a/src/app/item-page/version-page/version-page/version-page.component.spec.ts +++ b/src/app/item-page/version-page/version-page/version-page.component.spec.ts @@ -25,7 +25,10 @@ const mockVersion: Version = Object.assign(new Version(), { version: 1, }); -@Component({ template: '' }) +@Component({ + template: '', + standalone: true +}) class DummyComponent { } @@ -44,14 +47,13 @@ describe('VersionPageComponent', () => { setRedirectUrl: {} }); TestBed.configureTestingModule({ - declarations: [VersionPageComponent, DummyComponent], - imports: [RouterTestingModule.withRoutes([{ path: 'items/item-uuid', component: DummyComponent, pathMatch: 'full' }])], - providers: [ + imports: [RouterTestingModule.withRoutes([{ path: 'items/item-uuid', component: DummyComponent, pathMatch: 'full' }]), VersionPageComponent, DummyComponent], + providers: [ { provide: ActivatedRoute, useValue: mockRoute }, { provide: VersionDataService, useValue: {} }, { provide: AuthService, useValue: authService }, - ], - }).compileComponents(); + ] +}).compileComponents(); })); diff --git a/src/app/item-page/version-page/version-page/version-page.component.ts b/src/app/item-page/version-page/version-page/version-page.component.ts index 7f25034351..ae11f8adf0 100644 --- a/src/app/item-page/version-page/version-page/version-page.component.ts +++ b/src/app/item-page/version-page/version-page/version-page.component.ts @@ -13,9 +13,10 @@ import { getPageNotFoundRoute } from '../../../app-routing-paths'; import { redirectOn4xx } from '../../../core/shared/authorized.operators'; @Component({ - selector: 'ds-version-page', - templateUrl: './version-page.component.html', - styleUrls: ['./version-page.component.scss'] + selector: 'ds-version-page', + templateUrl: './version-page.component.html', + styleUrls: ['./version-page.component.scss'], + standalone: true }) export class VersionPageComponent implements OnInit { diff --git a/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.spec.ts b/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.spec.ts index 8a0d4a58d9..6319949be2 100644 --- a/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.spec.ts +++ b/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.spec.ts @@ -11,12 +11,11 @@ describe('ItemVersionsDeleteModalComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ItemVersionsDeleteModalComponent], - imports: [ TranslateModule.forRoot(), RouterTestingModule.withRoutes([]) ], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ItemVersionsDeleteModalComponent], + providers: [ { provide: NgbActiveModal }, - ] - }).compileComponents(); + ] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.ts b/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.ts index 3aa1bbd49f..fc64da2f2b 100644 --- a/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.ts +++ b/src/app/item-page/versions/item-versions-delete-modal/item-versions-delete-modal.component.ts @@ -1,10 +1,13 @@ import { Component, EventEmitter, Output } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-item-versions-delete-modal', - templateUrl: './item-versions-delete-modal.component.html', - styleUrls: ['./item-versions-delete-modal.component.scss'] + selector: 'ds-item-versions-delete-modal', + templateUrl: './item-versions-delete-modal.component.html', + styleUrls: ['./item-versions-delete-modal.component.scss'], + standalone: true, + imports: [TranslateModule] }) export class ItemVersionsDeleteModalComponent { /** diff --git a/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.spec.ts b/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.spec.ts index 657e8c0e75..eb1abbbc94 100644 --- a/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.spec.ts +++ b/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.spec.ts @@ -11,12 +11,11 @@ describe('ItemVersionsSummaryModalComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ ItemVersionsSummaryModalComponent ], - imports: [ TranslateModule.forRoot(), RouterTestingModule.withRoutes([]) ], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ItemVersionsSummaryModalComponent], + providers: [ { provide: NgbActiveModal }, - ] - }).compileComponents(); + ] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.ts b/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.ts index 8f2c7bd62e..4ac459cb94 100644 --- a/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.ts +++ b/src/app/item-page/versions/item-versions-summary-modal/item-versions-summary-modal.component.ts @@ -2,11 +2,17 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { BehaviorSubject } from 'rxjs'; import { ModalBeforeDismiss } from '../../../shared/interfaces/modal-before-dismiss.interface'; +import { TranslateModule } from '@ngx-translate/core'; +import { LoadingComponent } from '../../../shared/loading/loading.component'; +import { FormsModule } from '@angular/forms'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-item-versions-summary-modal', - templateUrl: './item-versions-summary-modal.component.html', - styleUrls: ['./item-versions-summary-modal.component.scss'] + selector: 'ds-item-versions-summary-modal', + templateUrl: './item-versions-summary-modal.component.html', + styleUrls: ['./item-versions-summary-modal.component.scss'], + standalone: true, + imports: [NgIf, FormsModule, LoadingComponent, AsyncPipe, TranslateModule] }) export class ItemVersionsSummaryModalComponent implements OnInit, ModalBeforeDismiss { diff --git a/src/app/item-page/versions/item-versions.component.spec.ts b/src/app/item-page/versions/item-versions.component.spec.ts index e46f1585d7..dc929d6d80 100644 --- a/src/app/item-page/versions/item-versions.component.spec.ts +++ b/src/app/item-page/versions/item-versions.component.spec.ts @@ -136,24 +136,23 @@ describe('ItemVersionsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ItemVersionsComponent, VarDirective], - imports: [TranslateModule.forRoot(), CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, ItemSharedModule], - providers: [ - {provide: PaginationService, useValue: new PaginationServiceStub()}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: new NotificationsServiceStub()}, - {provide: AuthService, useValue: authenticationServiceSpy}, - {provide: AuthorizationDataService, useValue: authorizationServiceSpy}, - {provide: VersionHistoryDataService, useValue: versionHistoryServiceSpy}, - {provide: ItemDataService, useValue: itemDataServiceSpy}, - {provide: VersionDataService, useValue: versionServiceSpy}, - {provide: WorkspaceitemDataService, useValue: workspaceItemDataServiceSpy}, - {provide: WorkflowItemDataService, useValue: workflowItemDataServiceSpy}, - {provide: ConfigurationDataService, useValue: configurationServiceSpy}, + imports: [TranslateModule.forRoot(), CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, ItemSharedModule, ItemVersionsComponent, VarDirective], + providers: [ + { provide: PaginationService, useValue: new PaginationServiceStub() }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: new NotificationsServiceStub() }, + { provide: AuthService, useValue: authenticationServiceSpy }, + { provide: AuthorizationDataService, useValue: authorizationServiceSpy }, + { provide: VersionHistoryDataService, useValue: versionHistoryServiceSpy }, + { provide: ItemDataService, useValue: itemDataServiceSpy }, + { provide: VersionDataService, useValue: versionServiceSpy }, + { provide: WorkspaceitemDataService, useValue: workspaceItemDataServiceSpy }, + { provide: WorkflowItemDataService, useValue: workflowItemDataServiceSpy }, + { provide: ConfigurationDataService, useValue: configurationServiceSpy }, { provide: Router, useValue: routerSpy }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); versionHistoryService = TestBed.inject(VersionHistoryDataService); authenticationService = TestBed.inject(AuthService); diff --git a/src/app/item-page/versions/item-versions.component.ts b/src/app/item-page/versions/item-versions.component.ts index e7ee9d5ea2..8d34f03d9f 100644 --- a/src/app/item-page/versions/item-versions.component.ts +++ b/src/app/item-page/versions/item-versions.component.ts @@ -32,15 +32,15 @@ import { getItemPageRoute, getItemVersionRoute } from '../item-page-routing-paths'; -import { UntypedFormBuilder } from '@angular/forms'; +import { UntypedFormBuilder, FormsModule } from '@angular/forms'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { ItemVersionsSummaryModalComponent } from './item-versions-summary-modal/item-versions-summary-modal.component'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { ItemVersionsDeleteModalComponent } from './item-versions-delete-modal/item-versions-delete-modal.component'; import { VersionDataService } from '../../core/data/version-data.service'; import { ItemDataService } from '../../core/data/item-data.service'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service'; import { FeatureID } from '../../core/data/feature-authorization/feature-id'; import { ItemVersionsSharedService } from './item-versions-shared.service'; @@ -48,11 +48,17 @@ import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model' import { WorkspaceitemDataService } from '../../core/submission/workspaceitem-data.service'; import { WorkflowItemDataService } from '../../core/submission/workflowitem-data.service'; import { ConfigurationDataService } from '../../core/data/configuration-data.service'; +import { PaginationComponent } from '../../shared/pagination/pagination.component'; +import { AlertComponent } from '../../shared/alert/alert.component'; +import { NgIf, NgFor, NgClass, AsyncPipe, DatePipe } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; @Component({ - selector: 'ds-item-versions', - templateUrl: './item-versions.component.html', - styleUrls: ['./item-versions.component.scss'] + selector: 'ds-item-versions', + templateUrl: './item-versions.component.html', + styleUrls: ['./item-versions.component.scss'], + standalone: true, + imports: [VarDirective, NgIf, AlertComponent, PaginationComponent, NgFor, RouterLink, NgClass, FormsModule, AsyncPipe, DatePipe, TranslateModule] }) /** diff --git a/src/app/item-page/versions/item-versions.module.ts b/src/app/item-page/versions/item-versions.module.ts index 577844488d..a6a70a4fc6 100644 --- a/src/app/item-page/versions/item-versions.module.ts +++ b/src/app/item-page/versions/item-versions.module.ts @@ -17,15 +17,13 @@ const DECLARATIONS = [ ]; @NgModule({ - imports: [ - SharedModule, - ], - declarations: [ - ...DECLARATIONS, - ], - exports: [ - ...DECLARATIONS, - ], + imports: [ + SharedModule, + ...DECLARATIONS + ], + exports: [ + ...DECLARATIONS, + ] }) export class ItemVersionsModule { diff --git a/src/app/item-page/versions/notice/item-versions-notice.component.spec.ts b/src/app/item-page/versions/notice/item-versions-notice.component.spec.ts index fb29e54a21..787244a47c 100644 --- a/src/app/item-page/versions/notice/item-versions-notice.component.spec.ts +++ b/src/app/item-page/versions/notice/item-versions-notice.component.spec.ts @@ -59,13 +59,12 @@ describe('ItemVersionsNoticeComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ItemVersionsNoticeComponent], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ItemVersionsNoticeComponent], + providers: [ { provide: VersionHistoryDataService, useValue: versionHistoryServiceSpy } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); versionHistoryService = TestBed.inject(VersionHistoryDataService); diff --git a/src/app/item-page/versions/notice/item-versions-notice.component.ts b/src/app/item-page/versions/notice/item-versions-notice.component.ts index 0e5e45806b..9f34c15752 100644 --- a/src/app/item-page/versions/notice/item-versions-notice.component.ts +++ b/src/app/item-page/versions/notice/item-versions-notice.component.ts @@ -14,10 +14,15 @@ import { map, startWith, switchMap } from 'rxjs/operators'; import { VersionHistoryDataService } from '../../../core/data/version-history-data.service'; import { AlertType } from '../../../shared/alert/alert-type'; import { getItemPageRoute } from '../../item-page-routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { AlertComponent } from '../../../shared/alert/alert.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-item-versions-notice', - templateUrl: './item-versions-notice.component.html' + selector: 'ds-item-versions-notice', + templateUrl: './item-versions-notice.component.html', + standalone: true, + imports: [NgIf, AlertComponent, AsyncPipe, TranslateModule] }) /** * Component for displaying a warning notice when the item is not the latest version within its version history diff --git a/src/app/login-page/login-page.component.spec.ts b/src/app/login-page/login-page.component.spec.ts index baaa3430ac..c02a5d3032 100644 --- a/src/app/login-page/login-page.component.spec.ts +++ b/src/app/login-page/login-page.component.spec.ts @@ -25,16 +25,16 @@ describe('LoginPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [LoginPageComponent], - providers: [ + imports: [ + TranslateModule.forRoot(), + LoginPageComponent + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Store, useValue: store } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/login-page/login-page.component.ts b/src/app/login-page/login-page.component.ts index f618f5329e..656ff2cd79 100644 --- a/src/app/login-page/login-page.component.ts +++ b/src/app/login-page/login-page.component.ts @@ -15,14 +15,18 @@ import { import { hasValue, isNotEmpty } from '../shared/empty.util'; import { AuthTokenInfo } from '../core/auth/models/auth-token-info.model'; import { isAuthenticated } from '../core/auth/selectors'; +import { TranslateModule } from '@ngx-translate/core'; +import { LogInComponent } from '../shared/log-in/log-in.component'; /** * This component represents the login page */ @Component({ - selector: 'ds-login-page', - styleUrls: ['./login-page.component.scss'], - templateUrl: './login-page.component.html' + selector: 'ds-login-page', + styleUrls: ['./login-page.component.scss'], + templateUrl: './login-page.component.html', + standalone: true, + imports: [LogInComponent, TranslateModule] }) export class LoginPageComponent implements OnDestroy, OnInit { diff --git a/src/app/login-page/login-page.module.ts b/src/app/login-page/login-page.module.ts index 4facc82df1..58f4ee6108 100644 --- a/src/app/login-page/login-page.module.ts +++ b/src/app/login-page/login-page.module.ts @@ -6,15 +6,13 @@ import { LoginPageRoutingModule } from './login-page-routing.module'; import { ThemedLoginPageComponent } from './themed-login-page.component'; @NgModule({ - imports: [ - LoginPageRoutingModule, - CommonModule, - SharedModule, - ], - declarations: [ - LoginPageComponent, - ThemedLoginPageComponent - ] + imports: [ + LoginPageRoutingModule, + CommonModule, + SharedModule, + LoginPageComponent, + ThemedLoginPageComponent + ] }) export class LoginPageModule { diff --git a/src/app/login-page/themed-login-page.component.ts b/src/app/login-page/themed-login-page.component.ts index e314b4a3f7..04badb1cf2 100644 --- a/src/app/login-page/themed-login-page.component.ts +++ b/src/app/login-page/themed-login-page.component.ts @@ -6,9 +6,10 @@ import { LoginPageComponent } from './login-page.component'; * Themed wrapper for LoginPageComponent */ @Component({ - selector: 'ds-themed-login-page', - styleUrls: [], - templateUrl: './../shared/theme-support/themed.component.html' + selector: 'ds-themed-login-page', + styleUrls: [], + templateUrl: './../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedLoginPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/logout-page/logout-page.component.spec.ts b/src/app/logout-page/logout-page.component.spec.ts index 327e64b756..1121f44ac1 100644 --- a/src/app/logout-page/logout-page.component.spec.ts +++ b/src/app/logout-page/logout-page.component.spec.ts @@ -10,12 +10,12 @@ describe('LogoutPageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [LogoutPageComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [ + TranslateModule.forRoot(), + LogoutPageComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/logout-page/logout-page.component.ts b/src/app/logout-page/logout-page.component.ts index 4fa4b9900a..bdf7159345 100644 --- a/src/app/logout-page/logout-page.component.ts +++ b/src/app/logout-page/logout-page.component.ts @@ -1,9 +1,13 @@ import { Component } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; +import { LogOutComponent } from '../shared/log-out/log-out.component'; @Component({ - selector: 'ds-logout-page', - styleUrls: ['./logout-page.component.scss'], - templateUrl: './logout-page.component.html' + selector: 'ds-logout-page', + styleUrls: ['./logout-page.component.scss'], + templateUrl: './logout-page.component.html', + standalone: true, + imports: [LogOutComponent, TranslateModule] }) export class LogoutPageComponent { diff --git a/src/app/logout-page/logout-page.module.ts b/src/app/logout-page/logout-page.module.ts index 59a5459e7f..289b06fa5c 100644 --- a/src/app/logout-page/logout-page.module.ts +++ b/src/app/logout-page/logout-page.module.ts @@ -6,15 +6,13 @@ import { LogoutPageRoutingModule } from './logout-page-routing.module'; import { ThemedLogoutPageComponent } from './themed-logout-page.component'; @NgModule({ - imports: [ - LogoutPageRoutingModule, - CommonModule, - SharedModule, - ], - declarations: [ - LogoutPageComponent, - ThemedLogoutPageComponent - ] + imports: [ + LogoutPageRoutingModule, + CommonModule, + SharedModule, + LogoutPageComponent, + ThemedLogoutPageComponent + ] }) export class LogoutPageModule { diff --git a/src/app/logout-page/themed-logout-page.component.ts b/src/app/logout-page/themed-logout-page.component.ts index 8d4adfd243..85f7e43618 100644 --- a/src/app/logout-page/themed-logout-page.component.ts +++ b/src/app/logout-page/themed-logout-page.component.ts @@ -6,9 +6,10 @@ import { LogoutPageComponent } from './logout-page.component'; * Themed wrapper for LogoutPageComponent */ @Component({ - selector: 'ds-themed-logout-page', - styleUrls: [], - templateUrl: './../shared/theme-support/themed.component.html' + selector: 'ds-themed-logout-page', + styleUrls: [], + templateUrl: './../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedLogoutPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/lookup-by-id/lookup-by-id.module.ts b/src/app/lookup-by-id/lookup-by-id.module.ts index 8a09d369e8..bcc5f01677 100644 --- a/src/app/lookup-by-id/lookup-by-id.module.ts +++ b/src/app/lookup-by-id/lookup-by-id.module.ts @@ -7,18 +7,16 @@ import { DsoRedirectService } from '../core/data/dso-redirect.service'; import { ThemedObjectNotFoundComponent } from './objectnotfound/themed-objectnotfound.component'; @NgModule({ - imports: [ - LookupRoutingModule, - CommonModule, - SharedModule, - ], - declarations: [ - ObjectNotFoundComponent, - ThemedObjectNotFoundComponent - ], - providers: [ - DsoRedirectService, - ] + imports: [ + LookupRoutingModule, + CommonModule, + SharedModule, + ObjectNotFoundComponent, + ThemedObjectNotFoundComponent + ], + providers: [ + DsoRedirectService, + ] }) export class LookupIdModule { diff --git a/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts b/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts index f0139e9251..b506e95276 100644 --- a/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts +++ b/src/app/lookup-by-id/objectnotfound/objectnotfound.component.spec.ts @@ -23,14 +23,14 @@ describe('ObjectNotFoundComponent', () => { describe('uuid request', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], providers: [ - {provide: ActivatedRoute, useValue: activatedRouteStub} - ], - declarations: [ObjectNotFoundComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [ + TranslateModule.forRoot(), + ObjectNotFoundComponent + ], providers: [ + { provide: ActivatedRoute, useValue: activatedRouteStub } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { @@ -53,14 +53,14 @@ describe('ObjectNotFoundComponent', () => { describe( 'legacy handle request', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], providers: [ - {provide: ActivatedRoute, useValue: activatedRouteStubHandle} - ], - declarations: [ObjectNotFoundComponent], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [ + TranslateModule.forRoot(), + ObjectNotFoundComponent + ], providers: [ + { provide: ActivatedRoute, useValue: activatedRouteStubHandle } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/lookup-by-id/objectnotfound/objectnotfound.component.ts b/src/app/lookup-by-id/objectnotfound/objectnotfound.component.ts index bbab90f39d..803a5d8cf3 100644 --- a/src/app/lookup-by-id/objectnotfound/objectnotfound.component.ts +++ b/src/app/lookup-by-id/objectnotfound/objectnotfound.component.ts @@ -1,15 +1,18 @@ import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute, RouterLink } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component representing the `PageNotFound` DSpace page. */ @Component({ - selector: 'ds-objnotfound', - styleUrls: ['./objectnotfound.component.scss'], - templateUrl: './objectnotfound.component.html', - changeDetection: ChangeDetectionStrategy.Default + selector: 'ds-objnotfound', + styleUrls: ['./objectnotfound.component.scss'], + templateUrl: './objectnotfound.component.html', + changeDetection: ChangeDetectionStrategy.Default, + standalone: true, + imports: [RouterLink, TranslateModule] }) export class ObjectNotFoundComponent implements OnInit { diff --git a/src/app/lookup-by-id/objectnotfound/themed-objectnotfound.component.ts b/src/app/lookup-by-id/objectnotfound/themed-objectnotfound.component.ts index e2338d5f07..e562173dea 100644 --- a/src/app/lookup-by-id/objectnotfound/themed-objectnotfound.component.ts +++ b/src/app/lookup-by-id/objectnotfound/themed-objectnotfound.component.ts @@ -6,9 +6,10 @@ import { ObjectNotFoundComponent } from './objectnotfound.component'; * Themed wrapper for ObjectNotFoundComponent */ @Component({ - selector: 'ds-themed-objnotfound', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-objnotfound', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedObjectNotFoundComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/menu.resolver.spec.ts b/src/app/menu.resolver.spec.ts index 838d5a53c5..04916392f8 100644 --- a/src/app/menu.resolver.spec.ts +++ b/src/app/menu.resolver.spec.ts @@ -54,22 +54,21 @@ describe('MenuResolver', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule], - declarations: [AdminSidebarComponent], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent], + providers: [ { provide: MenuService, useValue: menuService }, { provide: BrowseService, useValue: browseService }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: ScriptDataService, useValue: scriptService }, { - provide: NgbModal, useValue: { - open: () => {/*comment*/ + provide: NgbModal, useValue: { + open: () => { + } } - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }); + ], + schemas: [NO_ERRORS_SCHEMA] +}); resolver = TestBed.inject(MenuResolver); })); diff --git a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts index af043b447b..27c6bae5a3 100644 --- a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts +++ b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts @@ -105,24 +105,24 @@ describe('CollectionSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ CollectionSelectorComponent, CollectionDropdownComponent ], - providers: [ - {provide: CollectionDataService, useValue: collectionDataServiceMock}, - {provide: ElementRef, useClass: MockElementRef}, - {provide: NgbActiveModal, useValue: modal}, - {provide: ActivatedRoute, useValue: {}}, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + CollectionSelectorComponent, CollectionDropdownComponent + ], + providers: [ + { provide: CollectionDataService, useValue: collectionDataServiceMock }, + { provide: ElementRef, useClass: MockElementRef }, + { provide: NgbActiveModal, useValue: modal }, + { provide: ActivatedRoute, useValue: {} }, ChangeDetectorRef - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/my-dspace-page/collection-selector/collection-selector.component.ts b/src/app/my-dspace-page/collection-selector/collection-selector.component.ts index 855dc9c36d..0ec037cf75 100644 --- a/src/app/my-dspace-page/collection-selector/collection-selector.component.ts +++ b/src/app/my-dspace-page/collection-selector/collection-selector.component.ts @@ -3,6 +3,10 @@ import { Component } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { CollectionListEntry } from '../../shared/collection-dropdown/collection-dropdown.component'; +import { + ThemedCollectionDropdownComponent +} from '../../shared/collection-dropdown/themed-collection-dropdown.component'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component displays the dialog that shows the list of selectable collections @@ -11,7 +15,12 @@ import { CollectionListEntry } from '../../shared/collection-dropdown/collection @Component({ selector: 'ds-collection-selector', templateUrl: './collection-selector.component.html', - styleUrls: ['./collection-selector.component.scss'] + styleUrls: ['./collection-selector.component.scss'], + imports: [ + ThemedCollectionDropdownComponent, + TranslateModule + ], + standalone: true }) export class CollectionSelectorComponent { diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.spec.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.spec.ts index 86d99fb841..99553580fd 100644 --- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.spec.ts +++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.spec.ts @@ -78,22 +78,20 @@ describe('MyDSpaceNewExternalDropdownComponent test', () => { describe('With only one Entity', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule, - TranslateModule.forRoot(), - ], - declarations: [ - MyDSpaceNewExternalDropdownComponent, - TestComponent, - BrowserOnlyMockPipe - ], - providers: [ - { provide: EntityTypeDataService, useValue: getMockEmptyEntityTypeService() }, - { provide: Router, useValue: new RouterStub() }, - MyDSpaceNewExternalDropdownComponent - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [ + CommonModule, + TranslateModule.forRoot(), + MyDSpaceNewExternalDropdownComponent, + TestComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ + { provide: EntityTypeDataService, useValue: getMockEmptyEntityTypeService() }, + { provide: Router, useValue: new RouterStub() }, + MyDSpaceNewExternalDropdownComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); const html = ``; @@ -130,22 +128,20 @@ describe('MyDSpaceNewExternalDropdownComponent test', () => { describe('With more than one Entity', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule, - TranslateModule.forRoot(), - ], - declarations: [ - MyDSpaceNewExternalDropdownComponent, - TestComponent, - BrowserOnlyMockPipe, - ], - providers: [ - { provide: EntityTypeDataService, useValue: getMockEntityTypeService() }, - { provide: Router, useValue: new RouterStub() }, - MyDSpaceNewExternalDropdownComponent - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [ + CommonModule, + TranslateModule.forRoot(), + MyDSpaceNewExternalDropdownComponent, + TestComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ + { provide: EntityTypeDataService, useValue: getMockEntityTypeService() }, + { provide: Router, useValue: new RouterStub() }, + MyDSpaceNewExternalDropdownComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); const html = ``; @@ -182,8 +178,10 @@ describe('MyDSpaceNewExternalDropdownComponent test', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [CommonModule] }) class TestComponent { reload = (event) => { diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.ts index 53beb746a1..e6492e451f 100644 --- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.ts +++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component.ts @@ -10,6 +10,11 @@ import { hasValue } from '../../../shared/empty.util'; import { RemoteData } from '../../../core/data/remote-data'; import { PaginatedList } from '../../../core/data/paginated-list.model'; import { FindListOptions } from '../../../core/data/find-list-options.model'; +import { EntityDropdownComponent } from '../../../shared/entity-dropdown/entity-dropdown.component'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe'; /** * This component represents the 'Import metadata from external source' dropdown menu @@ -17,7 +22,16 @@ import { FindListOptions } from '../../../core/data/find-list-options.model'; @Component({ selector: 'ds-my-dspace-new-external-dropdown', styleUrls: ['./my-dspace-new-external-dropdown.component.scss'], - templateUrl: './my-dspace-new-external-dropdown.component.html' + templateUrl: './my-dspace-new-external-dropdown.component.html', + imports: [ + EntityDropdownComponent, + NgbDropdownModule, + AsyncPipe, + TranslateModule, + BrowserOnlyPipe, + NgIf + ], + standalone: true }) export class MyDSpaceNewExternalDropdownComponent implements OnInit, OnDestroy { diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.spec.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.spec.ts index 1ad8e6c0c3..c32e01f7ff 100644 --- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.spec.ts +++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.spec.ts @@ -82,22 +82,20 @@ describe('MyDSpaceNewSubmissionDropdownComponent test', () => { describe('With only one Entity', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule, - TranslateModule.forRoot(), - ], - declarations: [ - MyDSpaceNewSubmissionDropdownComponent, - TestComponent, - BrowserOnlyMockPipe, - ], - providers: [ - { provide: EntityTypeDataService, useValue: getMockEmptyEntityTypeService() }, - { provide: NgbModal, useValue: modalStub }, - MyDSpaceNewSubmissionDropdownComponent - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [ + CommonModule, + TranslateModule.forRoot(), + MyDSpaceNewSubmissionDropdownComponent, + TestComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ + { provide: EntityTypeDataService, useValue: getMockEmptyEntityTypeService() }, + { provide: NgbModal, useValue: modalStub }, + MyDSpaceNewSubmissionDropdownComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); const html = ``; @@ -134,22 +132,20 @@ describe('MyDSpaceNewSubmissionDropdownComponent test', () => { describe('With more than one Entity', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - CommonModule, - TranslateModule.forRoot(), - ], - declarations: [ - MyDSpaceNewSubmissionDropdownComponent, - TestComponent, - BrowserOnlyMockPipe, - ], - providers: [ - { provide: EntityTypeDataService, useValue: getMockEntityTypeService() }, - { provide: NgbModal, useValue: modalStub }, - MyDSpaceNewSubmissionDropdownComponent - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [ + CommonModule, + TranslateModule.forRoot(), + MyDSpaceNewSubmissionDropdownComponent, + TestComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ + { provide: EntityTypeDataService, useValue: getMockEntityTypeService() }, + { provide: NgbModal, useValue: modalStub }, + MyDSpaceNewSubmissionDropdownComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); const html = ``; @@ -187,8 +183,10 @@ describe('MyDSpaceNewSubmissionDropdownComponent test', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [CommonModule] }) class TestComponent { reload = (event) => { diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.ts index 133086c08b..ebe8181da3 100644 --- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.ts +++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component.ts @@ -2,7 +2,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { Observable, of as observableOf, Subscription } from 'rxjs'; import { map, mergeMap, take } from 'rxjs/operators'; -import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { NgbDropdownModule, NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { EntityTypeDataService } from '../../../core/data/entity-type-data.service'; import { ItemType } from '../../../core/shared/item-relationships/item-type.model'; @@ -11,6 +11,10 @@ import { CreateItemParentSelectorComponent } from '../../../shared/dso-selector/ import { RemoteData } from '../../../core/data/remote-data'; import { PaginatedList } from '../../../core/data/paginated-list.model'; import { FindListOptions } from '../../../core/data/find-list-options.model'; +import { EntityDropdownComponent } from '../../../shared/entity-dropdown/entity-dropdown.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe'; /** * This component represents the new submission dropdown @@ -18,7 +22,16 @@ import { FindListOptions } from '../../../core/data/find-list-options.model'; @Component({ selector: 'ds-my-dspace-new-submission-dropdown', styleUrls: ['./my-dspace-new-submission-dropdown.component.scss'], - templateUrl: './my-dspace-new-submission-dropdown.component.html' + templateUrl: './my-dspace-new-submission-dropdown.component.html', + imports: [ + EntityDropdownComponent, + NgbDropdownModule, + AsyncPipe, + TranslateModule, + BrowserOnlyPipe, + NgIf + ], + standalone: true }) export class MyDSpaceNewSubmissionDropdownComponent implements OnInit, OnDestroy { diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts index ed61fab1d6..03d4283980 100644 --- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts +++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.spec.ts @@ -37,21 +37,19 @@ describe('MyDSpaceNewSubmissionComponent test', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), NgbModule, - RouterTestingModule - ], - declarations: [ + RouterTestingModule, MyDSpaceNewSubmissionComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: AuthService, useClass: AuthServiceStub }, { provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -64,9 +62,9 @@ describe('MyDSpaceNewSubmissionComponent test', () => { { provide: CookieService, useValue: new CookieServiceMock() }, { provide: HostWindowService, useValue: new HostWindowServiceStub(800) }, { provide: EntityTypeDataService, useValue: getMockEntityTypeService() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); describe('', () => { @@ -117,8 +115,11 @@ describe('MyDSpaceNewSubmissionComponent test', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [NgbModule, + RouterTestingModule] }) class TestComponent { diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts index 0694fc63bf..6abe7b39c5 100644 --- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts +++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts @@ -16,6 +16,13 @@ import { CollectionSelectorComponent } from '../collection-selector/collection-s import { UploaderComponent } from '../../shared/upload/uploader/uploader.component'; import { UploaderError } from '../../shared/upload/uploader/uploader-error.model'; import { Router } from '@angular/router'; +import { + MyDSpaceNewExternalDropdownComponent +} from './my-dspace-new-external-dropdown/my-dspace-new-external-dropdown.component'; +import { + MyDSpaceNewSubmissionDropdownComponent +} from './my-dspace-new-submission-dropdown/my-dspace-new-submission-dropdown.component'; +import { NgIf } from '@angular/common'; /** * This component represents the whole mydspace page header @@ -23,7 +30,14 @@ import { Router } from '@angular/router'; @Component({ selector: 'ds-my-dspace-new-submission', styleUrls: ['./my-dspace-new-submission.component.scss'], - templateUrl: './my-dspace-new-submission.component.html' + templateUrl: './my-dspace-new-submission.component.html', + imports: [ + MyDSpaceNewExternalDropdownComponent, + MyDSpaceNewSubmissionDropdownComponent, + UploaderComponent, + NgIf + ], + standalone: true }) export class MyDSpaceNewSubmissionComponent implements OnDestroy, OnInit { /** diff --git a/src/app/my-dspace-page/my-dspace-page.component.spec.ts b/src/app/my-dspace-page/my-dspace-page.component.spec.ts index 34bf20d462..ba9fcc012f 100644 --- a/src/app/my-dspace-page/my-dspace-page.component.spec.ts +++ b/src/app/my-dspace-page/my-dspace-page.component.spec.ts @@ -42,14 +42,13 @@ describe('MyDSpacePageComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule], - declarations: [MyDSpacePageComponent], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule, MyDSpacePageComponent], + providers: [ { provide: SearchService, useValue: searchServiceStub }, { provide: MyDSpaceConfigurationService, useValue: myDSpaceConfigurationServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MyDSpacePageComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MyDSpacePageComponent, { set: { providers: [ { diff --git a/src/app/my-dspace-page/my-dspace-page.component.ts b/src/app/my-dspace-page/my-dspace-page.component.ts index c5176ef29e..c6af2d246c 100644 --- a/src/app/my-dspace-page/my-dspace-page.component.ts +++ b/src/app/my-dspace-page/my-dspace-page.component.ts @@ -11,6 +11,10 @@ import { ViewMode } from '../core/shared/view-mode.model'; import { MyDSpaceRequest } from '../core/data/request.models'; import { Context } from '../core/shared/context.model'; import { RoleType } from '../core/roles/role-types'; +import { ThemedSearchComponent } from '../shared/search/themed-search.component'; +import { MyDSpaceNewSubmissionComponent } from './my-dspace-new-submission/my-dspace-new-submission.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { RoleDirective } from '../shared/roles/role.directive'; export const MYDSPACE_ROUTE = '/mydspace'; export const SEARCH_CONFIG_SERVICE: InjectionToken = new InjectionToken('searchConfigurationService'); @@ -28,7 +32,15 @@ export const SEARCH_CONFIG_SERVICE: InjectionToken = provide: SEARCH_CONFIG_SERVICE, useClass: MyDSpaceConfigurationService } - ] + ], + imports: [ + ThemedSearchComponent, + MyDSpaceNewSubmissionComponent, + AsyncPipe, + RoleDirective, + NgIf + ], + standalone: true }) export class MyDSpacePageComponent implements OnInit { diff --git a/src/app/my-dspace-page/my-dspace-page.module.ts b/src/app/my-dspace-page/my-dspace-page.module.ts index 6ad50af96a..8049ec9266 100644 --- a/src/app/my-dspace-page/my-dspace-page.module.ts +++ b/src/app/my-dspace-page/my-dspace-page.module.ts @@ -26,20 +26,20 @@ const DECLARATIONS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - SearchModule, - MyDspacePageRoutingModule, - MyDspaceSearchModule.withEntryComponents(), - UploadModule, - ], - declarations: DECLARATIONS, - providers: [ - MyDSpaceGuard, - MyDSpaceConfigurationService - ], - exports: DECLARATIONS, + imports: [ + CommonModule, + SharedModule, + SearchModule, + MyDspacePageRoutingModule, + MyDspaceSearchModule.withEntryComponents(), + UploadModule, + ...DECLARATIONS + ], + providers: [ + MyDSpaceGuard, + MyDSpaceConfigurationService + ], + exports: DECLARATIONS }) /** diff --git a/src/app/my-dspace-page/my-dspace-search.module.ts b/src/app/my-dspace-page/my-dspace-search.module.ts index 71d1343a30..115e0a4a53 100644 --- a/src/app/my-dspace-page/my-dspace-search.module.ts +++ b/src/app/my-dspace-page/my-dspace-search.module.ts @@ -54,17 +54,15 @@ const DECLARATIONS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - MyDspacePageRoutingModule, - MyDSpaceActionsModule, - ResearchEntitiesModule.withEntryComponents(), - JournalEntitiesModule.withEntryComponents(), - ], - declarations: [ - ...DECLARATIONS, - ] + imports: [ + CommonModule, + SharedModule, + MyDspacePageRoutingModule, + MyDSpaceActionsModule, + ResearchEntitiesModule.withEntryComponents(), + JournalEntitiesModule.withEntryComponents(), + ...DECLARATIONS + ] }) /** diff --git a/src/app/my-dspace-page/themed-my-dspace-page.component.ts b/src/app/my-dspace-page/themed-my-dspace-page.component.ts index 55ebc51c8d..e28396d7e6 100644 --- a/src/app/my-dspace-page/themed-my-dspace-page.component.ts +++ b/src/app/my-dspace-page/themed-my-dspace-page.component.ts @@ -6,9 +6,10 @@ import { MyDSpacePageComponent } from './my-dspace-page.component'; * Themed wrapper for MyDSpacePageComponent */ @Component({ - selector: 'ds-themed-my-dspace-page', - styleUrls: [], - templateUrl: './../shared/theme-support/themed.component.html' + selector: 'ds-themed-my-dspace-page', + styleUrls: [], + templateUrl: './../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedMyDSpacePageComponent extends ThemedComponent { diff --git a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.spec.ts b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.spec.ts index 488c9ab251..6f2b46c250 100644 --- a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.spec.ts +++ b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.spec.ts @@ -19,14 +19,13 @@ describe('ExpandableNavbarSectionComponent', () => { describe('on larger screens', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ExpandableNavbarSectionComponent, TestComponent, VarDirective], - providers: [ - { provide: 'sectionDataProvider', useValue: {} }, - { provide: MenuService, useValue: menuService }, - { provide: HostWindowService, useValue: new HostWindowServiceStub(800) } - ] - }).overrideComponent(ExpandableNavbarSectionComponent, { + imports: [NoopAnimationsModule, ExpandableNavbarSectionComponent, TestComponent, VarDirective], + providers: [ + { provide: 'sectionDataProvider', useValue: {} }, + { provide: MenuService, useValue: menuService }, + { provide: HostWindowService, useValue: new HostWindowServiceStub(800) } + ] +}).overrideComponent(ExpandableNavbarSectionComponent, { set: { entryComponents: [TestComponent] } @@ -168,14 +167,13 @@ describe('ExpandableNavbarSectionComponent', () => { describe('on smaller, mobile screens', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ExpandableNavbarSectionComponent, TestComponent, VarDirective], - providers: [ - { provide: 'sectionDataProvider', useValue: {} }, - { provide: MenuService, useValue: menuService }, - { provide: HostWindowService, useValue: new HostWindowServiceStub(300) } - ] - }).overrideComponent(ExpandableNavbarSectionComponent, { + imports: [NoopAnimationsModule, ExpandableNavbarSectionComponent, TestComponent, VarDirective], + providers: [ + { provide: 'sectionDataProvider', useValue: {} }, + { provide: MenuService, useValue: menuService }, + { provide: HostWindowService, useValue: new HostWindowServiceStub(300) } + ] +}).overrideComponent(ExpandableNavbarSectionComponent, { set: { entryComponents: [TestComponent] } @@ -242,8 +240,9 @@ describe('ExpandableNavbarSectionComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { } diff --git a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts index 5bc69bcbb4..241e179625 100644 --- a/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts +++ b/src/app/navbar/expandable-navbar-section/expandable-navbar-section.component.ts @@ -6,15 +6,20 @@ import { first } from 'rxjs/operators'; import { HostWindowService } from '../../shared/host-window.service'; import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator'; import { MenuID } from '../../shared/menu/menu-id.model'; +import { NgComponentOutlet, NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { RouterLinkActive } from '@angular/router'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * Represents an expandable section in the navbar */ @Component({ - selector: 'ds-expandable-navbar-section', - templateUrl: './expandable-navbar-section.component.html', - styleUrls: ['./expandable-navbar-section.component.scss'], - animations: [slide] + selector: 'ds-expandable-navbar-section', + templateUrl: './expandable-navbar-section.component.html', + styleUrls: ['./expandable-navbar-section.component.scss'], + animations: [slide], + standalone: true, + imports: [VarDirective, RouterLinkActive, NgComponentOutlet, NgIf, NgFor, AsyncPipe] }) @rendersSectionForMenu(MenuID.PUBLIC, true) export class ExpandableNavbarSectionComponent extends NavbarSectionComponent implements OnInit { diff --git a/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts index e33dca4104..395163517c 100644 --- a/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts +++ b/src/app/navbar/expandable-navbar-section/themed-expandable-navbar-section.component.ts @@ -8,10 +8,11 @@ import { MenuID } from '../../shared/menu/menu-id.model'; * Themed wrapper for ExpandableNavbarSectionComponent */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-themed-expandable-navbar-section]', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + /* eslint-disable @angular-eslint/component-selector */ + selector: 'li[ds-themed-expandable-navbar-section]', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) @rendersSectionForMenu(MenuID.PUBLIC, true) export class ThemedExpandableNavbarSectionComponent extends ThemedComponent { diff --git a/src/app/navbar/navbar-section/navbar-section.component.spec.ts b/src/app/navbar/navbar-section/navbar-section.component.spec.ts index 122bf48636..9e1e3566d9 100644 --- a/src/app/navbar/navbar-section/navbar-section.component.spec.ts +++ b/src/app/navbar/navbar-section/navbar-section.component.spec.ts @@ -16,14 +16,13 @@ describe('NavbarSectionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [NavbarSectionComponent, TestComponent], - providers: [ + imports: [NoopAnimationsModule, NavbarSectionComponent, TestComponent], + providers: [ { provide: 'sectionDataProvider', useValue: {} }, { provide: MenuService, useValue: menuService }, { provide: HostWindowService, useValue: new HostWindowServiceStub(800) } - ] - }).overrideComponent(NavbarSectionComponent, { + ] +}).overrideComponent(NavbarSectionComponent, { set: { entryComponents: [TestComponent] } @@ -47,8 +46,9 @@ describe('NavbarSectionComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { } diff --git a/src/app/navbar/navbar-section/navbar-section.component.ts b/src/app/navbar/navbar-section/navbar-section.component.ts index 9f75a96f6e..24e3e8e3a0 100644 --- a/src/app/navbar/navbar-section/navbar-section.component.ts +++ b/src/app/navbar/navbar-section/navbar-section.component.ts @@ -3,15 +3,18 @@ import { MenuSectionComponent } from '../../shared/menu/menu-section/menu-sectio import { MenuService } from '../../shared/menu/menu.service'; import { rendersSectionForMenu } from '../../shared/menu/menu-section.decorator'; import { MenuID } from '../../shared/menu/menu-id.model'; +import { NgComponentOutlet, AsyncPipe } from '@angular/common'; /** * Represents a non-expandable section in the navbar */ @Component({ - /* eslint-disable @angular-eslint/component-selector */ - selector: 'li[ds-navbar-section]', - templateUrl: './navbar-section.component.html', - styleUrls: ['./navbar-section.component.scss'] + /* eslint-disable @angular-eslint/component-selector */ + selector: 'li[ds-navbar-section]', + templateUrl: './navbar-section.component.html', + styleUrls: ['./navbar-section.component.scss'], + standalone: true, + imports: [NgComponentOutlet, AsyncPipe] }) @rendersSectionForMenu(MenuID.PUBLIC, false) export class NavbarSectionComponent extends MenuSectionComponent implements OnInit { diff --git a/src/app/navbar/navbar.component.spec.ts b/src/app/navbar/navbar.component.spec.ts index 983eace055..5cfd6dddef 100644 --- a/src/app/navbar/navbar.component.spec.ts +++ b/src/app/navbar/navbar.component.spec.ts @@ -113,14 +113,15 @@ describe('NavbarComponent', () => { }; TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), StoreModule.forRoot({ auth: authReducer }, storeModuleConfig), NoopAnimationsModule, ReactiveFormsModule, - RouterTestingModule], - declarations: [NavbarComponent], - providers: [ + RouterTestingModule, + NavbarComponent + ], + providers: [ Injector, { provide: ThemeService, useValue: getMockThemeService() }, { provide: MenuService, useValue: menuService }, @@ -129,9 +130,9 @@ describe('NavbarComponent', () => { { provide: BrowseService, useValue: { getBrowseDefinitions: createSuccessfulRemoteDataObject$(buildPaginatedList(undefined, browseDefinitions)) } }, { provide: AuthorizationDataService, useValue: authorizationService }, provideMockStore({ initialState }), - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); // compile template and css })); diff --git a/src/app/navbar/navbar.component.ts b/src/app/navbar/navbar.component.ts index 0cfad9e431..abd844b039 100644 --- a/src/app/navbar/navbar.component.ts +++ b/src/app/navbar/navbar.component.ts @@ -12,15 +12,21 @@ import { Observable } from 'rxjs'; import { select, Store } from '@ngrx/store'; import { AppState } from '../app.reducer'; import { isAuthenticated } from '../core/auth/selectors'; +import { TranslateModule } from '@ngx-translate/core'; +import { UserMenuComponent } from '../shared/auth-nav-menu/user-menu/user-menu.component'; +import { NgClass, NgIf, NgFor, NgComponentOutlet, AsyncPipe } from '@angular/common'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; /** * Component representing the public navbar */ @Component({ - selector: 'ds-navbar', - styleUrls: ['./navbar.component.scss'], - templateUrl: './navbar.component.html', - animations: [slideMobileNav] + selector: 'ds-navbar', + styleUrls: ['./navbar.component.scss'], + templateUrl: './navbar.component.html', + animations: [slideMobileNav], + standalone: true, + imports: [NgbDropdownModule, NgClass, NgIf, UserMenuComponent, NgFor, NgComponentOutlet, AsyncPipe, TranslateModule] }) export class NavbarComponent extends MenuComponent { /** diff --git a/src/app/navbar/navbar.module.ts b/src/app/navbar/navbar.module.ts index de3244099d..58b7c1a008 100644 --- a/src/app/navbar/navbar.module.ts +++ b/src/app/navbar/navbar.module.ts @@ -26,25 +26,23 @@ const ENTRY_COMPONENTS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - MenuModule, - FormsModule, - EffectsModule.forFeature(effects), - CoreModule.forRoot() - ], - declarations: [ - ...ENTRY_COMPONENTS, - NavbarComponent, - ThemedNavbarComponent, - ], - providers: [], - exports: [ - ThemedNavbarComponent, - NavbarSectionComponent, - ThemedExpandableNavbarSectionComponent - ] + imports: [ + CommonModule, + SharedModule, + MenuModule, + FormsModule, + EffectsModule.forFeature(effects), + CoreModule.forRoot(), + ...ENTRY_COMPONENTS, + NavbarComponent, + ThemedNavbarComponent + ], + providers: [], + exports: [ + ThemedNavbarComponent, + NavbarSectionComponent, + ThemedExpandableNavbarSectionComponent + ] }) /** diff --git a/src/app/navbar/themed-navbar.component.ts b/src/app/navbar/themed-navbar.component.ts index 43efdc181e..5298eec1d4 100644 --- a/src/app/navbar/themed-navbar.component.ts +++ b/src/app/navbar/themed-navbar.component.ts @@ -6,9 +6,10 @@ import { NavbarComponent } from './navbar.component'; * Themed wrapper for NavbarComponent */ @Component({ - selector: 'ds-themed-navbar', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-navbar', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedNavbarComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/page-error/page-error.component.spec.ts b/src/app/page-error/page-error.component.spec.ts index 0f876f3196..c5580b8176 100644 --- a/src/app/page-error/page-error.component.spec.ts +++ b/src/app/page-error/page-error.component.spec.ts @@ -18,19 +18,19 @@ describe('PageErrorComponent', () => { }); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ PageErrorComponent ], - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + PageErrorComponent + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, - ] - }).compileComponents(); + ] +}).compileComponents(); fixture = TestBed.createComponent(PageErrorComponent); component = fixture.componentInstance; diff --git a/src/app/page-error/page-error.component.ts b/src/app/page-error/page-error.component.ts index dea1b68407..371dadd0c1 100644 --- a/src/app/page-error/page-error.component.ts +++ b/src/app/page-error/page-error.component.ts @@ -1,14 +1,17 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component representing the `PageError` DSpace page. */ @Component({ - selector: 'ds-page-error', - styleUrls: ['./page-error.component.scss'], - templateUrl: './page-error.component.html', - changeDetection: ChangeDetectionStrategy.Default + selector: 'ds-page-error', + styleUrls: ['./page-error.component.scss'], + templateUrl: './page-error.component.html', + changeDetection: ChangeDetectionStrategy.Default, + standalone: true, + imports: [TranslateModule] }) export class PageErrorComponent { status: number; diff --git a/src/app/page-error/themed-page-error.component.ts b/src/app/page-error/themed-page-error.component.ts index 3bfc6bf1a1..41799eea0c 100644 --- a/src/app/page-error/themed-page-error.component.ts +++ b/src/app/page-error/themed-page-error.component.ts @@ -6,9 +6,10 @@ import { PageErrorComponent } from './page-error.component'; * Themed wrapper for PageErrorComponent */ @Component({ - selector: 'ds-themed-page-error', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-page-error', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedPageErrorComponent extends ThemedComponent { diff --git a/src/app/page-internal-server-error/page-internal-server-error.component.ts b/src/app/page-internal-server-error/page-internal-server-error.component.ts index 7ecb0a7609..c65fdcd70f 100644 --- a/src/app/page-internal-server-error/page-internal-server-error.component.ts +++ b/src/app/page-internal-server-error/page-internal-server-error.component.ts @@ -1,14 +1,17 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { ServerResponseService } from '../core/services/server-response.service'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component representing the `PageInternalServer` DSpace page. */ @Component({ - selector: 'ds-page-internal-server-error', - styleUrls: ['./page-internal-server-error.component.scss'], - templateUrl: './page-internal-server-error.component.html', - changeDetection: ChangeDetectionStrategy.Default + selector: 'ds-page-internal-server-error', + styleUrls: ['./page-internal-server-error.component.scss'], + templateUrl: './page-internal-server-error.component.html', + changeDetection: ChangeDetectionStrategy.Default, + standalone: true, + imports: [TranslateModule] }) export class PageInternalServerErrorComponent { diff --git a/src/app/page-internal-server-error/themed-page-internal-server-error.component.ts b/src/app/page-internal-server-error/themed-page-internal-server-error.component.ts index a5f9101b69..d0deff1ad6 100644 --- a/src/app/page-internal-server-error/themed-page-internal-server-error.component.ts +++ b/src/app/page-internal-server-error/themed-page-internal-server-error.component.ts @@ -6,9 +6,10 @@ import { PageInternalServerErrorComponent } from './page-internal-server-error.c * Themed wrapper for PageInternalServerErrorComponent */ @Component({ - selector: 'ds-themed-page-internal-server-error', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-page-internal-server-error', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedPageInternalServerErrorComponent extends ThemedComponent { diff --git a/src/app/pagenotfound/pagenotfound.component.ts b/src/app/pagenotfound/pagenotfound.component.ts index b11de58269..ba3bff931d 100644 --- a/src/app/pagenotfound/pagenotfound.component.ts +++ b/src/app/pagenotfound/pagenotfound.component.ts @@ -1,15 +1,19 @@ import { ServerResponseService } from '../core/services/server-response.service'; import { Component, ChangeDetectionStrategy, OnInit } from '@angular/core'; import { AuthService } from '../core/auth/auth.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; /** * This component representing the `PageNotFound` DSpace page. */ @Component({ - selector: 'ds-pagenotfound', - styleUrls: ['./pagenotfound.component.scss'], - templateUrl: './pagenotfound.component.html', - changeDetection: ChangeDetectionStrategy.Default + selector: 'ds-pagenotfound', + styleUrls: ['./pagenotfound.component.scss'], + templateUrl: './pagenotfound.component.html', + changeDetection: ChangeDetectionStrategy.Default, + standalone: true, + imports: [RouterLink, TranslateModule] }) export class PageNotFoundComponent implements OnInit { diff --git a/src/app/pagenotfound/themed-pagenotfound.component.ts b/src/app/pagenotfound/themed-pagenotfound.component.ts index 3d284b1d6d..4509ebe252 100644 --- a/src/app/pagenotfound/themed-pagenotfound.component.ts +++ b/src/app/pagenotfound/themed-pagenotfound.component.ts @@ -6,9 +6,10 @@ import { PageNotFoundComponent } from './pagenotfound.component'; * Themed wrapper for PageNotFoundComponent */ @Component({ - selector: 'ds-themed-pagenotfound', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-pagenotfound', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedPageNotFoundComponent extends ThemedComponent { diff --git a/src/app/process-page/detail/process-detail-field/process-detail-field.component.spec.ts b/src/app/process-page/detail/process-detail-field/process-detail-field.component.spec.ts index 57b596b8b6..e249a36ebf 100644 --- a/src/app/process-page/detail/process-detail-field/process-detail-field.component.spec.ts +++ b/src/app/process-page/detail/process-detail-field/process-detail-field.component.spec.ts @@ -16,12 +16,10 @@ describe('ProcessDetailFieldComponent', () => { title = 'fake.title.message'; TestBed.configureTestingModule({ - declarations: [ProcessDetailFieldComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ProcessDetailFieldComponent, VarDirective], + providers: [], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/process-page/detail/process-detail-field/process-detail-field.component.ts b/src/app/process-page/detail/process-detail-field/process-detail-field.component.ts index f8015b6788..c9388c3706 100644 --- a/src/app/process-page/detail/process-detail-field/process-detail-field.component.ts +++ b/src/app/process-page/detail/process-detail-field/process-detail-field.component.ts @@ -1,8 +1,11 @@ import { Component, Input } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-process-detail-field', - templateUrl: './process-detail-field.component.html', + selector: 'ds-process-detail-field', + templateUrl: './process-detail-field.component.html', + standalone: true, + imports: [TranslateModule] }) /** * A component displaying a single detail about a DSpace Process diff --git a/src/app/process-page/detail/process-detail.component.spec.ts b/src/app/process-page/detail/process-detail.component.spec.ts index 9a0d89a882..c82eda747a 100644 --- a/src/app/process-page/detail/process-detail.component.spec.ts +++ b/src/app/process-page/detail/process-detail.component.spec.ts @@ -142,12 +142,11 @@ describe('ProcessDetailComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ProcessDetailComponent, ProcessDetailFieldComponent, VarDirective, FileSizePipe], - imports: [TranslateModule.forRoot()], - providers: [ + imports: [TranslateModule.forRoot(), ProcessDetailComponent, ProcessDetailFieldComponent, VarDirective, FileSizePipe], + providers: [ { - provide: ActivatedRoute, - useValue: { data: observableOf({ process: createSuccessfulRemoteDataObject(process) }), snapshot: { params: { id: 1 } } }, + provide: ActivatedRoute, + useValue: { data: observableOf({ process: createSuccessfulRemoteDataObject(process) }), snapshot: { params: { id: 1 } } }, }, { provide: ProcessDataService, useValue: processService }, { provide: BitstreamDataService, useValue: bitstreamDataService }, @@ -157,9 +156,9 @@ describe('ProcessDetailComponent', () => { { provide: NgbModal, useValue: modalService }, { provide: NotificationsService, useValue: notificationsService }, { provide: Router, useValue: router }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/process-page/detail/process-detail.component.ts b/src/app/process-page/detail/process-detail.component.ts index be0b6ad0f6..af376c36df 100644 --- a/src/app/process-page/detail/process-detail.component.ts +++ b/src/app/process-page/detail/process-detail.component.ts @@ -1,6 +1,6 @@ import { HttpClient } from '@angular/common/http'; import { Component, Inject, NgZone, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { BehaviorSubject, interval, Observable, shareReplay, Subscription } from 'rxjs'; import { finalize, map, switchMap, take, tap } from 'rxjs/operators'; import { AuthService } from '../../core/auth/auth.service'; @@ -25,13 +25,20 @@ import { redirectOn4xx } from '../../core/shared/authorized.operators'; import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import { getProcessListRoute } from '../process-page-routing.paths'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { followLink } from '../../shared/utils/follow-link-config.model'; -import { isPlatformBrowser } from '@angular/common'; +import { isPlatformBrowser, NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common'; +import { FileSizePipe } from '../../shared/utils/file-size-pipe'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { ThemedFileDownloadLinkComponent } from '../../shared/file-download-link/themed-file-download-link.component'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { ProcessDetailFieldComponent } from './process-detail-field/process-detail-field.component'; @Component({ - selector: 'ds-process-detail', - templateUrl: './process-detail.component.html', + selector: 'ds-process-detail', + templateUrl: './process-detail.component.html', + standalone: true, + imports: [NgIf, ProcessDetailFieldComponent, NgFor, VarDirective, ThemedFileDownloadLinkComponent, ThemedLoadingComponent, RouterLink, AsyncPipe, DatePipe, FileSizePipe, TranslateModule] }) /** * A component displaying detailed information about a DSpace Process diff --git a/src/app/process-page/form/process-form.component.spec.ts b/src/app/process-page/form/process-form.component.spec.ts index 10bc8294d3..08ec04ba88 100644 --- a/src/app/process-page/form/process-form.component.spec.ts +++ b/src/app/process-page/form/process-form.component.spec.ts @@ -51,23 +51,24 @@ describe('ProcessFormComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [ProcessFormComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ProcessFormComponent + ], + providers: [ { provide: ScriptDataService, useValue: scriptService }, { provide: NotificationsService, useClass: NotificationsServiceStub }, { provide: RequestService, useValue: jasmine.createSpyObj('requestService', ['removeBySubstring', 'removeByHrefSubstring']) }, { provide: Router, useValue: jasmine.createSpyObj('router', ['navigateByUrl']) }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-form.component.ts b/src/app/process-page/form/process-form.component.ts index 70eb3160a8..bea1765397 100644 --- a/src/app/process-page/form/process-form.component.ts +++ b/src/app/process-page/form/process-form.component.ts @@ -3,24 +3,30 @@ import { Script } from '../scripts/script.model'; import { Process } from '../processes/process.model'; import { ProcessParameter } from '../processes/process-parameter.model'; import { ScriptDataService } from '../../core/data/processes/script-data.service'; -import { ControlContainer, NgForm } from '@angular/forms'; +import { ControlContainer, NgForm, FormsModule } from '@angular/forms'; import { ScriptParameter } from '../scripts/script-parameter.model'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { RequestService } from '../../core/data/request.service'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { getFirstCompletedRemoteData } from '../../core/shared/operators'; import { RemoteData } from '../../core/data/remote-data'; import { getProcessListRoute } from '../process-page-routing.paths'; import { isEmpty } from '../../shared/empty.util'; +import { NgIf, NgFor } from '@angular/common'; +import { ScriptHelpComponent } from './script-help/script-help.component'; +import { ProcessParametersComponent } from './process-parameters/process-parameters.component'; +import { ScriptsSelectComponent } from './scripts-select/scripts-select.component'; /** * Component to create a new script */ @Component({ - selector: 'ds-process-form', - templateUrl: './process-form.component.html', - styleUrls: ['./process-form.component.scss'], + selector: 'ds-process-form', + templateUrl: './process-form.component.html', + styleUrls: ['./process-form.component.scss'], + standalone: true, + imports: [FormsModule, ScriptsSelectComponent, ProcessParametersComponent, RouterLink, ScriptHelpComponent, NgIf, NgFor, TranslateModule] }) export class ProcessFormComponent implements OnInit { /** diff --git a/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.spec.ts b/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.spec.ts index 56fece56b4..7d4cc11b12 100644 --- a/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.spec.ts +++ b/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.spec.ts @@ -33,10 +33,9 @@ describe('ParameterSelectComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [FormsModule], - declarations: [ParameterSelectComponent], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [FormsModule, ParameterSelectComponent], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.ts b/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.ts index e016d3442f..2242ea5ab5 100644 --- a/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.ts +++ b/src/app/process-page/form/process-parameters/parameter-select/parameter-select.component.ts @@ -1,21 +1,25 @@ import { Component, EventEmitter, Input, Optional, Output } from '@angular/core'; import { ProcessParameter } from '../../../processes/process-parameter.model'; import { ScriptParameter } from '../../../scripts/script-parameter.model'; -import { ControlContainer, NgForm } from '@angular/forms'; +import { ControlContainer, NgForm, FormsModule } from '@angular/forms'; import { controlContainerFactory } from '../../process-form.component'; +import { ParameterValueInputComponent } from '../parameter-value-input/parameter-value-input.component'; +import { NgFor, NgIf } from '@angular/common'; /** * Component to select a single parameter for a process */ @Component({ - selector: 'ds-parameter-select', - templateUrl: './parameter-select.component.html', - styleUrls: ['./parameter-select.component.scss'], - viewProviders: [{ - provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] - }] + selector: 'ds-parameter-select', + templateUrl: './parameter-select.component.html', + styleUrls: ['./parameter-select.component.scss'], + viewProviders: [{ + provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] + }], + standalone: true, + imports: [FormsModule, NgFor, ParameterValueInputComponent, NgIf] }) export class ParameterSelectComponent { @Input() index: number; diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.spec.ts b/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.spec.ts index 38f119ad5b..e4f9414c83 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.spec.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.spec.ts @@ -8,8 +8,8 @@ describe('BooleanValueInputComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [BooleanValueInputComponent] - }) + imports: [BooleanValueInputComponent] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.ts b/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.ts index 3f0a82b07a..c869196f8a 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/boolean-value-input/boolean-value-input.component.ts @@ -7,12 +7,13 @@ import { controlContainerFactory } from '../../../process-form.component'; * Represents the value of a boolean parameter */ @Component({ - selector: 'ds-boolean-value-input', - templateUrl: './boolean-value-input.component.html', - styleUrls: ['./boolean-value-input.component.scss'], - viewProviders: [ { provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] } ] + selector: 'ds-boolean-value-input', + templateUrl: './boolean-value-input.component.html', + styleUrls: ['./boolean-value-input.component.scss'], + viewProviders: [{ provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] }], + standalone: true }) export class BooleanValueInputComponent extends ValueInputComponent implements OnInit { ngOnInit() { diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.spec.ts b/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.spec.ts index 2264a0f331..d2f49bc353 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.spec.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.spec.ts @@ -12,16 +12,17 @@ describe('DateValueInputComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [DateValueInputComponent] - }) + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + DateValueInputComponent + ] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.ts b/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.ts index ce1414e8ad..26fbb6c63b 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/date-value-input/date-value-input.component.ts @@ -1,18 +1,22 @@ import { Component, Input, Optional } from '@angular/core'; import { ValueInputComponent } from '../value-input.component'; -import { ControlContainer, NgForm } from '@angular/forms'; +import { ControlContainer, NgForm, FormsModule } from '@angular/forms'; import { controlContainerFactory } from '../../../process-form.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; /** * Represents the user inputted value of a date parameter */ @Component({ - selector: 'ds-date-value-input', - templateUrl: './date-value-input.component.html', - styleUrls: ['./date-value-input.component.scss'], - viewProviders: [ { provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] } ] + selector: 'ds-date-value-input', + templateUrl: './date-value-input.component.html', + styleUrls: ['./date-value-input.component.scss'], + viewProviders: [{ provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] }], + standalone: true, + imports: [FormsModule, NgIf, TranslateModule] }) export class DateValueInputComponent extends ValueInputComponent { /** diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.spec.ts b/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.spec.ts index 07aad6ce4e..2fa6e8b934 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.spec.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.spec.ts @@ -15,18 +15,18 @@ describe('FileValueInputComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [FileValueInputComponent, FileValueAccessorDirective, FileValidator], - schemas: [NO_ERRORS_SCHEMA] - - }) + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + FileValueInputComponent, FileValueAccessorDirective, FileValidator + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.ts b/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.ts index 796a5de58e..53da935d33 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/file-value-input/file-value-input.component.ts @@ -1,18 +1,24 @@ import { Component, Optional } from '@angular/core'; import { ValueInputComponent } from '../value-input.component'; -import { ControlContainer, NgForm } from '@angular/forms'; +import { ControlContainer, NgForm, FormsModule } from '@angular/forms'; import { controlContainerFactory } from '../../../process-form.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; +import { FileValidator } from '../../../../../shared/utils/require-file.validator'; +import { FileValueAccessorDirective } from '../../../../../shared/utils/file-value-accessor.directive'; /** * Represents the user inputted value of a file parameter */ @Component({ - selector: 'ds-file-value-input', - templateUrl: './file-value-input.component.html', - styleUrls: ['./file-value-input.component.scss'], - viewProviders: [ { provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] } ] + selector: 'ds-file-value-input', + templateUrl: './file-value-input.component.html', + styleUrls: ['./file-value-input.component.scss'], + viewProviders: [{ provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] }], + standalone: true, + imports: [FileValueAccessorDirective, FormsModule, FileValidator, NgIf, TranslateModule] }) export class FileValueInputComponent extends ValueInputComponent { /** diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.spec.ts b/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.spec.ts index a28e7798c1..ade94ec0f5 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.spec.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.spec.ts @@ -35,15 +35,14 @@ describe('ParameterValueInputComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), ParameterValueInputComponent, BooleanValueInputComponent, StringValueInputComponent, @@ -51,9 +50,9 @@ describe('ParameterValueInputComponent', () => { DateValueInputComponent, FileValueAccessorDirective, FileValidator - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.ts b/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.ts index ec29ee5e1e..700b17adbd 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/parameter-value-input.component.ts @@ -3,17 +3,24 @@ import { ScriptParameterType } from '../../../scripts/script-parameter-type.mode import { ScriptParameter } from '../../../scripts/script-parameter.model'; import { ControlContainer, NgForm } from '@angular/forms'; import { controlContainerFactory } from '../../process-form.component'; +import { BooleanValueInputComponent } from './boolean-value-input/boolean-value-input.component'; +import { FileValueInputComponent } from './file-value-input/file-value-input.component'; +import { DateValueInputComponent } from './date-value-input/date-value-input.component'; +import { StringValueInputComponent } from './string-value-input/string-value-input.component'; +import { NgSwitch, NgSwitchCase } from '@angular/common'; /** * Component that renders the correct parameter value input based the script parameter's type */ @Component({ - selector: 'ds-parameter-value-input', - templateUrl: './parameter-value-input.component.html', - styleUrls: ['./parameter-value-input.component.scss'], - viewProviders: [ { provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] } ] + selector: 'ds-parameter-value-input', + templateUrl: './parameter-value-input.component.html', + styleUrls: ['./parameter-value-input.component.scss'], + viewProviders: [{ provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] }], + standalone: true, + imports: [NgSwitch, NgSwitchCase, StringValueInputComponent, DateValueInputComponent, FileValueInputComponent, BooleanValueInputComponent] }) export class ParameterValueInputComponent { @Input() index: number; diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.spec.ts b/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.spec.ts index 6b7de9460d..a3f5bc1cf4 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.spec.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.spec.ts @@ -12,18 +12,18 @@ describe('StringValueInputComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [StringValueInputComponent], - providers: [ - ] - }) + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + StringValueInputComponent + ], + providers: [] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.ts b/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.ts index 0424faec21..919af1420c 100644 --- a/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.ts +++ b/src/app/process-page/form/process-parameters/parameter-value-input/string-value-input/string-value-input.component.ts @@ -1,18 +1,22 @@ import { Component, Optional, Input } from '@angular/core'; import { ValueInputComponent } from '../value-input.component'; -import { ControlContainer, NgForm } from '@angular/forms'; +import { ControlContainer, NgForm, FormsModule } from '@angular/forms'; import { controlContainerFactory } from '../../../process-form.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; /** * Represents the user inputted value of a string parameter */ @Component({ - selector: 'ds-string-value-input', - templateUrl: './string-value-input.component.html', - styleUrls: ['./string-value-input.component.scss'], - viewProviders: [ { provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] } ] + selector: 'ds-string-value-input', + templateUrl: './string-value-input.component.html', + styleUrls: ['./string-value-input.component.scss'], + viewProviders: [{ provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] }], + standalone: true, + imports: [FormsModule, NgIf, TranslateModule] }) export class StringValueInputComponent extends ValueInputComponent { /** diff --git a/src/app/process-page/form/process-parameters/process-parameters.component.spec.ts b/src/app/process-page/form/process-parameters/process-parameters.component.spec.ts index b44479c14a..2189e27304 100644 --- a/src/app/process-page/form/process-parameters/process-parameters.component.spec.ts +++ b/src/app/process-page/form/process-parameters/process-parameters.component.spec.ts @@ -30,17 +30,18 @@ describe('ProcessParametersComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [ProcessParametersComponent, ParameterSelectComponent], - schemas: [NO_ERRORS_SCHEMA] - }) + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ProcessParametersComponent, ParameterSelectComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/process-parameters/process-parameters.component.ts b/src/app/process-page/form/process-parameters/process-parameters.component.ts index 85b59f7644..16d27d8851 100644 --- a/src/app/process-page/form/process-parameters/process-parameters.component.ts +++ b/src/app/process-page/form/process-parameters/process-parameters.component.ts @@ -5,19 +5,24 @@ import { hasValue } from '../../../shared/empty.util'; import { ControlContainer, NgForm } from '@angular/forms'; import { ScriptParameter } from '../../scripts/script-parameter.model'; import { controlContainerFactory } from '../process-form.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { ParameterSelectComponent } from './parameter-select/parameter-select.component'; +import { NgIf, NgFor } from '@angular/common'; /** * Component that represents the selected list of parameters for a script */ @Component({ - selector: 'ds-process-parameters', - templateUrl: './process-parameters.component.html', - styleUrls: ['./process-parameters.component.scss'], - viewProviders: [{ - provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] - }] + selector: 'ds-process-parameters', + templateUrl: './process-parameters.component.html', + styleUrls: ['./process-parameters.component.scss'], + viewProviders: [{ + provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] + }], + standalone: true, + imports: [NgIf, NgFor, ParameterSelectComponent, TranslateModule] }) export class ProcessParametersComponent implements OnChanges { /** diff --git a/src/app/process-page/form/script-help/script-help.component.spec.ts b/src/app/process-page/form/script-help/script-help.component.spec.ts index abfe8f9da1..757e68d489 100644 --- a/src/app/process-page/form/script-help/script-help.component.spec.ts +++ b/src/app/process-page/form/script-help/script-help.component.spec.ts @@ -29,17 +29,18 @@ describe('ScriptHelpComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [ ScriptHelpComponent ], - schemas: [NO_ERRORS_SCHEMA] - }) + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ScriptHelpComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/script-help/script-help.component.ts b/src/app/process-page/form/script-help/script-help.component.ts index 7e230a4a42..50749d6126 100644 --- a/src/app/process-page/form/script-help/script-help.component.ts +++ b/src/app/process-page/form/script-help/script-help.component.ts @@ -1,14 +1,18 @@ import { Component, Input } from '@angular/core'; import { Script } from '../../scripts/script.model'; import { ScriptParameterType } from '../../scripts/script-parameter-type.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgFor, NgTemplateOutlet, NgSwitch, NgSwitchCase } from '@angular/common'; /** * Components that represents a help section for the script use and parameters */ @Component({ - selector: 'ds-script-help', - templateUrl: './script-help.component.html', - styleUrls: ['./script-help.component.scss'] + selector: 'ds-script-help', + templateUrl: './script-help.component.html', + styleUrls: ['./script-help.component.scss'], + standalone: true, + imports: [NgFor, NgTemplateOutlet, NgSwitch, NgSwitchCase, TranslateModule] }) export class ScriptHelpComponent { /** diff --git a/src/app/process-page/form/scripts-select/scripts-select.component.spec.ts b/src/app/process-page/form/scripts-select/scripts-select.component.spec.ts index 72dc4c9348..f5567ff2b2 100644 --- a/src/app/process-page/form/scripts-select/scripts-select.component.spec.ts +++ b/src/app/process-page/form/scripts-select/scripts-select.component.spec.ts @@ -34,22 +34,23 @@ describe('ScriptsSelectComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [ScriptsSelectComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ScriptsSelectComponent + ], + providers: [ { provide: ScriptDataService, useValue: scriptService }, { provide: Router, useClass: RouterStub }, { provide: ActivatedRoute, useValue: new ActivatedRouteStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/form/scripts-select/scripts-select.component.ts b/src/app/process-page/form/scripts-select/scripts-select.component.ts index 4c7fe3bdf7..11afe917de 100644 --- a/src/app/process-page/form/scripts-select/scripts-select.component.ts +++ b/src/app/process-page/form/scripts-select/scripts-select.component.ts @@ -7,8 +7,10 @@ import { getRemoteDataPayload, getFirstSucceededRemoteData } from '../../../core import { PaginatedList } from '../../../core/data/paginated-list.model'; import { ActivatedRoute, Params, Router } from '@angular/router'; import { hasNoValue, hasValue } from '../../../shared/empty.util'; -import { ControlContainer, NgForm } from '@angular/forms'; +import { ControlContainer, NgForm, FormsModule } from '@angular/forms'; import { controlContainerFactory } from '../process-form.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; const SCRIPT_QUERY_PARAMETER = 'script'; @@ -16,12 +18,14 @@ const SCRIPT_QUERY_PARAMETER = 'script'; * Component used to select a script */ @Component({ - selector: 'ds-scripts-select', - templateUrl: './scripts-select.component.html', - styleUrls: ['./scripts-select.component.scss'], - viewProviders: [ { provide: ControlContainer, - useFactory: controlContainerFactory, - deps: [[new Optional(), NgForm]] } ] + selector: 'ds-scripts-select', + templateUrl: './scripts-select.component.html', + styleUrls: ['./scripts-select.component.scss'], + viewProviders: [{ provide: ControlContainer, + useFactory: controlContainerFactory, + deps: [[new Optional(), NgForm]] }], + standalone: true, + imports: [NgIf, FormsModule, NgFor, AsyncPipe, TranslateModule] }) export class ScriptsSelectComponent implements OnInit, OnDestroy { /** diff --git a/src/app/process-page/new/new-process.component.spec.ts b/src/app/process-page/new/new-process.component.spec.ts index 48f0f097a9..948d643c10 100644 --- a/src/app/process-page/new/new-process.component.spec.ts +++ b/src/app/process-page/new/new-process.component.spec.ts @@ -50,25 +50,26 @@ describe('NewProcessComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [NewProcessComponent, VarDirective], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + NewProcessComponent, VarDirective + ], + providers: [ { provide: ScriptDataService, useValue: scriptService }, { provide: NotificationsService, useClass: NotificationsServiceStub }, { provide: RequestService, useValue: {} }, { provide: ActivatedRoute, useValue: { snapshot: { queryParams: {} } } }, { provide: LinkService, useValue: {} }, { provide: ProcessDataService, useValue: {} }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/process-page/new/new-process.component.ts b/src/app/process-page/new/new-process.component.ts index f97ce1bc6b..df96cef44f 100644 --- a/src/app/process-page/new/new-process.component.ts +++ b/src/app/process-page/new/new-process.component.ts @@ -8,14 +8,19 @@ import { map, switchMap } from 'rxjs/operators'; import { LinkService } from '../../core/cache/builders/link.service'; import { followLink } from '../../shared/utils/follow-link-config.model'; import { Script } from '../scripts/script.model'; +import { ProcessFormComponent } from '../form/process-form.component'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * Component to create a new script */ @Component({ - selector: 'ds-new-process', - templateUrl: './new-process.component.html', - styleUrls: ['./new-process.component.scss'], + selector: 'ds-new-process', + templateUrl: './new-process.component.html', + styleUrls: ['./new-process.component.scss'], + standalone: true, + imports: [NgIf, VarDirective, ProcessFormComponent, AsyncPipe] }) export class NewProcessComponent implements OnInit { /** diff --git a/src/app/process-page/overview/process-overview.component.spec.ts b/src/app/process-page/overview/process-overview.component.spec.ts index 94071c0e59..dd61cae071 100644 --- a/src/app/process-page/overview/process-overview.component.spec.ts +++ b/src/app/process-page/overview/process-overview.component.spec.ts @@ -111,17 +111,16 @@ describe('ProcessOverviewComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ProcessOverviewComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ProcessOverviewComponent, VarDirective], + providers: [ { provide: ProcessDataService, useValue: processService }, { provide: EPersonDataService, useValue: ePersonService }, { provide: PaginationService, useValue: paginationService }, { provide: ProcessBulkDeleteService, useValue: processBulkDeleteService }, { provide: NgbModal, useValue: modalService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/process-page/overview/process-overview.component.ts b/src/app/process-page/overview/process-overview.component.ts index 7fa3b12dac..feb3f78f69 100644 --- a/src/app/process-page/overview/process-overview.component.ts +++ b/src/app/process-page/overview/process-overview.component.ts @@ -15,10 +15,17 @@ import { ProcessBulkDeleteService } from './process-bulk-delete.service'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { hasValue } from '../../shared/empty.util'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { PaginationComponent } from '../../shared/pagination/pagination.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgFor, AsyncPipe, DatePipe } from '@angular/common'; @Component({ - selector: 'ds-process-overview', - templateUrl: './process-overview.component.html', + selector: 'ds-process-overview', + templateUrl: './process-overview.component.html', + standalone: true, + imports: [NgIf, RouterLink, PaginationComponent, NgFor, VarDirective, AsyncPipe, DatePipe, TranslateModule] }) /** * Component displaying a list of all processes in a paginated table diff --git a/src/app/process-page/process-page-shared.module.ts b/src/app/process-page/process-page-shared.module.ts index e666283e03..70eb8d0ecf 100644 --- a/src/app/process-page/process-page-shared.module.ts +++ b/src/app/process-page/process-page-shared.module.ts @@ -18,29 +18,27 @@ import { ProcessBreadcrumbResolver } from './process-breadcrumb.resolver'; import { ProcessFormComponent } from './form/process-form.component'; @NgModule({ - imports: [ - SharedModule, - ], - declarations: [ - NewProcessComponent, - ScriptsSelectComponent, - ScriptHelpComponent, - ParameterSelectComponent, - ProcessParametersComponent, - StringValueInputComponent, - ParameterValueInputComponent, - FileValueInputComponent, - BooleanValueInputComponent, - DateValueInputComponent, - ProcessOverviewComponent, - ProcessDetailComponent, - ProcessDetailFieldComponent, - ProcessFormComponent - ], - providers: [ - ProcessBreadcrumbResolver, - ProcessBreadcrumbsService - ] + imports: [ + SharedModule, + NewProcessComponent, + ScriptsSelectComponent, + ScriptHelpComponent, + ParameterSelectComponent, + ProcessParametersComponent, + StringValueInputComponent, + ParameterValueInputComponent, + FileValueInputComponent, + BooleanValueInputComponent, + DateValueInputComponent, + ProcessOverviewComponent, + ProcessDetailComponent, + ProcessDetailFieldComponent, + ProcessFormComponent + ], + providers: [ + ProcessBreadcrumbResolver, + ProcessBreadcrumbsService + ] }) export class ProcessPageSharedModule { diff --git a/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.spec.ts b/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.spec.ts index 2843322818..35ff322bbe 100644 --- a/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.spec.ts +++ b/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.spec.ts @@ -105,16 +105,15 @@ describe('ProfileClaimItemModalComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ProfileClaimItemModalComponent], - providers: [ + imports: [TranslateModule.forRoot(), ProfileClaimItemModalComponent], + providers: [ { provide: NgbActiveModal, useValue: {} }, { provide: ActivatedRoute, useValue: {} }, { provide: Router, useValue: new RouterStub() }, { provide: ProfileClaimService, useValue: profileClaimService } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.ts b/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.ts index ca8efcafc7..5a6fc04e21 100644 --- a/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.ts +++ b/src/app/profile-page/profile-claim-item-modal/profile-claim-item-modal.component.ts @@ -16,13 +16,25 @@ import { CollectionElementLinkType } from '../../shared/object-collection/collec import { SearchObjects } from '../../shared/search/models/search-objects.model'; import { getFirstCompletedRemoteData } from '../../core/shared/operators'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { + ListableObjectComponentLoaderComponent +} from '../../shared/object-collection/shared/listable-object/listable-object-component-loader.component'; +import { AsyncPipe, NgForOf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; /** * Component representing a modal that show a list of suggested profile item to claim */ @Component({ selector: 'ds-profile-claim-item-modal', - templateUrl: './profile-claim-item-modal.component.html' + templateUrl: './profile-claim-item-modal.component.html', + imports: [ + ListableObjectComponentLoaderComponent, + AsyncPipe, + TranslateModule, + NgForOf + ], + standalone: true }) export class ProfileClaimItemModalComponent extends DSOSelectorModalWrapperComponent implements OnInit { diff --git a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.spec.ts b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.spec.ts index 1dc1db26cc..a9b3be3d8a 100644 --- a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.spec.ts +++ b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.spec.ts @@ -64,16 +64,15 @@ describe('ProfilePageMetadataFormComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ProfilePageMetadataFormComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ProfilePageMetadataFormComponent, VarDirective], + providers: [ { provide: EPersonDataService, useValue: epersonService }, { provide: TranslateService, useValue: translate }, { provide: NotificationsService, useValue: notificationsService }, FormBuilderService - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts index c4e164a7e8..eb16f23599 100644 --- a/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts +++ b/src/app/profile-page/profile-page-metadata-form/profile-page-metadata-form.component.ts @@ -16,10 +16,17 @@ import { getRemoteDataPayload, getFirstSucceededRemoteData } from '../../core/sh import { FormBuilderService } from '../../shared/form/builder/form-builder.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { environment } from '../../../environments/environment'; +import { FormComponent } from '../../shared/form/form.component'; +import { NgIf } from '@angular/common'; @Component({ selector: 'ds-profile-page-metadata-form', - templateUrl: './profile-page-metadata-form.component.html' + templateUrl: './profile-page-metadata-form.component.html', + imports: [ + FormComponent, + NgIf + ], + standalone: true }) /** * Component for a user to edit their metadata diff --git a/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts b/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts index 9bb0d0a6e2..67779e514e 100644 --- a/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts +++ b/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.spec.ts @@ -71,17 +71,16 @@ describe('ProfilePageResearcherFormComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ProfilePageResearcherFormComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ProfilePageResearcherFormComponent, VarDirective], + providers: [ NgbModal, { provide: ResearcherProfileDataService, useValue: researcherProfileService }, { provide: NotificationsService, useValue: notificationsServiceStub }, { provide: ProfileClaimService, useValue: profileClaimService }, { provide: AuthService, useValue: authService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.ts b/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.ts index d63360fbf4..31a61aafca 100644 --- a/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.ts +++ b/src/app/profile-page/profile-page-researcher-form/profile-page-researcher-form.component.ts @@ -2,7 +2,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { map, mergeMap, switchMap, take, tap } from 'rxjs/operators'; @@ -19,10 +19,21 @@ import { isNotEmpty } from '../../shared/empty.util'; import { followLink } from '../../shared/utils/follow-link-config.model'; import { ConfirmationModalComponent } from '../../shared/confirmation-modal/confirmation-modal.component'; import { NoContent } from '../../core/shared/NoContent.model'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { UiSwitchModule } from 'ngx-ui-switch'; +import { VarDirective } from '../../shared/utils/var.directive'; @Component({ selector: 'ds-profile-page-researcher-form', templateUrl: './profile-page-researcher-form.component.html', + imports: [ + NgIf, + AsyncPipe, + TranslateModule, + UiSwitchModule, + VarDirective + ], + standalone: true }) /** * Component for a user to create/delete or change their researcher profile. diff --git a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts index 866b962986..b8b5d306d9 100644 --- a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts +++ b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.spec.ts @@ -31,15 +31,14 @@ describe('ProfilePageSecurityFormComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ProfilePageSecurityFormComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ - {provide: EPersonDataService, useValue: epersonService}, - {provide: NotificationsService, useValue: notificationsService}, + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ProfilePageSecurityFormComponent, VarDirective], + providers: [ + { provide: EPersonDataService, useValue: epersonService }, + { provide: NotificationsService, useValue: notificationsService }, FormBuilderService - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts index 04292ea96e..981b8c48b8 100644 --- a/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts +++ b/src/app/profile-page/profile-page-security-form/profile-page-security-form.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { DynamicFormControlModel, DynamicFormService, DynamicInputModel } from '@ng-dynamic-forms/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { UntypedFormGroup } from '@angular/forms'; import { hasValue, isEmpty } from '../../shared/empty.util'; import { EPersonDataService } from '../../core/eperson/eperson-data.service'; @@ -8,10 +8,18 @@ import { NotificationsService } from '../../shared/notifications/notifications.s import { map } from 'rxjs/operators'; import { Subscription } from 'rxjs'; import { debounceTimeWorkaround as debounceTime } from '../../core/shared/operators'; +import { FormComponent } from '../../shared/form/form.component'; +import { AlertComponent } from '../../shared/alert/alert.component'; @Component({ selector: 'ds-profile-page-security-form', - templateUrl: './profile-page-security-form.component.html' + templateUrl: './profile-page-security-form.component.html', + imports: [ + FormComponent, + AlertComponent, + TranslateModule + ], + standalone: true }) /** * Component for a user to edit their security information diff --git a/src/app/profile-page/profile-page.component.spec.ts b/src/app/profile-page/profile-page.component.spec.ts index 709ed56790..99c8c136dc 100644 --- a/src/app/profile-page/profile-page.component.spec.ts +++ b/src/app/profile-page/profile-page.component.spec.ts @@ -89,22 +89,22 @@ describe('ProfilePageComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ProfilePageComponent, VarDirective], - imports: [ + imports: [ StoreModule.forRoot({ auth: authReducer }, storeModuleConfig), TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - providers: [ + RouterTestingModule.withRoutes([]), + ProfilePageComponent, VarDirective + ], + providers: [ { provide: EPersonDataService, useValue: epersonService }, { provide: NotificationsService, useValue: notificationsService }, { provide: AuthService, useValue: authService }, { provide: ConfigurationDataService, useValue: configurationService }, { provide: AuthorizationDataService, useValue: authorizationService }, provideMockStore({ initialState }), - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/profile-page/profile-page.component.ts b/src/app/profile-page/profile-page.component.ts index d49bdedb83..9a9e32d2c7 100644 --- a/src/app/profile-page/profile-page.component.ts +++ b/src/app/profile-page/profile-page.component.ts @@ -3,7 +3,7 @@ import { BehaviorSubject, Observable } from 'rxjs'; import { EPerson } from '../core/eperson/models/eperson.model'; import { ProfilePageMetadataFormComponent } from './profile-page-metadata-form/profile-page-metadata-form.component'; import { NotificationsService } from '../shared/notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { Group } from '../core/eperson/models/group.model'; import { RemoteData } from '../core/data/remote-data'; import { PaginatedList } from '../core/data/paginated-list.model'; @@ -19,11 +19,28 @@ import { FeatureID } from '../core/data/feature-authorization/feature-id'; import { ConfigurationDataService } from '../core/data/configuration-data.service'; import { ConfigurationProperty } from '../core/shared/configuration-property.model'; import { DSONameService } from '../core/breadcrumbs/dso-name.service'; +import { ProfilePageSecurityFormComponent } from './profile-page-security-form/profile-page-security-form.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { + ProfilePageResearcherFormComponent +} from './profile-page-researcher-form/profile-page-researcher-form.component'; +import { VarDirective } from '../shared/utils/var.directive'; @Component({ selector: 'ds-profile-page', styleUrls: ['./profile-page.component.scss'], - templateUrl: './profile-page.component.html' + templateUrl: './profile-page.component.html', + imports: [ + ProfilePageMetadataFormComponent, + ProfilePageSecurityFormComponent, + AsyncPipe, + TranslateModule, + ProfilePageResearcherFormComponent, + VarDirective, + NgIf, + NgForOf + ], + standalone: true }) /** * Component for a user to edit their profile information diff --git a/src/app/profile-page/profile-page.module.ts b/src/app/profile-page/profile-page.module.ts index 0e2902de33..4f61a3a4d1 100644 --- a/src/app/profile-page/profile-page.module.ts +++ b/src/app/profile-page/profile-page.module.ts @@ -15,28 +15,26 @@ import { ProfileClaimItemModalComponent } from './profile-claim-item-modal/profi @NgModule({ - imports: [ - ProfilePageRoutingModule, - CommonModule, - SharedModule, - FormModule, - UiSwitchModule - ], - exports: [ - ProfilePageComponent, - ThemedProfilePageComponent, - ProfilePageMetadataFormComponent, - ProfilePageSecurityFormComponent, - ProfilePageResearcherFormComponent - ], - declarations: [ - ProfilePageComponent, - ThemedProfilePageComponent, - ProfileClaimItemModalComponent, - ProfilePageMetadataFormComponent, - ProfilePageSecurityFormComponent, - ProfilePageResearcherFormComponent - ] + imports: [ + ProfilePageRoutingModule, + CommonModule, + SharedModule, + FormModule, + UiSwitchModule, + ProfilePageComponent, + ThemedProfilePageComponent, + ProfileClaimItemModalComponent, + ProfilePageMetadataFormComponent, + ProfilePageSecurityFormComponent, + ProfilePageResearcherFormComponent + ], + exports: [ + ProfilePageComponent, + ThemedProfilePageComponent, + ProfilePageMetadataFormComponent, + ProfilePageSecurityFormComponent, + ProfilePageResearcherFormComponent + ] }) export class ProfilePageModule { diff --git a/src/app/profile-page/themed-profile-page.component.ts b/src/app/profile-page/themed-profile-page.component.ts index 2348d416cf..478484b209 100644 --- a/src/app/profile-page/themed-profile-page.component.ts +++ b/src/app/profile-page/themed-profile-page.component.ts @@ -6,9 +6,10 @@ import { ProfilePageComponent } from './profile-page.component'; * Themed wrapper for ProfilePageComponent */ @Component({ - selector: 'ds-themed-profile-page', - styleUrls: [], - templateUrl: './../shared/theme-support/themed.component.html' + selector: 'ds-themed-profile-page', + styleUrls: [], + templateUrl: './../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedProfilePageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/register-email-form/register-email-form.component.spec.ts b/src/app/register-email-form/register-email-form.component.spec.ts index 9e852d9491..d0809123ff 100644 --- a/src/app/register-email-form/register-email-form.component.spec.ts +++ b/src/app/register-email-form/register-email-form.component.spec.ts @@ -61,19 +61,18 @@ describe('RegisterEmailFormComponent', () => { jasmine.getEnv().allowRespy(true); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule], - declarations: [RegisterEmailFormComponent], - providers: [ - {provide: Router, useValue: router}, - {provide: EpersonRegistrationService, useValue: epersonRegistrationService}, - {provide: ConfigurationDataService, useValue: configurationDataService}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: CookieService, useValue: new CookieServiceMock()}, - {provide: GoogleRecaptchaService, useValue: googleRecaptchaService}, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule, RegisterEmailFormComponent], + providers: [ + { provide: Router, useValue: router }, + { provide: EpersonRegistrationService, useValue: epersonRegistrationService }, + { provide: ConfigurationDataService, useValue: configurationDataService }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: CookieService, useValue: new CookieServiceMock() }, + { provide: GoogleRecaptchaService, useValue: googleRecaptchaService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(RegisterEmailFormComponent); diff --git a/src/app/register-email-form/register-email-form.component.ts b/src/app/register-email-form/register-email-form.component.ts index df7e9bea5e..ac05d323bf 100644 --- a/src/app/register-email-form/register-email-form.component.ts +++ b/src/app/register-email-form/register-email-form.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit, Optional } from '@angular/core'; import {EpersonRegistrationService} from '../core/data/eperson-registration.service'; import {NotificationsService} from '../shared/notifications/notifications.service'; -import {TranslateService} from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import {Router} from '@angular/router'; -import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators, ValidatorFn } from '@angular/forms'; +import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators, ValidatorFn, FormsModule, ReactiveFormsModule } from '@angular/forms'; import {Registration} from '../core/shared/registration.model'; import {RemoteData} from '../core/data/remote-data'; import {ConfigurationDataService} from '../core/data/configuration-data.service'; @@ -17,13 +17,18 @@ import {AlertType} from '../shared/alert/alert-type'; import {KlaroService} from '../shared/cookies/klaro.service'; import {CookieService} from '../core/services/cookie.service'; import { Subscription } from 'rxjs'; +import { GoogleRecaptchaComponent } from '../shared/google-recaptcha/google-recaptcha.component'; +import { AlertComponent } from '../shared/alert/alert.component'; +import { NgIf, AsyncPipe } from '@angular/common'; export const TYPE_REQUEST_FORGOT = 'forgot'; export const TYPE_REQUEST_REGISTER = 'register'; @Component({ - selector: 'ds-register-email-form', - templateUrl: './register-email-form.component.html' + selector: 'ds-register-email-form', + templateUrl: './register-email-form.component.html', + standalone: true, + imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule] }) /** * Component responsible to render an email registration form. diff --git a/src/app/register-email-form/register-email-form.module.ts b/src/app/register-email-form/register-email-form.module.ts index a765759413..ce3724f3c1 100644 --- a/src/app/register-email-form/register-email-form.module.ts +++ b/src/app/register-email-form/register-email-form.module.ts @@ -4,17 +4,15 @@ import { SharedModule } from '../shared/shared.module'; import { RegisterEmailFormComponent } from './register-email-form.component'; @NgModule({ - imports: [ - CommonModule, - SharedModule - ], - declarations: [ - RegisterEmailFormComponent, - ], - providers: [], - exports: [ - RegisterEmailFormComponent, - ] + imports: [ + CommonModule, + SharedModule, + RegisterEmailFormComponent + ], + providers: [], + exports: [ + RegisterEmailFormComponent, + ] }) /** diff --git a/src/app/register-page/create-profile/create-profile.component.spec.ts b/src/app/register-page/create-profile/create-profile.component.spec.ts index d5a1fea8b2..1e64dbef57 100644 --- a/src/app/register-page/create-profile/create-profile.component.spec.ts +++ b/src/app/register-page/create-profile/create-profile.component.spec.ts @@ -128,19 +128,18 @@ describe('CreateProfileComponent', () => { }); TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule], - declarations: [CreateProfileComponent], - providers: [ - {provide: Router, useValue: router}, - {provide: ActivatedRoute, useValue: route}, - {provide: Store, useValue: store}, - {provide: EPersonDataService, useValue: ePersonDataService}, - {provide: UntypedFormBuilder, useValue: new UntypedFormBuilder()}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: EndUserAgreementService, useValue: endUserAgreementService}, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), ReactiveFormsModule, CreateProfileComponent], + providers: [ + { provide: Router, useValue: router }, + { provide: ActivatedRoute, useValue: route }, + { provide: Store, useValue: store }, + { provide: EPersonDataService, useValue: ePersonDataService }, + { provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: EndUserAgreementService, useValue: endUserAgreementService }, + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(CreateProfileComponent); diff --git a/src/app/register-page/create-profile/create-profile.component.ts b/src/app/register-page/create-profile/create-profile.component.ts index eaaa983a43..9080666f5d 100644 --- a/src/app/register-page/create-profile/create-profile.component.ts +++ b/src/app/register-page/create-profile/create-profile.component.ts @@ -3,8 +3,14 @@ import { ActivatedRoute, Router } from '@angular/router'; import { map } from 'rxjs/operators'; import { Registration } from '../../core/shared/registration.model'; import { Observable } from 'rxjs'; -import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; -import { TranslateService } from '@ngx-translate/core'; +import { + ReactiveFormsModule, + UntypedFormBuilder, + UntypedFormControl, + UntypedFormGroup, + Validators +} from '@angular/forms'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { EPersonDataService } from '../../core/eperson/eperson-data.service'; import { EPerson } from '../../core/eperson/models/eperson.model'; import { LangConfig } from '../../../config/lang-config.interface'; @@ -20,6 +26,10 @@ import { } from '../../core/end-user-agreement/end-user-agreement.service'; import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from '../../core/shared/operators'; import { CoreState } from '../../core/core-state.model'; +import { + ProfilePageSecurityFormComponent +} from '../../profile-page/profile-page-security-form/profile-page-security-form.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; /** * Component that renders the create profile page to be used by a user registering through a token @@ -27,7 +37,16 @@ import { CoreState } from '../../core/core-state.model'; @Component({ selector: 'ds-create-profile', styleUrls: ['./create-profile.component.scss'], - templateUrl: './create-profile.component.html' + templateUrl: './create-profile.component.html', + imports: [ + ProfilePageSecurityFormComponent, + TranslateModule, + NgIf, + AsyncPipe, + ReactiveFormsModule, + NgForOf + ], + standalone: true }) export class CreateProfileComponent implements OnInit { registration$: Observable; diff --git a/src/app/register-page/create-profile/themed-create-profile.component.ts b/src/app/register-page/create-profile/themed-create-profile.component.ts index cc968bfbe2..1966155f60 100644 --- a/src/app/register-page/create-profile/themed-create-profile.component.ts +++ b/src/app/register-page/create-profile/themed-create-profile.component.ts @@ -6,9 +6,10 @@ import { ThemedComponent } from '../../shared/theme-support/themed.component'; * Themed wrapper for CreateProfileComponent */ @Component({ - selector: 'ds-themed-create-profile', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html' + selector: 'ds-themed-create-profile', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCreateProfileComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/register-page/register-email/register-email.component.spec.ts b/src/app/register-page/register-email/register-email.component.spec.ts index 17ef8101ae..234951a6cc 100644 --- a/src/app/register-page/register-email/register-email.component.spec.ts +++ b/src/app/register-page/register-email/register-email.component.spec.ts @@ -12,10 +12,9 @@ describe('RegisterEmailComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, TranslateModule.forRoot(), ReactiveFormsModule], - declarations: [RegisterEmailComponent], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + imports: [CommonModule, TranslateModule.forRoot(), ReactiveFormsModule, RegisterEmailComponent], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(RegisterEmailComponent); diff --git a/src/app/register-page/register-email/register-email.component.ts b/src/app/register-page/register-email/register-email.component.ts index 228e8c56a0..2cb7a09cc6 100644 --- a/src/app/register-page/register-email/register-email.component.ts +++ b/src/app/register-page/register-email/register-email.component.ts @@ -1,10 +1,17 @@ import { Component } from '@angular/core'; -import { TYPE_REQUEST_REGISTER } from '../../register-email-form/register-email-form.component'; +import { + RegisterEmailFormComponent, + TYPE_REQUEST_REGISTER +} from '../../register-email-form/register-email-form.component'; @Component({ selector: 'ds-register-email', styleUrls: ['./register-email.component.scss'], - templateUrl: './register-email.component.html' + templateUrl: './register-email.component.html', + imports: [ + RegisterEmailFormComponent + ], + standalone: true }) /** * Component responsible the email registration step when registering as a new user diff --git a/src/app/register-page/register-email/themed-register-email.component.ts b/src/app/register-page/register-email/themed-register-email.component.ts index 6da6899d99..e56e2eba2c 100644 --- a/src/app/register-page/register-email/themed-register-email.component.ts +++ b/src/app/register-page/register-email/themed-register-email.component.ts @@ -6,9 +6,10 @@ import { RegisterEmailComponent } from './register-email.component'; * Themed wrapper for RegisterEmailComponent */ @Component({ - selector: 'ds-themed-register-email', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-register-email', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedRegisterEmailComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/register-page/register-page.module.ts b/src/app/register-page/register-page.module.ts index 6afb8154ea..ce29c7f8ae 100644 --- a/src/app/register-page/register-page.module.ts +++ b/src/app/register-page/register-page.module.ts @@ -10,20 +10,18 @@ import { ThemedCreateProfileComponent } from './create-profile/themed-create-pro import { ThemedRegisterEmailComponent } from './register-email/themed-register-email.component'; @NgModule({ - imports: [ - CommonModule, - SharedModule, - RegisterPageRoutingModule, - RegisterEmailFormModule, - ProfilePageModule, - ], - declarations: [ - RegisterEmailComponent, - ThemedRegisterEmailComponent, - CreateProfileComponent, - ThemedCreateProfileComponent - ], - providers: [] + imports: [ + CommonModule, + SharedModule, + RegisterPageRoutingModule, + RegisterEmailFormModule, + ProfilePageModule, + RegisterEmailComponent, + ThemedRegisterEmailComponent, + CreateProfileComponent, + ThemedCreateProfileComponent + ], + providers: [] }) /** diff --git a/src/app/request-copy/deny-request-copy/deny-request-copy.component.spec.ts b/src/app/request-copy/deny-request-copy/deny-request-copy.component.spec.ts index ef5f83e46b..9bcd49499a 100644 --- a/src/app/request-copy/deny-request-copy/deny-request-copy.component.spec.ts +++ b/src/app/request-copy/deny-request-copy/deny-request-copy.component.spec.ts @@ -99,9 +99,8 @@ describe('DenyRequestCopyComponent', () => { notificationsService = jasmine.createSpyObj('notificationsService', ['success', 'error']); return TestBed.configureTestingModule({ - declarations: [DenyRequestCopyComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), DenyRequestCopyComponent, VarDirective], + providers: [ { provide: Router, useValue: router }, { provide: ActivatedRoute, useValue: route }, { provide: AuthService, useValue: authService }, @@ -109,9 +108,9 @@ describe('DenyRequestCopyComponent', () => { { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: ItemRequestDataService, useValue: itemRequestService }, { provide: NotificationsService, useValue: notificationsService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/request-copy/deny-request-copy/deny-request-copy.component.ts b/src/app/request-copy/deny-request-copy/deny-request-copy.component.ts index 098c7a1efd..5fbd01ccec 100644 --- a/src/app/request-copy/deny-request-copy/deny-request-copy.component.ts +++ b/src/app/request-copy/deny-request-copy/deny-request-copy.component.ts @@ -8,7 +8,7 @@ import { } from '../../core/shared/operators'; import { RemoteData } from '../../core/data/remote-data'; import { AuthService } from '../../core/auth/auth.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { combineLatest as observableCombineLatest } from 'rxjs'; import { ItemDataService } from '../../core/data/item-data.service'; import { EPerson } from '../../core/eperson/models/eperson.model'; @@ -19,11 +19,17 @@ import { ItemRequestDataService } from '../../core/data/item-request-data.servic import { RequestCopyEmail } from '../email-request-copy/request-copy-email.model'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { redirectOn4xx } from '../../core/shared/authorized.operators'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { ThemedEmailRequestCopyComponent } from '../email-request-copy/themed-email-request-copy.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; @Component({ - selector: 'ds-deny-request-copy', - styleUrls: ['./deny-request-copy.component.scss'], - templateUrl: './deny-request-copy.component.html' + selector: 'ds-deny-request-copy', + styleUrls: ['./deny-request-copy.component.scss'], + templateUrl: './deny-request-copy.component.html', + standalone: true, + imports: [VarDirective, NgIf, ThemedEmailRequestCopyComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) /** * Component for denying an item request diff --git a/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts b/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts index 1539d49622..b4d799b561 100644 --- a/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts +++ b/src/app/request-copy/deny-request-copy/themed-deny-request-copy.component.ts @@ -7,9 +7,10 @@ import { DenyRequestCopyComponent } from './deny-request-copy.component'; * Themed wrapper for deny-request-copy.component */ @Component({ - selector: 'ds-themed-deny-request-copy', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html', + selector: 'ds-themed-deny-request-copy', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedDenyRequestCopyComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/request-copy/email-request-copy/email-request-copy.component.spec.ts b/src/app/request-copy/email-request-copy/email-request-copy.component.spec.ts index 3857c0d91b..8f6cf3b72c 100644 --- a/src/app/request-copy/email-request-copy/email-request-copy.component.spec.ts +++ b/src/app/request-copy/email-request-copy/email-request-copy.component.spec.ts @@ -17,13 +17,12 @@ describe('EmailRequestCopyComponent', () => { location = jasmine.createSpyObj('location', ['back']); TestBed.configureTestingModule({ - declarations: [EmailRequestCopyComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), EmailRequestCopyComponent, VarDirective], + providers: [ { provide: Location, useValue: location }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/request-copy/email-request-copy/email-request-copy.component.ts b/src/app/request-copy/email-request-copy/email-request-copy.component.ts index ab2c8b4526..aa2a2bcc7b 100644 --- a/src/app/request-copy/email-request-copy/email-request-copy.component.ts +++ b/src/app/request-copy/email-request-copy/email-request-copy.component.ts @@ -1,11 +1,15 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { RequestCopyEmail } from './request-copy-email.model'; -import { Location } from '@angular/common'; +import { Location, NgClass, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; @Component({ - selector: 'ds-email-request-copy', - styleUrls: ['./email-request-copy.component.scss'], - templateUrl: './email-request-copy.component.html' + selector: 'ds-email-request-copy', + styleUrls: ['./email-request-copy.component.scss'], + templateUrl: './email-request-copy.component.html', + standalone: true, + imports: [FormsModule, NgClass, NgIf, TranslateModule] }) /** * A form component for an email to send back to the user requesting an item diff --git a/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts b/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts index d010e43060..546cc9eb07 100644 --- a/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts +++ b/src/app/request-copy/email-request-copy/themed-email-request-copy.component.ts @@ -8,9 +8,10 @@ import { RequestCopyEmail } from './request-copy-email.model'; * Themed wrapper for email-request-copy.component */ @Component({ - selector: 'ds-themed-email-request-copy', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html', + selector: 'ds-themed-email-request-copy', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedEmailRequestCopyComponent extends ThemedComponent { /** diff --git a/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts b/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts index 5c37a86f24..e3be11611c 100644 --- a/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts +++ b/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.spec.ts @@ -73,16 +73,15 @@ describe('GrantDenyRequestCopyComponent', () => { }); TestBed.configureTestingModule({ - declarations: [GrantDenyRequestCopyComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), GrantDenyRequestCopyComponent, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: route }, { provide: AuthService, useValue: authService }, { provide: ItemDataService, useValue: itemDataService }, { provide: DSONameService, useValue: nameService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.ts b/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.ts index b130c23abe..a6d3b3c27c 100644 --- a/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.ts +++ b/src/app/request-copy/grant-deny-request-copy/grant-deny-request-copy.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, Router, RouterLink } from '@angular/router'; import { map, switchMap } from 'rxjs/operators'; import { ItemRequest } from '../../core/shared/item-request.model'; import { Observable } from 'rxjs'; @@ -15,11 +15,17 @@ import { ItemDataService } from '../../core/data/item-data.service'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; import { getItemPageRoute } from '../../item-page/item-page-routing-paths'; import { redirectOn4xx } from '../../core/shared/authorized.operators'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; @Component({ - selector: 'ds-grant-deny-request-copy', - styleUrls: ['./grant-deny-request-copy.component.scss'], - templateUrl: './grant-deny-request-copy.component.html' + selector: 'ds-grant-deny-request-copy', + styleUrls: ['./grant-deny-request-copy.component.scss'], + templateUrl: './grant-deny-request-copy.component.html', + standalone: true, + imports: [VarDirective, NgIf, RouterLink, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) /** * Component for an author to decide to grant or deny an item request diff --git a/src/app/request-copy/grant-request-copy/grant-request-copy.component.spec.ts b/src/app/request-copy/grant-request-copy/grant-request-copy.component.spec.ts index 32fef125ea..ac31a459b0 100644 --- a/src/app/request-copy/grant-request-copy/grant-request-copy.component.spec.ts +++ b/src/app/request-copy/grant-request-copy/grant-request-copy.component.spec.ts @@ -99,9 +99,8 @@ describe('GrantRequestCopyComponent', () => { notificationsService = jasmine.createSpyObj('notificationsService', ['success', 'error']); return TestBed.configureTestingModule({ - declarations: [GrantRequestCopyComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), GrantRequestCopyComponent, VarDirective], + providers: [ { provide: Router, useValue: router }, { provide: ActivatedRoute, useValue: route }, { provide: AuthService, useValue: authService }, @@ -109,9 +108,9 @@ describe('GrantRequestCopyComponent', () => { { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: ItemRequestDataService, useValue: itemRequestService }, { provide: NotificationsService, useValue: notificationsService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/request-copy/grant-request-copy/grant-request-copy.component.ts b/src/app/request-copy/grant-request-copy/grant-request-copy.component.ts index baf078df76..003a27dd36 100644 --- a/src/app/request-copy/grant-request-copy/grant-request-copy.component.ts +++ b/src/app/request-copy/grant-request-copy/grant-request-copy.component.ts @@ -8,16 +8,23 @@ import { } from '../../core/shared/operators'; import { RemoteData } from '../../core/data/remote-data'; import { AuthService } from '../../core/auth/auth.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { ItemRequestDataService } from '../../core/data/item-request-data.service'; import { RequestCopyEmail } from '../email-request-copy/request-copy-email.model'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { redirectOn4xx } from '../../core/shared/authorized.operators'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { FormsModule } from '@angular/forms'; +import { ThemedEmailRequestCopyComponent } from '../email-request-copy/themed-email-request-copy.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; @Component({ - selector: 'ds-grant-request-copy', - styleUrls: ['./grant-request-copy.component.scss'], - templateUrl: './grant-request-copy.component.html' + selector: 'ds-grant-request-copy', + styleUrls: ['./grant-request-copy.component.scss'], + templateUrl: './grant-request-copy.component.html', + standalone: true, + imports: [VarDirective, NgIf, ThemedEmailRequestCopyComponent, FormsModule, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) /** * Component for granting an item request diff --git a/src/app/request-copy/grant-request-copy/themed-grant-request-copy.component.ts b/src/app/request-copy/grant-request-copy/themed-grant-request-copy.component.ts index 625dcef57a..77b2d044f6 100644 --- a/src/app/request-copy/grant-request-copy/themed-grant-request-copy.component.ts +++ b/src/app/request-copy/grant-request-copy/themed-grant-request-copy.component.ts @@ -6,9 +6,10 @@ import { GrantRequestCopyComponent } from './grant-request-copy.component'; * Themed wrapper for grant-request-copy.component */ @Component({ - selector: 'ds-themed-grant-request-copy', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html', + selector: 'ds-themed-grant-request-copy', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedGrantRequestCopyComponent extends ThemedComponent { diff --git a/src/app/request-copy/request-copy.module.ts b/src/app/request-copy/request-copy.module.ts index 90d741a879..bfc57d7c44 100644 --- a/src/app/request-copy/request-copy.module.ts +++ b/src/app/request-copy/request-copy.module.ts @@ -11,24 +11,22 @@ import { GrantRequestCopyComponent } from './grant-request-copy/grant-request-co import { ThemedGrantRequestCopyComponent } from './grant-request-copy/themed-grant-request-copy.component'; @NgModule({ - imports: [ - CommonModule, - SharedModule, - RequestCopyRoutingModule - ], - declarations: [ - GrantDenyRequestCopyComponent, - DenyRequestCopyComponent, - ThemedDenyRequestCopyComponent, - EmailRequestCopyComponent, - ThemedEmailRequestCopyComponent, - GrantRequestCopyComponent, - ThemedGrantRequestCopyComponent, - ], - exports: [ - ThemedEmailRequestCopyComponent, - ], - providers: [] + imports: [ + CommonModule, + SharedModule, + RequestCopyRoutingModule, + GrantDenyRequestCopyComponent, + DenyRequestCopyComponent, + ThemedDenyRequestCopyComponent, + EmailRequestCopyComponent, + ThemedEmailRequestCopyComponent, + GrantRequestCopyComponent, + ThemedGrantRequestCopyComponent + ], + exports: [ + ThemedEmailRequestCopyComponent, + ], + providers: [] }) /** diff --git a/src/app/root.module.ts b/src/app/root.module.ts index a8af0ef5b5..3d5fb651d2 100644 --- a/src/app/root.module.ts +++ b/src/app/root.module.ts @@ -89,19 +89,17 @@ const EXPORTS = [ ]; @NgModule({ - imports: [ - ...IMPORTS - ], - providers: [ - ...PROVIDERS - ], - declarations: [ - ...DECLARATIONS, - ], - exports: [ - ...EXPORTS, - ...DECLARATIONS, - ] + imports: [ + ...IMPORTS, + ...DECLARATIONS + ], + providers: [ + ...PROVIDERS + ], + exports: [ + ...EXPORTS, + ...DECLARATIONS, + ] }) export class RootModule { diff --git a/src/app/root/root.component.spec.ts b/src/app/root/root.component.spec.ts index ab148b8ebd..60fdf8f6a9 100644 --- a/src/app/root/root.component.spec.ts +++ b/src/app/root/root.component.spec.ts @@ -34,19 +34,19 @@ describe('RootComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, NoopAnimationsModule, StoreModule.forRoot(authReducer, storeModuleConfig), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [RootComponent], // declare the test component - providers: [ + RootComponent + ], + providers: [ { provide: NativeWindowService, useValue: new NativeWindowRef() }, { provide: MetadataService, useValue: new MetadataServiceMock() }, { provide: Angulartics2DSpace, useValue: new AngularticsProviderMock() }, @@ -60,9 +60,9 @@ describe('RootComponent', () => { provideMockStore({ core: { auth: { loading: false } } } as any), RootComponent, RouteService - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/root/root.component.ts b/src/app/root/root.component.ts index 3c2d65fc1f..a2d2d72e47 100644 --- a/src/app/root/root.component.ts +++ b/src/app/root/root.component.ts @@ -1,6 +1,6 @@ import { map, startWith } from 'rxjs/operators'; import { Component, Inject, Input, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterOutlet } from '@angular/router'; import { combineLatest as combineLatestObservable, Observable, of } from 'rxjs'; import { Store } from '@ngrx/store'; @@ -20,12 +20,22 @@ import { slideSidebarPadding } from '../shared/animations/slide'; import { MenuID } from '../shared/menu/menu-id.model'; import { getPageInternalServerErrorRoute } from '../app-routing-paths'; import { hasValueOperator } from '../shared/empty.util'; +import { NotificationsBoardComponent } from '../shared/notifications/notifications-board/notifications-board.component'; +import { ThemedFooterComponent } from '../footer/themed-footer.component'; +import { ThemedLoadingComponent } from '../shared/loading/themed-loading.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { ThemedBreadcrumbsComponent } from '../breadcrumbs/themed-breadcrumbs.component'; +import { ThemedHeaderNavbarWrapperComponent } from '../header-nav-wrapper/themed-header-navbar-wrapper.component'; +import { SystemWideAlertBannerComponent } from '../system-wide-alert/alert-banner/system-wide-alert-banner.component'; +import { ThemedAdminSidebarComponent } from '../admin/admin-sidebar/themed-admin-sidebar.component'; @Component({ - selector: 'ds-root', - templateUrl: './root.component.html', - styleUrls: ['./root.component.scss'], - animations: [slideSidebarPadding], + selector: 'ds-root', + templateUrl: './root.component.html', + styleUrls: ['./root.component.scss'], + animations: [slideSidebarPadding], + standalone: true, + imports: [ThemedAdminSidebarComponent, SystemWideAlertBannerComponent, ThemedHeaderNavbarWrapperComponent, ThemedBreadcrumbsComponent, NgIf, ThemedLoadingComponent, RouterOutlet, ThemedFooterComponent, NotificationsBoardComponent, AsyncPipe] }) export class RootComponent implements OnInit { sidebarVisible: Observable; diff --git a/src/app/root/themed-root.component.ts b/src/app/root/themed-root.component.ts index 5dfa1edf31..31c044aa8d 100644 --- a/src/app/root/themed-root.component.ts +++ b/src/app/root/themed-root.component.ts @@ -3,9 +3,10 @@ import { RootComponent } from './root.component'; import { Component, Input } from '@angular/core'; @Component({ - selector: 'ds-themed-root', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-root', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedRootComponent extends ThemedComponent { /** diff --git a/src/app/search-navbar/search-navbar.component.spec.ts b/src/app/search-navbar/search-navbar.component.spec.ts index b67f5f0eb4..67ad7bc186 100644 --- a/src/app/search-navbar/search-navbar.component.spec.ts +++ b/src/app/search-navbar/search-navbar.component.spec.ts @@ -34,25 +34,24 @@ describe('SearchNavbarComponent', () => { paginationService = new PaginationServiceStub(); TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, BrowserAnimationsModule, RouterTestingModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [ - SearchNavbarComponent, - BrowserOnlyMockPipe, - ], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + SearchNavbarComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ { provide: SearchService, useValue: mockSearchService } - ] - }) + ] +}) .compileComponents(); })); diff --git a/src/app/search-navbar/search-navbar.component.ts b/src/app/search-navbar/search-navbar.component.ts index 98e64f6e10..02a49bafd5 100644 --- a/src/app/search-navbar/search-navbar.component.ts +++ b/src/app/search-navbar/search-navbar.component.ts @@ -1,17 +1,22 @@ import { Component, ElementRef, ViewChild } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; +import { UntypedFormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; import { SearchService } from '../core/shared/search/search.service'; import { expandSearchInput } from '../shared/animations/slide'; +import { BrowserOnlyPipe } from '../shared/utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { ClickOutsideDirective } from '../shared/utils/click-outside.directive'; /** * The search box in the header that expands on focus and collapses on focus out */ @Component({ - selector: 'ds-search-navbar', - templateUrl: './search-navbar.component.html', - styleUrls: ['./search-navbar.component.scss'], - animations: [expandSearchInput] + selector: 'ds-search-navbar', + templateUrl: './search-navbar.component.html', + styleUrls: ['./search-navbar.component.scss'], + animations: [expandSearchInput], + standalone: true, + imports: [ClickOutsideDirective, FormsModule, ReactiveFormsModule, TranslateModule, BrowserOnlyPipe] }) export class SearchNavbarComponent { diff --git a/src/app/search-navbar/themed-search-navbar.component.ts b/src/app/search-navbar/themed-search-navbar.component.ts index a90e782194..a65c56597e 100644 --- a/src/app/search-navbar/themed-search-navbar.component.ts +++ b/src/app/search-navbar/themed-search-navbar.component.ts @@ -3,9 +3,10 @@ import { SearchNavbarComponent } from './search-navbar.component'; import { Component } from '@angular/core'; @Component({ - selector: 'ds-themed-search-navbar', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-search-navbar', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedSearchNavbarComponent extends ThemedComponent { diff --git a/src/app/search-page/configuration-search-page.component.ts b/src/app/search-page/configuration-search-page.component.ts index 768149de6a..0dd050aac5 100644 --- a/src/app/search-page/configuration-search-page.component.ts +++ b/src/app/search-page/configuration-search-page.component.ts @@ -8,22 +8,32 @@ import { SearchConfigurationService } from '../core/shared/search/search-configu import { RouteService } from '../core/services/route.service'; import { SearchService } from '../core/shared/search/search.service'; import { Router } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; +import { SearchLabelsComponent } from '../shared/search/search-labels/search-labels.component'; +import { ThemedSearchFormComponent } from '../shared/search-form/themed-search-form.component'; +import { ThemedSearchSidebarComponent } from '../shared/search/search-sidebar/themed-search-sidebar.component'; +import { ThemedSearchResultsComponent } from '../shared/search/search-results/themed-search-results.component'; +import { ViewModeSwitchComponent } from '../shared/view-mode-switch/view-mode-switch.component'; +import { PageWithSidebarComponent } from '../shared/sidebar/page-with-sidebar.component'; +import { NgIf, NgTemplateOutlet, AsyncPipe } from '@angular/common'; /** * This component renders a search page using a configuration as input. */ @Component({ - selector: 'ds-configuration-search-page', - styleUrls: ['../shared/search/search.component.scss'], - templateUrl: '../shared/search/search.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, - animations: [pushInOut], - providers: [ - { - provide: SEARCH_CONFIG_SERVICE, - useClass: SearchConfigurationService - } - ] + selector: 'ds-configuration-search-page', + styleUrls: ['../shared/search/search.component.scss'], + templateUrl: '../shared/search/search.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, + animations: [pushInOut], + providers: [ + { + provide: SEARCH_CONFIG_SERVICE, + useClass: SearchConfigurationService + } + ], + standalone: true, + imports: [NgIf, NgTemplateOutlet, PageWithSidebarComponent, ViewModeSwitchComponent, ThemedSearchResultsComponent, ThemedSearchSidebarComponent, ThemedSearchFormComponent, SearchLabelsComponent, AsyncPipe, TranslateModule] }) export class ConfigurationSearchPageComponent extends SearchComponent { diff --git a/src/app/search-page/search-page.component.ts b/src/app/search-page/search-page.component.ts index 38647b779b..2b8ac63640 100644 --- a/src/app/search-page/search-page.component.ts +++ b/src/app/search-page/search-page.component.ts @@ -1,16 +1,19 @@ import { Component } from '@angular/core'; import { SEARCH_CONFIG_SERVICE } from '../my-dspace-page/my-dspace-page.component'; import { SearchConfigurationService } from '../core/shared/search/search-configuration.service'; +import { ThemedSearchComponent } from '../shared/search/themed-search.component'; @Component({ - selector: 'ds-search-page', - templateUrl: './search-page.component.html', - providers: [ - { - provide: SEARCH_CONFIG_SERVICE, - useClass: SearchConfigurationService - } - ] + selector: 'ds-search-page', + templateUrl: './search-page.component.html', + providers: [ + { + provide: SEARCH_CONFIG_SERVICE, + useClass: SearchConfigurationService + } + ], + standalone: true, + imports: [ThemedSearchComponent] }) /** * This component represents the whole search page diff --git a/src/app/search-page/search-page.module.ts b/src/app/search-page/search-page.module.ts index cc76d0427d..df5d8fbeb9 100644 --- a/src/app/search-page/search-page.module.ts +++ b/src/app/search-page/search-page.module.ts @@ -19,23 +19,23 @@ const components = [ ]; @NgModule({ - imports: [ - CommonModule, - SearchModule, - SharedModule.withEntryComponents(), - CoreModule.forRoot(), - StatisticsModule.forRoot(), - JournalEntitiesModule.withEntryComponents(), - ResearchEntitiesModule.withEntryComponents() - ], - declarations: components, - providers: [ - SidebarService, - SearchFilterService, - ConfigurationSearchPageGuard, - SearchConfigurationService - ], - exports: components + imports: [ + CommonModule, + SearchModule, + SharedModule.withEntryComponents(), + CoreModule.forRoot(), + StatisticsModule.forRoot(), + JournalEntitiesModule.withEntryComponents(), + ResearchEntitiesModule.withEntryComponents(), + ...components + ], + providers: [ + SidebarService, + SearchFilterService, + ConfigurationSearchPageGuard, + SearchConfigurationService + ], + exports: components }) /** diff --git a/src/app/search-page/themed-configuration-search-page.component.ts b/src/app/search-page/themed-configuration-search-page.component.ts index e367ee5238..45125c2e7f 100644 --- a/src/app/search-page/themed-configuration-search-page.component.ts +++ b/src/app/search-page/themed-configuration-search-page.component.ts @@ -8,9 +8,10 @@ import { Context } from '../core/shared/context.model'; * Themed wrapper for ConfigurationSearchPageComponent */ @Component({ - selector: 'ds-themed-configuration-search-page', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-configuration-search-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedConfigurationSearchPageComponent extends ThemedComponent { /** diff --git a/src/app/search-page/themed-search-page.component.ts b/src/app/search-page/themed-search-page.component.ts index 12acd6174c..afc2ec3943 100644 --- a/src/app/search-page/themed-search-page.component.ts +++ b/src/app/search-page/themed-search-page.component.ts @@ -6,9 +6,10 @@ import { SearchPageComponent } from './search-page.component'; * Themed wrapper for SearchPageComponent */ @Component({ - selector: 'ds-themed-search-page', - styleUrls: [], - templateUrl: '../shared/theme-support/themed.component.html', + selector: 'ds-themed-search-page', + styleUrls: [], + templateUrl: '../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedSearchPageComponent extends ThemedComponent { diff --git a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts index 964eb30de2..aec8e8edcf 100644 --- a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts +++ b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.spec.ts @@ -16,9 +16,8 @@ describe('AccessControlArrayFormComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ CommonModule, FormsModule, SharedBrowseByModule, TranslateModule.forRoot(), NgbDatepickerModule ], - declarations: [ AccessControlArrayFormComponent, ToDatePipe ] - }) + imports: [CommonModule, FormsModule, SharedBrowseByModule, TranslateModule.forRoot(), NgbDatepickerModule, AccessControlArrayFormComponent, ToDatePipe] +}) .compileComponents(); }); diff --git a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts index 227de596ff..3b00349685 100644 --- a/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts +++ b/src/app/shared/access-control-form-container/access-control-array-form/access-control-array-form.component.ts @@ -1,13 +1,19 @@ import {Component, Input, OnInit, ViewChild} from '@angular/core'; -import {NgForm} from '@angular/forms'; +import { NgForm, FormsModule } from '@angular/forms'; import {AccessesConditionOption} from '../../../core/config/models/config-accesses-conditions-options.model'; import {dateToISOFormat} from '../../date.util'; +import { ToDatePipe } from './to-date.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgFor } from '@angular/common'; @Component({ - selector: 'ds-access-control-array-form', - templateUrl: './access-control-array-form.component.html', - styleUrls: ['./access-control-array-form.component.scss'], - exportAs: 'accessControlArrayForm' + selector: 'ds-access-control-array-form', + templateUrl: './access-control-array-form.component.html', + styleUrls: ['./access-control-array-form.component.scss'], + exportAs: 'accessControlArrayForm', + standalone: true, + imports: [FormsModule, NgIf, NgFor, NgbDatepickerModule, TranslateModule, ToDatePipe] }) export class AccessControlArrayFormComponent implements OnInit { @Input() dropdownOptions: AccessesConditionOption[] = []; diff --git a/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts b/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts index 203d12a59d..e2b23bb83c 100644 --- a/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts +++ b/src/app/shared/access-control-form-container/access-control-array-form/to-date.pipe.ts @@ -2,9 +2,10 @@ import {Pipe, PipeTransform} from '@angular/core'; import {NgbDateStruct} from '@ng-bootstrap/ng-bootstrap/datepicker/ngb-date-struct'; @Pipe({ - // eslint-disable-next-line @angular-eslint/pipe-prefix - name: 'toDate', - pure: false + // eslint-disable-next-line @angular-eslint/pipe-prefix + name: 'toDate', + pure: false, + standalone: true }) export class ToDatePipe implements PipeTransform { transform(dateValue: string | null): NgbDateStruct | null { diff --git a/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts b/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts index 4d02f7a52d..3104f620e9 100644 --- a/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts +++ b/src/app/shared/access-control-form-container/access-control-form-container.component.spec.ts @@ -25,7 +25,16 @@ describe('AccessControlFormContainerComponent', () => { // Mock NgbModal - @Component({selector: 'ds-ngb-modal', template: ''}) + @Component({ + selector: 'ds-ngb-modal', template: '', + standalone: true, + imports: [CommonModule, + FormsModule, + SharedBrowseByModule, + AccessControlFormModule, + NgbDatepickerModule, + UiSwitchModule] +}) class MockNgbModalComponent { } @@ -52,23 +61,23 @@ describe('AccessControlFormContainerComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [AccessControlFormContainerComponent, MockNgbModalComponent], - imports: [ + imports: [ CommonModule, FormsModule, SharedBrowseByModule, AccessControlFormModule, TranslateModule.forRoot(), NgbDatepickerModule, - UiSwitchModule - ], - providers: [ - {provide: BulkAccessControlService, useValue: mockBulkAccessControlService}, - {provide: BulkAccessConfigDataService, useValue: mockBulkAccessConfigDataService}, - {provide: SelectableListService, useValue: mockSelectableListService}, - {provide: NgbModal, useValue: mockNgbModal}, - ], - }).compileComponents(); + UiSwitchModule, + AccessControlFormContainerComponent, MockNgbModalComponent + ], + providers: [ + { provide: BulkAccessControlService, useValue: mockBulkAccessControlService }, + { provide: BulkAccessConfigDataService, useValue: mockBulkAccessConfigDataService }, + { provide: SelectableListService, useValue: mockSelectableListService }, + { provide: NgbModal, useValue: mockNgbModal }, + ] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/shared/access-control-form-container/access-control-form-container.component.ts b/src/app/shared/access-control-form-container/access-control-form-container.component.ts index cddd1b1a29..9e0421db90 100644 --- a/src/app/shared/access-control-form-container/access-control-form-container.component.ts +++ b/src/app/shared/access-control-form-container/access-control-form-container.component.ts @@ -19,12 +19,19 @@ import { AlertType } from '../alert/alert-type'; import { createAccessControlInitialFormState } from './access-control-form-container-intial-state'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; +import { UiSwitchModule } from 'ngx-ui-switch'; +import { AlertComponent } from '../alert/alert.component'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-access-control-form-container', - templateUrl: './access-control-form-container.component.html', - styleUrls: [ './access-control-form-container.component.scss' ], - exportAs: 'dsAccessControlForm' + selector: 'ds-access-control-form-container', + templateUrl: './access-control-form-container.component.html', + styleUrls: ['./access-control-form-container.component.scss'], + exportAs: 'dsAccessControlForm', + standalone: true, + imports: [NgIf, AlertComponent, UiSwitchModule, FormsModule, AccessControlArrayFormComponent, AsyncPipe, TranslateModule] }) export class AccessControlFormContainerComponent implements OnDestroy { diff --git a/src/app/shared/access-control-form-container/access-control-form.module.ts b/src/app/shared/access-control-form-container/access-control-form.module.ts index 3bbdb3ab5d..c4b2745f9b 100644 --- a/src/app/shared/access-control-form-container/access-control-form.module.ts +++ b/src/app/shared/access-control-form-container/access-control-form.module.ts @@ -14,19 +14,17 @@ import {NgbDatepickerModule} from '@ng-bootstrap/ng-bootstrap'; import {ToDatePipe} from './access-control-array-form/to-date.pipe'; @NgModule({ - imports: [ - CommonModule, - SharedModule, - TranslateModule, - UiSwitchModule, - NgbDatepickerModule - ], - declarations: [ - AccessControlFormContainerComponent, - AccessControlArrayFormComponent, - ItemAccessControlSelectBitstreamsModalComponent, - ToDatePipe - ], - exports: [ AccessControlFormContainerComponent, AccessControlArrayFormComponent ], + imports: [ + CommonModule, + SharedModule, + TranslateModule, + UiSwitchModule, + NgbDatepickerModule, + AccessControlFormContainerComponent, + AccessControlArrayFormComponent, + ItemAccessControlSelectBitstreamsModalComponent, + ToDatePipe + ], + exports: [AccessControlFormContainerComponent, AccessControlArrayFormComponent] }) export class AccessControlFormModule {} diff --git a/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.spec.ts b/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.spec.ts index f60d9a70e7..410596d0ba 100644 --- a/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.spec.ts +++ b/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.spec.ts @@ -8,8 +8,8 @@ xdescribe('ItemAccessControlSelectBitstreamsModalComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ ItemAccessControlSelectBitstreamsModalComponent ] - }) + imports: [ItemAccessControlSelectBitstreamsModalComponent] +}) .compileComponents(); }); diff --git a/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts b/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts index 617803a0c4..cd9a23bd0f 100644 --- a/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts +++ b/src/app/shared/access-control-form-container/item-access-control-select-bitstreams-modal/item-access-control-select-bitstreams-modal.component.ts @@ -9,16 +9,20 @@ import { PaginationComponentOptions } from '../../pagination/pagination-componen import { Item } from '../../../core/shared/item.model'; import { BitstreamDataService } from '../../../core/data/bitstream-data.service'; import { PaginationService } from '../../../core/pagination/pagination.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { hasValue } from '../../empty.util'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; +import { ObjectCollectionComponent } from '../../object-collection/object-collection.component'; +import { NgIf, AsyncPipe } from '@angular/common'; export const ITEM_ACCESS_CONTROL_SELECT_BITSTREAMS_LIST_ID = 'item-access-control-select-bitstreams'; @Component({ - selector: 'ds-item-access-control-select-bitstreams-modal', - templateUrl: './item-access-control-select-bitstreams-modal.component.html', - styleUrls: [ './item-access-control-select-bitstreams-modal.component.scss' ] + selector: 'ds-item-access-control-select-bitstreams-modal', + templateUrl: './item-access-control-select-bitstreams-modal.component.html', + styleUrls: ['./item-access-control-select-bitstreams-modal.component.scss'], + standalone: true, + imports: [NgIf, ObjectCollectionComponent, AsyncPipe, TranslateModule] }) export class ItemAccessControlSelectBitstreamsModalComponent implements OnInit { diff --git a/src/app/shared/alert/alert.component.spec.ts b/src/app/shared/alert/alert.component.spec.ts index 11411c7de0..b251499057 100644 --- a/src/app/shared/alert/alert.component.spec.ts +++ b/src/app/shared/alert/alert.component.spec.ts @@ -18,22 +18,20 @@ describe('AlertComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ BrowserModule, CommonModule, NoopAnimationsModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), AlertComponent, TestComponent - ], - providers: [ + ], + providers: [ ChangeDetectorRef, AlertComponent - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents().then(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents().then(); })); describe('', () => { @@ -103,8 +101,11 @@ describe('AlertComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [BrowserModule, + CommonModule] }) class TestComponent { diff --git a/src/app/shared/alert/alert.component.ts b/src/app/shared/alert/alert.component.ts index 07a8efbd7d..18c2e52f67 100644 --- a/src/app/shared/alert/alert.component.ts +++ b/src/app/shared/alert/alert.component.ts @@ -3,20 +3,24 @@ import { trigger } from '@angular/animations'; import { AlertType } from './alert-type'; import { fadeOutLeave, fadeOutState } from '../animations/fade'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; /** * This component allow to create div that uses the Bootstrap's Alerts component. */ @Component({ - selector: 'ds-alert', - encapsulation: ViewEncapsulation.None, - animations: [ - trigger('enterLeave', [ - fadeOutLeave, fadeOutState, - ]) - ], - templateUrl: './alert.component.html', - styleUrls: ['./alert.component.scss'] + selector: 'ds-alert', + encapsulation: ViewEncapsulation.None, + animations: [ + trigger('enterLeave', [ + fadeOutLeave, fadeOutState, + ]) + ], + templateUrl: './alert.component.html', + styleUrls: ['./alert.component.scss'], + standalone: true, + imports: [NgIf, TranslateModule] }) export class AlertComponent { @@ -33,7 +37,7 @@ export class AlertComponent { /** * The alert type */ - @Input() type: AlertType; + @Input() type: AlertType | string; /** * An event fired when alert is dismissed. diff --git a/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts b/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts index 58a1edfabd..587e1c9f52 100644 --- a/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts +++ b/src/app/shared/auth-nav-menu/auth-nav-menu.component.spec.ts @@ -67,28 +67,26 @@ describe('AuthNavMenuComponent', () => { // refine the test module by declaring the test component TestBed.configureTestingModule({ - imports: [ - NoopAnimationsModule, - StoreModule.forRoot(authReducer, { + imports: [ + NoopAnimationsModule, + StoreModule.forRoot(authReducer, { runtimeChecks: { - strictStateImmutability: false, - strictActionImmutability: false + strictStateImmutability: false, + strictActionImmutability: false } - }), - TranslateModule.forRoot() - ], - declarations: [ - AuthNavMenuComponent, - BrowserOnlyMockPipe - ], - providers: [ - { provide: HostWindowService, useValue: window }, - { provide: AuthService, useValue: authService } - ], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA - ] - }) + }), + TranslateModule.forRoot(), + AuthNavMenuComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ + { provide: HostWindowService, useValue: window }, + { provide: AuthService, useValue: authService } + ], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA + ] +}) .compileComponents(); })); @@ -262,27 +260,25 @@ describe('AuthNavMenuComponent', () => { // refine the test module by declaring the test component TestBed.configureTestingModule({ - imports: [ - NoopAnimationsModule, - StoreModule.forRoot(authReducer, { + imports: [ + NoopAnimationsModule, + StoreModule.forRoot(authReducer, { runtimeChecks: { - strictStateImmutability: false, - strictActionImmutability: false + strictStateImmutability: false, + strictActionImmutability: false } - }), - TranslateModule.forRoot() - ], - declarations: [ - AuthNavMenuComponent - ], - providers: [ - { provide: HostWindowService, useValue: window }, - { provide: AuthService, useValue: authService } - ], - schemas: [ - CUSTOM_ELEMENTS_SCHEMA - ] - }) + }), + TranslateModule.forRoot(), + AuthNavMenuComponent + ], + providers: [ + { provide: HostWindowService, useValue: window }, + { provide: AuthService, useValue: authService } + ], + schemas: [ + CUSTOM_ELEMENTS_SCHEMA + ] +}) .compileComponents(); })); diff --git a/src/app/shared/auth-nav-menu/auth-nav-menu.component.ts b/src/app/shared/auth-nav-menu/auth-nav-menu.component.ts index 37a45e1b20..0faa32e235 100644 --- a/src/app/shared/auth-nav-menu/auth-nav-menu.component.ts +++ b/src/app/shared/auth-nav-menu/auth-nav-menu.component.ts @@ -12,12 +12,21 @@ import { isNotUndefined } from '../empty.util'; import { isAuthenticated, isAuthenticationLoading } from '../../core/auth/selectors'; import { EPerson } from '../../core/eperson/models/eperson.model'; import { AuthService, LOGIN_ROUTE, LOGOUT_ROUTE } from '../../core/auth/auth.service'; +import { BrowserOnlyPipe } from '../utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { UserMenuComponent } from './user-menu/user-menu.component'; +import { RouterLink, RouterLinkActive } from '@angular/router'; +import { LogInComponent } from '../log-in/log-in.component'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-auth-nav-menu', - templateUrl: './auth-nav-menu.component.html', - styleUrls: ['./auth-nav-menu.component.scss'], - animations: [fadeInOut, fadeOut] + selector: 'ds-auth-nav-menu', + templateUrl: './auth-nav-menu.component.html', + styleUrls: ['./auth-nav-menu.component.scss'], + animations: [fadeInOut, fadeOut], + standalone: true, + imports: [NgClass, NgIf, NgbDropdownModule, LogInComponent, RouterLink, RouterLinkActive, UserMenuComponent, AsyncPipe, TranslateModule, BrowserOnlyPipe] }) export class AuthNavMenuComponent implements OnInit { /** diff --git a/src/app/shared/auth-nav-menu/themed-auth-nav-menu.component.ts b/src/app/shared/auth-nav-menu/themed-auth-nav-menu.component.ts index 14ea45d236..3c61f2f970 100644 --- a/src/app/shared/auth-nav-menu/themed-auth-nav-menu.component.ts +++ b/src/app/shared/auth-nav-menu/themed-auth-nav-menu.component.ts @@ -6,9 +6,10 @@ import { AuthNavMenuComponent } from './auth-nav-menu.component'; * Themed wrapper for {@link AuthNavMenuComponent} */ @Component({ - selector: 'ds-themed-auth-nav-menu', - styleUrls: [], - templateUrl: '../theme-support/themed.component.html', + selector: 'ds-themed-auth-nav-menu', + styleUrls: [], + templateUrl: '../theme-support/themed.component.html', + standalone: true }) export class ThemedAuthNavMenuComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.spec.ts b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.spec.ts index 5576b942b3..164bfbc34f 100644 --- a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.spec.ts +++ b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.spec.ts @@ -54,30 +54,28 @@ describe('UserMenuComponent', () => { beforeEach(waitForAsync(() => { serviceInit(); TestBed.configureTestingModule({ - imports: [ + imports: [ StoreModule.forRoot(authReducer, { - runtimeChecks: { - strictStateImmutability: false, - strictActionImmutability: false - } + runtimeChecks: { + strictStateImmutability: false, + strictActionImmutability: false + } }), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - providers: [ - { provide: AuthService, useValue: authService } - ], - declarations: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), UserMenuComponent - ], - schemas: [ + ], + providers: [ + { provide: AuthService, useValue: authService } + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); diff --git a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts index dcf12fb47b..6c7a99a600 100644 --- a/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts +++ b/src/app/shared/auth-nav-menu/user-menu/user-menu.component.ts @@ -10,14 +10,21 @@ import { MYDSPACE_ROUTE } from '../../../my-dspace-page/my-dspace-page.component import { AuthService } from '../../../core/auth/auth.service'; import { getProfileModuleRoute, getSubscriptionsModuleRoute } from '../../../app-routing-paths'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { LogOutComponent } from '../../log-out/log-out.component'; +import { RouterLinkActive, RouterLink } from '@angular/router'; +import { ThemedLoadingComponent } from '../../loading/themed-loading.component'; +import { NgIf, NgClass, AsyncPipe } from '@angular/common'; /** * This component represents the user nav menu. */ @Component({ - selector: 'ds-user-menu', - templateUrl: './user-menu.component.html', - styleUrls: ['./user-menu.component.scss'] + selector: 'ds-user-menu', + templateUrl: './user-menu.component.html', + styleUrls: ['./user-menu.component.scss'], + standalone: true, + imports: [NgIf, ThemedLoadingComponent, RouterLinkActive, NgClass, RouterLink, LogOutComponent, AsyncPipe, TranslateModule] }) export class UserMenuComponent implements OnInit { diff --git a/src/app/shared/browse-by/browse-by.component.spec.ts b/src/app/shared/browse-by/browse-by.component.spec.ts index 9317a68007..f4f684a360 100644 --- a/src/app/shared/browse-by/browse-by.component.spec.ts +++ b/src/app/shared/browse-by/browse-by.component.spec.ts @@ -115,23 +115,23 @@ describe('BrowseByComponent', () => { beforeEach(waitForAsync(() => { themeService = getMockThemeService('dspace'); TestBed.configureTestingModule({ - imports: [ + imports: [ BrowseByRoutingModule, AccessControlRoutingModule, CommonModule, SharedModule, NgbModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), RouterTestingModule, - NoopAnimationsModule - ], - declarations: [BrowseByComponent], - providers: [ + NoopAnimationsModule, + BrowseByComponent + ], + providers: [ { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: LinkHeadService, useValue: linkHeadService }, @@ -139,12 +139,12 @@ describe('BrowseByComponent', () => { { provide: PaginationService, useValue: paginationService }, { provide: MockThemedBrowseEntryListElementComponent }, { provide: ThemeService, useValue: themeService }, - { provide: RouteService, useValue: routeServiceStub}, + { provide: RouteService, useValue: routeServiceStub }, { provide: SelectableListService, useValue: {} }, { provide: HostWindowService, useValue: new HostWindowServiceStub(800) }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); fixture = TestBed.createComponent(BrowseByComponent); comp = fixture.componentInstance; comp.paginationConfig = paginationConfig; diff --git a/src/app/shared/browse-by/browse-by.component.ts b/src/app/shared/browse-by/browse-by.component.ts index 0dc20033f8..ec1d9871a8 100644 --- a/src/app/shared/browse-by/browse-by.component.ts +++ b/src/app/shared/browse-by/browse-by.component.ts @@ -12,16 +12,24 @@ import { ViewMode } from '../../core/shared/view-mode.model'; import { RouteService } from '../../core/services/route.service'; import { map } from 'rxjs/operators'; import { hasValue } from '../empty.util'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; +import { ErrorComponent } from '../error/error.component'; +import { ThemedLoadingComponent } from '../loading/themed-loading.component'; +import { ObjectCollectionComponent } from '../object-collection/object-collection.component'; +import { ThemedResultsBackButtonComponent } from '../results-back-button/themed-results-back-button.component'; +import { NgClass, NgComponentOutlet, NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../utils/var.directive'; @Component({ - selector: 'ds-browse-by', - styleUrls: ['./browse-by.component.scss'], - templateUrl: './browse-by.component.html', - animations: [ - fadeIn, - fadeInOut - ] + selector: 'ds-browse-by', + styleUrls: ['./browse-by.component.scss'], + templateUrl: './browse-by.component.html', + animations: [ + fadeIn, + fadeInOut + ], + standalone: true, + imports: [VarDirective, NgClass, NgComponentOutlet, NgIf, ThemedResultsBackButtonComponent, ObjectCollectionComponent, ThemedLoadingComponent, ErrorComponent, AsyncPipe, TranslateModule] }) /** * Component to display a browse-by page for any ListableObject diff --git a/src/app/shared/browse-by/shared-browse-by.module.ts b/src/app/shared/browse-by/shared-browse-by.module.ts index ae42576e9b..d3692b7fc6 100644 --- a/src/app/shared/browse-by/shared-browse-by.module.ts +++ b/src/app/shared/browse-by/shared-browse-by.module.ts @@ -7,19 +7,17 @@ import { BrowseByRoutingModule } from '../../browse-by/browse-by-routing.module' import { AccessControlRoutingModule } from '../../access-control/access-control-routing.module'; @NgModule({ - declarations: [ - BrowseByComponent, -], - imports: [ - ResultsBackButtonModule, - BrowseByRoutingModule, - AccessControlRoutingModule, - CommonModule, - SharedModule, - ], - exports: [ - BrowseByComponent, - SharedModule, - ] + imports: [ + ResultsBackButtonModule, + BrowseByRoutingModule, + AccessControlRoutingModule, + CommonModule, + SharedModule, + BrowseByComponent + ], + exports: [ + BrowseByComponent, + SharedModule, + ] }) export class SharedBrowseByModule { } diff --git a/src/app/shared/collection-dropdown/collection-dropdown.component.spec.ts b/src/app/shared/collection-dropdown/collection-dropdown.component.spec.ts index 2dc1ee433c..84114a0366 100644 --- a/src/app/shared/collection-dropdown/collection-dropdown.component.spec.ts +++ b/src/app/shared/collection-dropdown/collection-dropdown.component.spec.ts @@ -113,22 +113,22 @@ describe('CollectionDropdownComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [CollectionDropdownComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + CollectionDropdownComponent + ], + providers: [ { provide: CollectionDataService, useValue: collectionDataServiceMock }, { provide: ElementRef, useClass: MockElementRef }, ChangeDetectorRef - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/collection-dropdown/collection-dropdown.component.ts b/src/app/shared/collection-dropdown/collection-dropdown.component.ts index 713b32fabe..da40ac36ca 100644 --- a/src/app/shared/collection-dropdown/collection-dropdown.component.ts +++ b/src/app/shared/collection-dropdown/collection-dropdown.component.ts @@ -9,7 +9,7 @@ import { OnInit, Output } from '@angular/core'; -import { UntypedFormControl } from '@angular/forms'; +import { UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BehaviorSubject, from as observableFrom, Observable, of as observableOf, Subscription } from 'rxjs'; import { debounceTime, distinctUntilChanged, map, mergeMap, reduce, startWith, switchMap, take } from 'rxjs/operators'; @@ -26,6 +26,10 @@ import { } from '../../core/shared/operators'; import { FindListOptions } from '../../core/data/find-list-options.model'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../loading/themed-loading.component'; +import { InfiniteScrollModule } from 'ngx-infinite-scroll'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; /** * An interface to represent a collection entry @@ -45,9 +49,11 @@ export interface CollectionListEntry { } @Component({ - selector: 'ds-collection-dropdown', - templateUrl: './collection-dropdown.component.html', - styleUrls: ['./collection-dropdown.component.scss'] + selector: 'ds-collection-dropdown', + templateUrl: './collection-dropdown.component.html', + styleUrls: ['./collection-dropdown.component.scss'], + standalone: true, + imports: [NgIf, FormsModule, ReactiveFormsModule, InfiniteScrollModule, NgFor, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) export class CollectionDropdownComponent implements OnInit, OnDestroy { diff --git a/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts b/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts index 3fb338186f..d6c979f47a 100644 --- a/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts +++ b/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts @@ -3,9 +3,10 @@ import { ThemedComponent } from '../theme-support/themed.component'; import { Component, Input, Output, EventEmitter } from '@angular/core'; @Component({ - selector: 'ds-themed-collection-dropdown', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-collection-dropdown', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedCollectionDropdownComponent extends ThemedComponent { diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts index 3f74f05118..2b7ef7b9a4 100644 --- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts +++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.spec.ts @@ -78,18 +78,17 @@ describe('ComColFormComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule], - declarations: [ComColFormComponent, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule, ComColFormComponent, VarDirective], + providers: [ { provide: Location, useValue: locationStub }, { provide: DynamicFormService, useValue: formServiceStub }, { provide: NotificationsService, useValue: notificationsService }, { provide: AuthService, useValue: new AuthServiceMock() }, { provide: RequestService, useValue: requestServiceStub }, { provide: ObjectCacheService, useValue: objectCacheStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); describe('when the dso doesn\'t contain an ID (newly created)', () => { diff --git a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts index 631a9f0b19..8de4a3f22a 100644 --- a/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts +++ b/src/app/shared/comcol/comcol-forms/comcol-form/comcol-form.component.ts @@ -1,7 +1,7 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { DynamicFormControlModel, DynamicFormService, DynamicInputModel } from '@ng-dynamic-forms/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { FileUploader } from 'ng2-file-upload'; import { BehaviorSubject, combineLatest as observableCombineLatest, Subscription } from 'rxjs'; import { AuthService } from '../../../../core/auth/auth.service'; @@ -22,6 +22,10 @@ import { UploaderComponent } from '../../../upload/uploader/uploader.component'; import { Operation } from 'fast-json-patch'; import { NoContent } from '../../../../core/shared/NoContent.model'; import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; +import { FormComponent } from '../../../form/form.component'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; +import { ComcolPageLogoComponent } from '../../comcol-page-logo/comcol-page-logo.component'; +import { VarDirective } from '../../../utils/var.directive'; /** * A form for creating and editing Communities or Collections @@ -29,7 +33,18 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; @Component({ selector: 'ds-comcol-form', styleUrls: ['./comcol-form.component.scss'], - templateUrl: './comcol-form.component.html' + templateUrl: './comcol-form.component.html', + imports: [ + FormComponent, + TranslateModule, + UploaderComponent, + AsyncPipe, + ComcolPageLogoComponent, + NgIf, + NgClass, + VarDirective + ], + standalone: true }) export class ComColFormComponent implements OnInit, OnDestroy { diff --git a/src/app/shared/comcol/comcol-forms/create-comcol-page/create-comcol-page.component.ts b/src/app/shared/comcol/comcol-forms/create-comcol-page/create-comcol-page.component.ts index 9034bffe8e..87bfc20526 100644 --- a/src/app/shared/comcol/comcol-forms/create-comcol-page/create-comcol-page.component.ts +++ b/src/app/shared/comcol/comcol-forms/create-comcol-page/create-comcol-page.component.ts @@ -21,8 +21,9 @@ import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; * Component representing the create page for communities and collections */ @Component({ - selector: 'ds-create-comcol', - template: '' + selector: 'ds-create-comcol', + template: '', + standalone: true }) export class CreateComColPageComponent implements OnInit { /** diff --git a/src/app/shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts b/src/app/shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts index c56d0e02ae..e28be376cf 100644 --- a/src/app/shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts +++ b/src/app/shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts @@ -16,8 +16,9 @@ import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; * Component representing the delete page for communities and collections */ @Component({ - selector: 'ds-delete-comcol', - template: '' + selector: 'ds-delete-comcol', + template: '', + standalone: true }) export class DeleteComColPageComponent implements OnInit { /** diff --git a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-metadata/comcol-metadata.component.ts b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-metadata/comcol-metadata.component.ts index d59030251d..54338393c6 100644 --- a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-metadata/comcol-metadata.component.ts +++ b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-metadata/comcol-metadata.component.ts @@ -14,8 +14,9 @@ import { Community } from '../../../../../core/shared/community.model'; import { Collection } from '../../../../../core/shared/collection.model'; @Component({ - selector: 'ds-comcol-metadata', - template: '' + selector: 'ds-comcol-metadata', + template: '', + standalone: true }) export class ComcolMetadataComponent implements OnInit { /** diff --git a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html index 1e1f3d8209..bfc0fb5ddc 100644 --- a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html +++ b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.html @@ -20,8 +20,7 @@
{{'comcol-role.edit.' + (comcolRole$ | async)?.name + '.anonymous-group' | translate}}
- + {{ dsoNameService.getName(group) }}
diff --git a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts index 5ae22d754e..09bdc766f9 100644 --- a/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts +++ b/src/app/shared/comcol/comcol-forms/edit-comcol-page/comcol-role/comcol-role.component.ts @@ -13,8 +13,13 @@ import { getGroupEditRoute } from '../../../../../access-control/access-control- import { hasNoValue, hasValue } from '../../../../empty.util'; import { NoContent } from '../../../../../core/shared/NoContent.model'; import { NotificationsService } from '../../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; +import { ThemedLoadingComponent } from '../../../../loading/themed-loading.component'; +import { AlertComponent } from '../../../../alert/alert.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../../../utils/var.directive'; +import { RouterLink } from '@angular/router'; /** * Component for managing a community or collection role. @@ -22,7 +27,17 @@ import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service @Component({ selector: 'ds-comcol-role', styleUrls: ['./comcol-role.component.scss'], - templateUrl: './comcol-role.component.html' + templateUrl: './comcol-role.component.html', + imports: [ + ThemedLoadingComponent, + AlertComponent, + AsyncPipe, + TranslateModule, + NgIf, + RouterLink, + VarDirective + ], + standalone: true }) export class ComcolRoleComponent implements OnInit { diff --git a/src/app/shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts b/src/app/shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts index e4d6c9c8a7..6e9e463cb3 100644 --- a/src/app/shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts +++ b/src/app/shared/comcol/comcol-forms/edit-comcol-page/edit-comcol-page.component.ts @@ -12,8 +12,9 @@ import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; * Component representing the edit page for communities and collections */ @Component({ - selector: 'ds-edit-comcol', - template: '' + selector: 'ds-edit-comcol', + template: '', + standalone: true }) export class EditComColPageComponent implements OnInit { /** diff --git a/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts b/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts index 0527d283f0..b9aae42e5e 100644 --- a/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts +++ b/src/app/shared/comcol/comcol-page-browse-by/comcol-page-browse-by.component.ts @@ -1,7 +1,7 @@ import { Component, Input, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; -import { ActivatedRoute, Params, Router } from '@angular/router'; +import { ActivatedRoute, Params, Router, RouterLink, RouterLinkActive } from '@angular/router'; import { getCommunityPageRoute } from '../../../community-page/community-page-routing-paths'; import { getCollectionPageRoute } from '../../../collection-page/collection-page-routing-paths'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; @@ -9,6 +9,9 @@ import { PaginatedList } from '../../../core/data/paginated-list.model'; import { BrowseDefinition } from '../../../core/shared/browse-definition.model'; import { RemoteData } from '../../../core/data/remote-data'; import { BrowseService } from '../../../core/browse/browse.service'; +import { FormsModule } from '@angular/forms'; +import { AsyncPipe, NgForOf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; export interface ComColPageNavOption { id: string; @@ -24,7 +27,16 @@ export interface ComColPageNavOption { @Component({ selector: 'ds-comcol-page-browse-by', styleUrls: ['./comcol-page-browse-by.component.scss'], - templateUrl: './comcol-page-browse-by.component.html' + templateUrl: './comcol-page-browse-by.component.html', + imports: [ + FormsModule, + NgForOf, + RouterLink, + RouterLinkActive, + TranslateModule, + AsyncPipe + ], + standalone: true }) export class ComcolPageBrowseByComponent implements OnInit { /** diff --git a/src/app/shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component.ts b/src/app/shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component.ts index 08a13eddf8..53aaaad4c4 100644 --- a/src/app/shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component.ts +++ b/src/app/shared/comcol/comcol-page-browse-by/themed-comcol-page-browse-by.component.ts @@ -6,9 +6,10 @@ import { ThemedComponent } from '../../theme-support/themed.component'; * Themed wrapper for ComcolPageBrowseByComponent */ @Component({ - selector: 'ds-themed-comcol-page-browse-by', - styleUrls: [], - templateUrl: '../../theme-support/themed.component.html', + selector: 'ds-themed-comcol-page-browse-by', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', + standalone: true }) export class ThemedComcolPageBrowseByComponent extends ThemedComponent { /** diff --git a/src/app/shared/comcol/comcol-page-content/comcol-page-content.component.ts b/src/app/shared/comcol/comcol-page-content/comcol-page-content.component.ts index 841b45dd39..9e349cf841 100644 --- a/src/app/shared/comcol/comcol-page-content/comcol-page-content.component.ts +++ b/src/app/shared/comcol/comcol-page-content/comcol-page-content.component.ts @@ -1,4 +1,5 @@ import { Component, Input } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component renders any content inside of this component. @@ -9,7 +10,11 @@ import { Component, Input } from '@angular/core'; @Component({ selector: 'ds-comcol-page-content', styleUrls: ['./comcol-page-content.component.scss'], - templateUrl: './comcol-page-content.component.html' + templateUrl: './comcol-page-content.component.html', + imports: [ + TranslateModule + ], + standalone: true }) export class ComcolPageContentComponent { diff --git a/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.spec.ts b/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.spec.ts index a06bf4a1e5..b452ce1582 100644 --- a/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.spec.ts +++ b/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.spec.ts @@ -11,9 +11,8 @@ describe('ComcolPageHandleComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ComcolPageHandleComponent] - }) + imports: [TranslateModule.forRoot(), ComcolPageHandleComponent] +}) .compileComponents(); })); diff --git a/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.ts b/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.ts index 2ce49ebea2..11949f465f 100644 --- a/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.ts +++ b/src/app/shared/comcol/comcol-page-handle/comcol-page-handle.component.ts @@ -1,4 +1,6 @@ import { Component, Injectable, Input } from '@angular/core'; +import { NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component builds a URL from the value of "handle" @@ -7,7 +9,9 @@ import { Component, Injectable, Input } from '@angular/core'; @Component({ selector: 'ds-comcol-page-handle', styleUrls: ['./comcol-page-handle.component.scss'], - templateUrl: './comcol-page-handle.component.html' + templateUrl: './comcol-page-handle.component.html', + imports: [NgIf, TranslateModule], + standalone: true }) @Injectable() diff --git a/src/app/shared/comcol/comcol-page-handle/themed-comcol-page-handle.component.ts b/src/app/shared/comcol/comcol-page-handle/themed-comcol-page-handle.component.ts index e7a7caf7be..51eb66c57e 100644 --- a/src/app/shared/comcol/comcol-page-handle/themed-comcol-page-handle.component.ts +++ b/src/app/shared/comcol/comcol-page-handle/themed-comcol-page-handle.component.ts @@ -6,9 +6,10 @@ import { ComcolPageHandleComponent } from './comcol-page-handle.component'; * Themed wrapper for BreadcrumbsComponent */ @Component({ - selector: 'ds-themed-comcol-page-handle', - styleUrls: [], - templateUrl: '../../theme-support/themed.component.html', + selector: 'ds-themed-comcol-page-handle', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', + standalone: true }) diff --git a/src/app/shared/comcol/comcol-page-header/comcol-page-header.component.ts b/src/app/shared/comcol/comcol-page-header/comcol-page-header.component.ts index cbf984a349..977c9caea3 100644 --- a/src/app/shared/comcol/comcol-page-header/comcol-page-header.component.ts +++ b/src/app/shared/comcol/comcol-page-header/comcol-page-header.component.ts @@ -1,9 +1,10 @@ import { Component, Input } from '@angular/core'; @Component({ - selector: 'ds-comcol-page-header', - styleUrls: ['./comcol-page-header.component.scss'], - templateUrl: './comcol-page-header.component.html', + selector: 'ds-comcol-page-header', + styleUrls: ['./comcol-page-header.component.scss'], + templateUrl: './comcol-page-header.component.html', + standalone: true }) export class ComcolPageHeaderComponent { @Input() name: string; diff --git a/src/app/shared/comcol/comcol-page-logo/comcol-page-logo.component.ts b/src/app/shared/comcol/comcol-page-logo/comcol-page-logo.component.ts index a9761bfd5f..bc2246eaa8 100644 --- a/src/app/shared/comcol/comcol-page-logo/comcol-page-logo.component.ts +++ b/src/app/shared/comcol/comcol-page-logo/comcol-page-logo.component.ts @@ -3,9 +3,10 @@ import { Component, Input } from '@angular/core'; import { Bitstream } from '../../../core/shared/bitstream.model'; @Component({ - selector: 'ds-comcol-page-logo', - styleUrls: ['./comcol-page-logo.component.scss'], - templateUrl: './comcol-page-logo.component.html', + selector: 'ds-comcol-page-logo', + styleUrls: ['./comcol-page-logo.component.scss'], + templateUrl: './comcol-page-logo.component.html', + standalone: true }) export class ComcolPageLogoComponent { @Input() logo: Bitstream; diff --git a/src/app/shared/comcol/comcol.module.ts b/src/app/shared/comcol/comcol.module.ts index efbcedf2c6..7fdd98b4ac 100644 --- a/src/app/shared/comcol/comcol.module.ts +++ b/src/app/shared/comcol/comcol.module.ts @@ -33,18 +33,16 @@ const COMPONENTS = [ ]; @NgModule({ - declarations: [ - ...COMPONENTS - ], - imports: [ - CommonModule, - FormModule, - SharedModule, - UploadModule, - ], - exports: [ - ...COMPONENTS, - UploadModule, - ] + imports: [ + CommonModule, + FormModule, + SharedModule, + UploadModule, + ...COMPONENTS + ], + exports: [ + ...COMPONENTS, + UploadModule, + ] }) export class ComcolModule { } diff --git a/src/app/shared/confirmation-modal/confirmation-modal.component.spec.ts b/src/app/shared/confirmation-modal/confirmation-modal.component.spec.ts index d899dd8ef8..4b280e5efb 100644 --- a/src/app/shared/confirmation-modal/confirmation-modal.component.spec.ts +++ b/src/app/shared/confirmation-modal/confirmation-modal.component.spec.ts @@ -14,13 +14,12 @@ describe('ConfirmationModalComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ConfirmationModalComponent], - providers: [ + imports: [TranslateModule.forRoot(), ConfirmationModalComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/confirmation-modal/confirmation-modal.component.ts b/src/app/shared/confirmation-modal/confirmation-modal.component.ts index 46eb4cedc5..cb78591824 100644 --- a/src/app/shared/confirmation-modal/confirmation-modal.component.ts +++ b/src/app/shared/confirmation-modal/confirmation-modal.component.ts @@ -2,10 +2,14 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObject } from '../../core/shared/dspace-object.model'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-confirmation-modal', - templateUrl: 'confirmation-modal.component.html', + selector: 'ds-confirmation-modal', + templateUrl: 'confirmation-modal.component.html', + standalone: true, + imports: [NgIf, TranslateModule] }) export class ConfirmationModalComponent { @Input() headerLabel: string; diff --git a/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts b/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts index 081fb1050f..16cad5ba4e 100644 --- a/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts +++ b/src/app/shared/context-help-wrapper/context-help-wrapper.component.spec.ts @@ -11,7 +11,7 @@ import { PlacementDir } from './placement-dir.model'; import { By } from '@angular/platform-browser'; @Component({ - template: ` + template: ` template - ` + `, + standalone: true, + imports: [NgbTooltipModule] }) class TemplateComponent { @Input() content: string; @@ -72,13 +74,12 @@ describe('ContextHelpWrapperComponent', () => { ]); TestBed.configureTestingModule({ - imports: [ NgbTooltipModule ], - providers: [ + imports: [NgbTooltipModule, TemplateComponent, ContextHelpWrapperComponent], + providers: [ { provide: TranslateService, useValue: translateService }, { provide: ContextHelpService, useValue: contextHelpService }, - ], - declarations: [ TemplateComponent, ContextHelpWrapperComponent ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts b/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts index e170d522b5..f4267a65c3 100644 --- a/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts +++ b/src/app/shared/context-help-wrapper/context-help-wrapper.component.ts @@ -5,9 +5,10 @@ import { Observable, Subscription, BehaviorSubject, combineLatest } from 'rxjs'; import { map, distinctUntilChanged, mergeMap } from 'rxjs/operators'; import { PlacementDir } from './placement-dir.model'; import { ContextHelpService } from '../context-help.service'; -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'; +import { NgbTooltip, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { hasValueOperator } from '../empty.util'; import { ContextHelp } from '../context-help.model'; +import { NgFor, NgIf, NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common'; type ParsedContent = (string | {href: string, text: string})[]; @@ -16,9 +17,11 @@ type ParsedContent = (string | {href: string, text: string})[]; * produces a tooltip when clicked. */ @Component({ - selector: 'ds-context-help-wrapper', - templateUrl: './context-help-wrapper.component.html', - styleUrls: ['./context-help-wrapper.component.scss'], + selector: 'ds-context-help-wrapper', + templateUrl: './context-help-wrapper.component.html', + styleUrls: ['./context-help-wrapper.component.scss'], + standalone: true, + imports: [NgFor, NgIf, NgClass, NgbTooltipModule, NgTemplateOutlet, AsyncPipe] }) export class ContextHelpWrapperComponent implements OnInit, OnDestroy { /** diff --git a/src/app/shared/context-help.directive.spec.ts b/src/app/shared/context-help.directive.spec.ts index 326251da51..1b30f1889c 100644 --- a/src/app/shared/context-help.directive.spec.ts +++ b/src/app/shared/context-help.directive.spec.ts @@ -9,7 +9,9 @@ import { ContextHelpService } from './context-help.service'; import { ContextHelp } from './context-help.model'; @Component({ - template: `
some text
` + template: `
some text
`, + standalone: true, + imports: [NgbTooltipModule] }) class TestComponent { @Input() content = ''; @@ -54,13 +56,12 @@ describe('ContextHelpDirective', () => { ]); TestBed.configureTestingModule({ - imports: [NgbTooltipModule], - providers: [ + imports: [NgbTooltipModule, TestComponent, ContextHelpWrapperComponent, ContextHelpDirective], + providers: [ { provide: TranslateService, useValue: translateService }, { provide: ContextHelpService, useValue: contextHelpService } - ], - declarations: [TestComponent, ContextHelpWrapperComponent, ContextHelpDirective] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/context-help.directive.ts b/src/app/shared/context-help.directive.ts index 41d6daec21..9babd0d622 100644 --- a/src/app/shared/context-help.directive.ts +++ b/src/app/shared/context-help.directive.ts @@ -26,7 +26,8 @@ export interface ContextHelpDirectiveInput { * and so is the position of the tooltip itself (PlacementArray). */ @Directive({ - selector: '[dsContextHelp]', + selector: '[dsContextHelp]', + standalone: true }) export class ContextHelpDirective implements OnChanges, OnDestroy { /** diff --git a/src/app/shared/ds-select/ds-select.component.spec.ts b/src/app/shared/ds-select/ds-select.component.spec.ts index fadc854873..bcfa593c28 100644 --- a/src/app/shared/ds-select/ds-select.component.spec.ts +++ b/src/app/shared/ds-select/ds-select.component.spec.ts @@ -8,13 +8,11 @@ describe('DsSelectComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - ], - declarations: [ - DsSelectComponent, - ], - }) + DsSelectComponent + ] +}) .compileComponents(); })); diff --git a/src/app/shared/ds-select/ds-select.component.ts b/src/app/shared/ds-select/ds-select.component.ts index 26d1560c01..6875a5f174 100644 --- a/src/app/shared/ds-select/ds-select.component.ts +++ b/src/app/shared/ds-select/ds-select.component.ts @@ -1,12 +1,17 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; /** * Component which represent a DSpace dropdown selector. */ @Component({ - selector: 'ds-select', - templateUrl: './ds-select.component.html', - styleUrls: ['./ds-select.component.scss'] + selector: 'ds-select', + templateUrl: './ds-select.component.html', + styleUrls: ['./ds-select.component.scss'], + standalone: true, + imports: [NgbDropdownModule, NgIf, TranslateModule] }) export class DsSelectComponent { diff --git a/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts b/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts index abfe618174..1d0aaf6464 100644 --- a/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu.resolver.spec.ts @@ -116,25 +116,24 @@ describe('DSOEditMenuResolver', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule], - declarations: [AdminSidebarComponent], - providers: [ - {provide: DSpaceObjectDataService, useValue: dSpaceObjectDataService}, - {provide: MenuService, useValue: menuService}, - {provide: AuthorizationDataService, useValue: authorizationService}, - {provide: DsoVersioningModalService, useValue: dsoVersioningModalService}, - {provide: ResearcherProfileDataService, useValue: researcherProfileService}, - {provide: TranslateService, useValue: translate}, - {provide: NotificationsService, useValue: notificationsService}, + imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, AdminSidebarComponent], + providers: [ + { provide: DSpaceObjectDataService, useValue: dSpaceObjectDataService }, + { provide: MenuService, useValue: menuService }, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: DsoVersioningModalService, useValue: dsoVersioningModalService }, + { provide: ResearcherProfileDataService, useValue: researcherProfileService }, + { provide: TranslateService, useValue: translate }, + { provide: NotificationsService, useValue: notificationsService }, { - provide: NgbModal, useValue: { - open: () => {/*comment*/ + provide: NgbModal, useValue: { + open: () => { + } } - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }); + ], + schemas: [NO_ERRORS_SCHEMA] +}); resolver = TestBed.inject(DSOEditMenuResolver); spyOn(menuService, 'addSection'); diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts index 79ab35bd28..b9e0165ca2 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.spec.ts @@ -32,15 +32,14 @@ describe('DsoEditMenuExpandableSectionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [DsoEditMenuExpandableSectionComponent, TestComponent], - providers: [ - {provide: 'sectionDataProvider', useValue: dummySection}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, - {provide: Router, useValue: new RouterStub()}, - ] - }).overrideComponent(DsoEditMenuExpandableSectionComponent, { + imports: [TranslateModule.forRoot(), DsoEditMenuExpandableSectionComponent, TestComponent], + providers: [ + { provide: 'sectionDataProvider', useValue: dummySection }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, + { provide: Router, useValue: new RouterStub() }, + ] +}).overrideComponent(DsoEditMenuExpandableSectionComponent, { set: { entryComponents: [TestComponent] } @@ -68,8 +67,9 @@ describe('DsoEditMenuExpandableSectionComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { } diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts index 8e4a7008af..f5c1a42ade 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-expandable-menu-section/dso-edit-menu-expandable-section.component.ts @@ -8,15 +8,20 @@ import { MenuSection } from 'src/app/shared/menu/menu-section.model'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { hasValue } from '../../../empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgFor, NgIf, NgComponentOutlet, AsyncPipe } from '@angular/common'; +import { NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; /** * Represents an expandable section in the dso edit menus */ @Component({ - /* tslint:disable:component-selector */ - selector: 'ds-dso-edit-menu-expandable-section', - templateUrl: './dso-edit-menu-expandable-section.component.html', - styleUrls: ['./dso-edit-menu-expandable-section.component.scss'], + /* tslint:disable:component-selector */ + selector: 'ds-dso-edit-menu-expandable-section', + templateUrl: './dso-edit-menu-expandable-section.component.html', + styleUrls: ['./dso-edit-menu-expandable-section.component.scss'], + standalone: true, + imports: [NgbDropdownModule, NgbTooltipModule, NgFor, NgIf, NgComponentOutlet, TranslateModule, AsyncPipe] }) @rendersSectionForMenu(MenuID.DSO_EDIT, true) export class DsoEditMenuExpandableSectionComponent extends MenuSectionComponent { diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts index f0815c5415..7de3b2a9ab 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.spec.ts @@ -16,15 +16,14 @@ import { MenuItemType } from 'src/app/shared/menu/menu-item-type.model'; function initAsync(dummySectionText: { visible: boolean; icon: string; active: boolean; model: { disabled: boolean; text: string; type: MenuItemType }; id: string }, menuService: MenuServiceStub) { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [DsoEditMenuSectionComponent, TestComponent], - providers: [ - {provide: 'sectionDataProvider', useValue: dummySectionText}, - {provide: MenuService, useValue: menuService}, - {provide: CSSVariableService, useClass: CSSVariableServiceStub}, - {provide: Router, useValue: new RouterStub()}, - ] - }).overrideComponent(DsoEditMenuSectionComponent, { + imports: [TranslateModule.forRoot(), DsoEditMenuSectionComponent, TestComponent], + providers: [ + { provide: 'sectionDataProvider', useValue: dummySectionText }, + { provide: MenuService, useValue: menuService }, + { provide: CSSVariableService, useClass: CSSVariableServiceStub }, + { provide: Router, useValue: new RouterStub() }, + ] +}).overrideComponent(DsoEditMenuSectionComponent, { set: { entryComponents: [TestComponent] } @@ -166,8 +165,9 @@ describe('DsoEditMenuSectionComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { } diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts index af3381ef71..b26208694f 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu-section/dso-edit-menu-section.component.ts @@ -5,15 +5,21 @@ import { MenuService } from '../../../menu/menu.service'; import { isNotEmpty } from '../../../empty.util'; import { MenuID } from '../../../menu/menu-id.model'; import { MenuSection } from '../../../menu/menu-section.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf } from '@angular/common'; /** * Represents a non-expandable section in the dso edit menus */ @Component({ - /* tslint:disable:component-selector */ - selector: 'ds-dso-edit-menu-section', - templateUrl: './dso-edit-menu-section.component.html', - styleUrls: ['./dso-edit-menu-section.component.scss'] + /* tslint:disable:component-selector */ + selector: 'ds-dso-edit-menu-section', + templateUrl: './dso-edit-menu-section.component.html', + styleUrls: ['./dso-edit-menu-section.component.scss'], + standalone: true, + imports: [NgIf, NgbTooltipModule, RouterLink, TranslateModule] }) @rendersSectionForMenu(MenuID.DSO_EDIT, false) export class DsoEditMenuSectionComponent extends MenuSectionComponent implements OnInit { diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts index 5616e8ea10..44308b2a13 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.spec.ts @@ -46,18 +46,17 @@ describe('DsoEditMenuComponent', () => { }); spyOn(menuService, 'getMenuTopSections').and.returnValue(observableOf([section])); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule, DsoPageModule], - declarations: [DsoEditMenuComponent], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule, DsoPageModule, DsoEditMenuComponent], + providers: [ Injector, - {provide: MenuService, useValue: menuService}, - {provide: AuthService, useClass: AuthServiceStub}, - {provide: ActivatedRoute, useValue: routeStub}, - {provide: AuthorizationDataService, useValue: authorizationService}, - {provide: ThemeService, useValue: getMockThemeService()}, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + { provide: MenuService, useValue: menuService }, + { provide: AuthService, useClass: AuthServiceStub }, + { provide: ActivatedRoute, useValue: routeStub }, + { provide: AuthorizationDataService, useValue: authorizationService }, + { provide: ThemeService, useValue: getMockThemeService() }, + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.ts b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.ts index ff4f957314..584a8a9351 100644 --- a/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.ts +++ b/src/app/shared/dso-page/dso-edit-menu/dso-edit-menu.component.ts @@ -5,14 +5,17 @@ import { MenuService } from '../../menu/menu.service'; import { ActivatedRoute } from '@angular/router'; import { ThemeService } from '../../theme-support/theme.service'; import { MenuID } from '../../menu/menu-id.model'; +import { NgFor, NgComponentOutlet, AsyncPipe } from '@angular/common'; /** * Component representing the edit menu and other menus on the dspace object pages */ @Component({ - selector: 'ds-dso-edit-menu', - styleUrls: ['./dso-edit-menu.component.scss'], - templateUrl: './dso-edit-menu.component.html', + selector: 'ds-dso-edit-menu', + styleUrls: ['./dso-edit-menu.component.scss'], + templateUrl: './dso-edit-menu.component.html', + standalone: true, + imports: [NgFor, NgComponentOutlet, AsyncPipe] }) export class DsoEditMenuComponent extends MenuComponent { /** diff --git a/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.spec.ts b/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.spec.ts index 726854778d..255e7b08af 100644 --- a/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.spec.ts +++ b/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.spec.ts @@ -35,20 +35,20 @@ describe('DsoPageSubscriptionButtonComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ NgbModalModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ DsoPageSubscriptionButtonComponent ], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + DsoPageSubscriptionButtonComponent + ], + providers: [ { provide: AuthorizationDataService, useValue: authorizationService }, - ] - }) + ] +}) .compileComponents(); }); diff --git a/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.ts b/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.ts index 54cd9e6bb0..331183f7df 100644 --- a/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.ts +++ b/src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.ts @@ -1,17 +1,21 @@ import { Component, Input, OnInit } from '@angular/core'; import { Observable, of } from 'rxjs'; -import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { NgbModal, NgbModalRef, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service'; import { SubscriptionModalComponent } from '../../subscriptions/subscription-modal/subscription-modal.component'; import { FeatureID } from '../../../core/data/feature-authorization/feature-id'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-dso-page-subscription-button', - templateUrl: './dso-page-subscription-button.component.html', - styleUrls: ['./dso-page-subscription-button.component.scss'] + selector: 'ds-dso-page-subscription-button', + templateUrl: './dso-page-subscription-button.component.html', + styleUrls: ['./dso-page-subscription-button.component.scss'], + standalone: true, + imports: [NgIf, NgbTooltipModule, AsyncPipe, TranslateModule] }) /** * Display a button that opens the modal to manage subscriptions diff --git a/src/app/shared/dso-page/dso-page.module.ts b/src/app/shared/dso-page/dso-page.module.ts index d700b34e77..733c8c4a7b 100644 --- a/src/app/shared/dso-page/dso-page.module.ts +++ b/src/app/shared/dso-page/dso-page.module.ts @@ -32,20 +32,18 @@ const PROVIDERS = [ ]; @NgModule({ - imports: [ - ...MODULES - ], - declarations: [ - ...COMPONENTS, - ...ENTRY_COMPONENTS, - ], - providers: [ - ...PROVIDERS, - ...ENTRY_COMPONENTS, - ], - exports: [ - ...COMPONENTS - ] + imports: [ + ...MODULES, + ...COMPONENTS, + ...ENTRY_COMPONENTS + ], + providers: [ + ...PROVIDERS, + ...ENTRY_COMPONENTS, + ], + exports: [ + ...COMPONENTS + ] }) /** diff --git a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.spec.ts b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.spec.ts index b46df8ff36..33cb4893dd 100644 --- a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.spec.ts +++ b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.spec.ts @@ -31,15 +31,14 @@ describe('AuthorizedCollectionSelectorComponent', () => { }); notificationsService = jasmine.createSpyObj('notificationsService', ['error']); TestBed.configureTestingModule({ - declarations: [AuthorizedCollectionSelectorComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), AuthorizedCollectionSelectorComponent, VarDirective], + providers: [ { provide: SearchService, useValue: {} }, { provide: CollectionDataService, useValue: collectionService }, { provide: NotificationsService, useValue: notificationsService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts index cc1f9822d6..14f4d28973 100644 --- a/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/authorized-collection-selector/authorized-collection-selector.component.ts @@ -13,15 +13,23 @@ import { followLink } from '../../../utils/follow-link-config.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { hasValue } from '../../../empty.util'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Collection } from '../../../../core/shared/collection.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; import { FindListOptions } from '../../../../core/data/find-list-options.model'; +import { ThemedLoadingComponent } from '../../../loading/themed-loading.component'; +import { ListableObjectComponentLoaderComponent } from '../../../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { HoverClassDirective } from '../../../hover-class.directive'; +import { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common'; +import { InfiniteScrollModule } from 'ngx-infinite-scroll'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; @Component({ - selector: 'ds-authorized-collection-selector', - styleUrls: ['../dso-selector.component.scss'], - templateUrl: '../dso-selector.component.html' + selector: 'ds-authorized-collection-selector', + styleUrls: ['../dso-selector.component.scss'], + templateUrl: '../dso-selector.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, InfiniteScrollModule, NgIf, NgFor, HoverClassDirective, NgClass, ListableObjectComponentLoaderComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) /** * Component rendering a list of collections to select from diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts index e2acd17bc0..663ec2d9c7 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts @@ -67,14 +67,13 @@ describe('DSOSelectorComponent', () => { notificationsService = jasmine.createSpyObj('notificationsService', ['error']); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [DSOSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), DSOSelectorComponent], + providers: [ { provide: SearchService, useValue: searchService }, { provide: NotificationsService, useValue: notificationsService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts index 503e4c4412..1ef7f5612e 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.ts @@ -9,7 +9,7 @@ import { QueryList, ViewChildren } from '@angular/core'; -import { UntypedFormControl } from '@angular/forms'; +import { UntypedFormControl, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BehaviorSubject, @@ -34,7 +34,7 @@ import { SearchResult } from '../../search/models/search-result.model'; import { SortOptions } from '../../../core/cache/models/sort-options.model'; import { RemoteData } from '../../../core/data/remote-data'; import { NotificationsService } from '../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { ListableNotificationObject @@ -44,11 +44,18 @@ import { NotificationType } from '../../notifications/models/notification-type'; import { LISTABLE_NOTIFICATION_OBJECT } from '../../object-list/listable-notification-object/listable-notification-object.resource-type'; +import { ThemedLoadingComponent } from '../../loading/themed-loading.component'; +import { ListableObjectComponentLoaderComponent } from '../../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { HoverClassDirective } from '../../hover-class.directive'; +import { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common'; +import { InfiniteScrollModule } from 'ngx-infinite-scroll'; @Component({ - selector: 'ds-dso-selector', - styleUrls: ['./dso-selector.component.scss'], - templateUrl: './dso-selector.component.html' + selector: 'ds-dso-selector', + styleUrls: ['./dso-selector.component.scss'], + templateUrl: './dso-selector.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, InfiniteScrollModule, NgIf, NgFor, HoverClassDirective, NgClass, ListableObjectComponentLoaderComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts index a12f2587be..95162f4cf4 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts @@ -30,28 +30,27 @@ describe('CreateCollectionParentSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [CreateCollectionParentSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), CreateCollectionParentSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: communityRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: communityRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts index e0b7c1675b..898590f3ce 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.ts @@ -10,14 +10,19 @@ import { } from '../../../../collection-page/collection-page-routing-paths'; import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; import { environment } from '../../../../../environments/environment'; +import { TranslateModule } from '@ngx-translate/core'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing communities inside a modal * Used to choose a community from to create a new collection in */ @Component({ - selector: 'ds-create-collection-parent-selector', - templateUrl: '../dso-selector-modal-wrapper.component.html', + selector: 'ds-create-collection-parent-selector', + templateUrl: '../dso-selector-modal-wrapper.component.html', + standalone: true, + imports: [NgIf, DSOSelectorComponent, TranslateModule] }) export class CreateCollectionParentSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.COLLECTION; diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts index d90cd0ac0d..6f1c549572 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/themed-create-collection-parent-selector.component.ts @@ -8,7 +8,8 @@ import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; @Component({ selector: 'ds-themed-create-collection-parent-selector', styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html' + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedCreateCollectionParentSelectorComponent extends ThemedComponent { diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts index 2d0a2a25de..30ed749947 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts @@ -29,28 +29,27 @@ describe('CreateCommunityParentSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [CreateCommunityParentSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), CreateCommunityParentSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: communityRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: communityRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts index 77458d9802..9fd015671f 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.ts @@ -14,6 +14,8 @@ import { } from '../../../../community-page/community-page-routing-paths'; import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; import { environment } from '../../../../../environments/environment'; +import { TranslateModule } from '@ngx-translate/core'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; /** * Component to wrap a button - for top communities - @@ -23,9 +25,11 @@ import { environment } from '../../../../../environments/environment'; */ @Component({ - selector: 'ds-create-community-parent-selector', - styleUrls: ['./create-community-parent-selector.component.scss'], - templateUrl: './create-community-parent-selector.component.html', + selector: 'ds-create-community-parent-selector', + styleUrls: ['./create-community-parent-selector.component.scss'], + templateUrl: './create-community-parent-selector.component.html', + standalone: true, + imports: [DSOSelectorComponent, TranslateModule] }) export class CreateCommunityParentSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.COMMUNITY; diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts index 24bff97254..a64ef68979 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/themed-create-community-parent-selector.component.ts @@ -8,7 +8,8 @@ import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; @Component({ selector: 'ds-themed-create-community-parent-selector', styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html' + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedCreateCommunityParentSelectorComponent extends ThemedComponent { diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts index 90bd07c52b..4629cf2456 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts @@ -28,28 +28,27 @@ describe('CreateItemParentSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [CreateItemParentSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), CreateItemParentSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: collectionRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: collectionRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts index ed8a7b0780..1fd5ca613c 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.ts @@ -6,6 +6,9 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-selector-modal-wrapper.component'; import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; import { environment } from '../../../../../environments/environment'; +import { TranslateModule } from '@ngx-translate/core'; +import { AuthorizedCollectionSelectorComponent } from '../../dso-selector/authorized-collection-selector/authorized-collection-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing collections inside a modal @@ -13,10 +16,12 @@ import { environment } from '../../../../../environments/environment'; */ @Component({ - selector: 'ds-create-item-parent-selector', - // styleUrls: ['./create-item-parent-selector.component.scss'], - // templateUrl: '../dso-selector-modal-wrapper.component.html', - templateUrl: './create-item-parent-selector.component.html' + selector: 'ds-create-item-parent-selector', + // styleUrls: ['./create-item-parent-selector.component.scss'], + // templateUrl: '../dso-selector-modal-wrapper.component.html', + templateUrl: './create-item-parent-selector.component.html', + standalone: true, + imports: [NgIf, AuthorizedCollectionSelectorComponent, TranslateModule] }) export class CreateItemParentSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.ITEM; diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts index 49209ea63b..69fd6b347f 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/themed-create-item-parent-selector.component.ts @@ -8,7 +8,8 @@ import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; @Component({ selector: 'ds-themed-create-item-parent-selector', styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html' + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedCreateItemParentSelectorComponent extends ThemedComponent { diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts index e2dbaaa0ff..0739110dd7 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts @@ -12,6 +12,7 @@ import { DSOSelectorComponent } from '../dso-selector/dso-selector.component'; import { MockComponent } from 'ng-mocks'; import { MetadataValue } from '../../../core/shared/metadata.models'; import { createSuccessfulRemoteDataObject } from '../../remote-data.utils'; +import { NgIf } from "@angular/common"; describe('DSOSelectorModalWrapperComponent', () => { let component: DSOSelectorModalWrapperComponent; @@ -32,25 +33,24 @@ describe('DSOSelectorModalWrapperComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [TestComponent, MockComponent(DSOSelectorComponent)], - providers: [ + imports: [TranslateModule.forRoot(), TestComponent, MockComponent(DSOSelectorComponent)], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: itemRD, - }, - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: itemRD, + }, + }, + } } - } }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); @@ -117,7 +117,13 @@ describe('DSOSelectorModalWrapperComponent', () => { @Component({ selector: 'ds-test-cmp', - templateUrl: './dso-selector-modal-wrapper.component.html' + templateUrl: './dso-selector-modal-wrapper.component.html', + imports: [ + DSOSelectorComponent, + NgIf, + TranslateModule + ], + standalone: true }) class TestComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.ITEM; diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts index 142f5dcc11..2a7b67a018 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts @@ -29,28 +29,27 @@ describe('EditCollectionSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [EditCollectionSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), EditCollectionSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: collectionRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: collectionRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts index fd54cd44ed..9bbc321e1a 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.ts @@ -10,6 +10,9 @@ import { import { getCollectionEditRoute } from '../../../../collection-page/collection-page-routing-paths'; import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; import { environment } from '../../../../../environments/environment'; +import { TranslateModule } from '@ngx-translate/core'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing collections inside a modal @@ -17,8 +20,10 @@ import { environment } from '../../../../../environments/environment'; */ @Component({ - selector: 'ds-edit-collection-selector', - templateUrl: '../dso-selector-modal-wrapper.component.html', + selector: 'ds-edit-collection-selector', + templateUrl: '../dso-selector-modal-wrapper.component.html', + standalone: true, + imports: [NgIf, DSOSelectorComponent, TranslateModule] }) export class EditCollectionSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.COLLECTION; diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts index 999f466e75..83c142f5f4 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/themed-edit-collection-selector.component.ts @@ -8,7 +8,8 @@ import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; @Component({ selector: 'ds-themed-edit-collection-selector', styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html' + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedEditCollectionSelectorComponent extends ThemedComponent { diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts index 355ff61e08..9dbb1c24b8 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts @@ -29,28 +29,27 @@ describe('EditCommunitySelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [EditCommunitySelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), EditCommunitySelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: communityRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: communityRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts index cf2f97c6d3..b3408c9a68 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.ts @@ -10,6 +10,9 @@ import { import { getCommunityEditRoute } from '../../../../community-page/community-page-routing-paths'; import { SortDirection, SortOptions } from '../../../../core/cache/models/sort-options.model'; import { environment } from '../../../../../environments/environment'; +import { TranslateModule } from '@ngx-translate/core'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing communities inside a modal @@ -17,8 +20,10 @@ import { environment } from '../../../../../environments/environment'; */ @Component({ - selector: 'ds-edit-community-selector', - templateUrl: '../dso-selector-modal-wrapper.component.html', + selector: 'ds-edit-community-selector', + templateUrl: '../dso-selector-modal-wrapper.component.html', + standalone: true, + imports: [NgIf, DSOSelectorComponent, TranslateModule] }) export class EditCommunitySelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts index e067803444..2c32f04efe 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/themed-edit-community-selector.component.ts @@ -8,7 +8,8 @@ import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; @Component({ selector: 'ds-themed-edit-community-selector', styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html' + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedEditCommunitySelectorComponent extends ThemedComponent { diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts index a2891fc66f..f4c16ab3f6 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts @@ -24,28 +24,27 @@ describe('EditItemSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [EditItemSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), EditItemSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: itemRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: itemRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts index c1ae583908..eea4e5aa47 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.ts @@ -6,6 +6,9 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-selector-modal-wrapper.component'; import { getItemEditRoute } from '../../../../item-page/item-page-routing-paths'; import { Item } from '../../../../core/shared/item.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing items inside a modal @@ -13,8 +16,10 @@ import { Item } from '../../../../core/shared/item.model'; */ @Component({ - selector: 'ds-edit-item-selector', - templateUrl: 'edit-item-selector.component.html', + selector: 'ds-edit-item-selector', + templateUrl: 'edit-item-selector.component.html', + standalone: true, + imports: [NgIf, DSOSelectorComponent, TranslateModule] }) export class EditItemSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.ITEM; diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts index 6d3b5691c1..381135b85b 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/themed-edit-item-selector.component.ts @@ -8,7 +8,8 @@ import {ThemedComponent} from 'src/app/shared/theme-support/themed.component'; @Component({ selector: 'ds-themed-edit-item-selector', styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html' + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedEditItemSelectorComponent extends ThemedComponent { diff --git a/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.spec.ts index 18ec6007ea..d3b8076878 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.spec.ts @@ -29,10 +29,8 @@ import { AuthorizationDataService } from '../../../../core/data/feature-authoriz provide: TranslateLoader, useClass: TranslateLoaderMock } - }), - ], + }), ConfirmationModalComponent], exports: [], - declarations: [ConfirmationModalComponent], providers: [] }) class ModelTestModule { @@ -86,31 +84,30 @@ describe('ExportBatchSelectorComponent', () => { isAuthorized: observableOf(true) }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ModelTestModule], - declarations: [ExportBatchSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ModelTestModule, ExportBatchSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { provide: NotificationsService, useValue: notificationService }, { provide: ScriptDataService, useValue: scriptService }, { provide: AuthorizationDataService, useValue: authorizationDataService }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: itemRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: itemRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.ts index 0645e09029..e94eb475c5 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-batch-selector/export-batch-selector.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable, of as observableOf } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { BATCH_EXPORT_SCRIPT_NAME, ScriptDataService } from '../../../../core/data/processes/script-data.service'; @@ -20,14 +20,18 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { getProcessDetailRoute } from '../../../../process-page/process-page-routing.paths'; import { AuthorizationDataService } from '../../../../core/data/feature-authorization/authorization-data.service'; import { FeatureID } from '../../../../core/data/feature-authorization/feature-id'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing dso's inside a modal * Used to choose a dso from to export metadata of */ @Component({ - selector: 'ds-export-metadata-selector', - templateUrl: '../dso-selector-modal-wrapper.component.html', + selector: 'ds-export-metadata-selector', + templateUrl: '../dso-selector-modal-wrapper.component.html', + standalone: true, + imports: [NgIf, DSOSelectorComponent, TranslateModule] }) export class ExportBatchSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.DSPACEOBJECT; diff --git a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts index df3e4f095c..da7b024f80 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.spec.ts @@ -30,10 +30,8 @@ import { AuthorizationDataService } from '../../../../core/data/feature-authoriz provide: TranslateLoader, useClass: TranslateLoaderMock } - }), - ], + }), ConfirmationModalComponent], exports: [], - declarations: [ConfirmationModalComponent], providers: [] }) class ModelTestModule { @@ -101,31 +99,30 @@ describe('ExportMetadataSelectorComponent', () => { isAuthorized: observableOf(true) }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ModelTestModule], - declarations: [ExportMetadataSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ModelTestModule, ExportMetadataSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { provide: NotificationsService, useValue: notificationService }, { provide: ScriptDataService, useValue: scriptService }, { provide: AuthorizationDataService, useValue: authorizationDataService }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: itemRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: itemRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts index d4b4314a99..e9b9e47917 100644 --- a/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/export-metadata-selector/export-metadata-selector.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Observable, of as observableOf } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { METADATA_EXPORT_SCRIPT_NAME, ScriptDataService } from '../../../../core/data/processes/script-data.service'; @@ -21,14 +21,18 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { getProcessDetailRoute } from '../../../../process-page/process-page-routing.paths'; import { AuthorizationDataService } from '../../../../core/data/feature-authorization/authorization-data.service'; import { FeatureID } from '../../../../core/data/feature-authorization/feature-id'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing dso's inside a modal * Used to choose a dso from to export metadata of */ @Component({ - selector: 'ds-export-metadata-selector', - templateUrl: '../dso-selector-modal-wrapper.component.html', + selector: 'ds-export-metadata-selector', + templateUrl: '../dso-selector-modal-wrapper.component.html', + standalone: true, + imports: [NgIf, DSOSelectorComponent, TranslateModule] }) export class ExportMetadataSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.DSPACEOBJECT; diff --git a/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.spec.ts index 6ed3bf28be..858005eb31 100644 --- a/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.spec.ts @@ -32,13 +32,12 @@ describe('ImportBatchSelectorComponent', () => { const modalStub = jasmine.createSpyObj('modalStub', ['close']); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - declarations: [ImportBatchSelectorComponent], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), ImportBatchSelectorComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.ts b/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.ts index 4696e42e2d..db17f7bb36 100644 --- a/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.ts +++ b/src/app/shared/dso-selector/modal-wrappers/import-batch-selector/import-batch-selector.component.ts @@ -6,14 +6,19 @@ import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../dso-selector-modal-wrapper.component'; import { Observable, of } from 'rxjs'; +import { TranslateModule } from '@ngx-translate/core'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector.component'; +import { NgIf } from '@angular/common'; /** * Component to wrap a list of existing dso's inside a modal * Used to choose a dso from to import metadata of */ @Component({ - selector: 'ds-import-batch-selector', - templateUrl: '../dso-selector-modal-wrapper.component.html', + selector: 'ds-import-batch-selector', + templateUrl: '../dso-selector-modal-wrapper.component.html', + standalone: true, + imports: [NgIf, DSOSelectorComponent, TranslateModule] }) export class ImportBatchSelectorComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.DSPACEOBJECT; diff --git a/src/app/shared/entity-dropdown/entity-dropdown.component.spec.ts b/src/app/shared/entity-dropdown/entity-dropdown.component.spec.ts index 13e6dbc9c5..b7773b6083 100644 --- a/src/app/shared/entity-dropdown/entity-dropdown.component.spec.ts +++ b/src/app/shared/entity-dropdown/entity-dropdown.component.spec.ts @@ -10,7 +10,10 @@ import { By } from '@angular/platform-browser'; import { createPaginatedList } from '../testing/utils.test'; // eslint-disable-next-line @angular-eslint/pipe-prefix -@Pipe({ name: 'translate' }) +@Pipe({ + name: 'translate', + standalone: true +}) class MockTranslatePipe implements PipeTransform { transform(value: string): string { return value; @@ -72,14 +75,13 @@ describe('EntityDropdownComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [], - declarations: [EntityDropdownComponent, MockTranslatePipe], - providers: [ + imports: [EntityDropdownComponent, MockTranslatePipe], + providers: [ { provide: EntityTypeDataService, useValue: entityTypeServiceMock }, ChangeDetectorRef - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/entity-dropdown/entity-dropdown.component.ts b/src/app/shared/entity-dropdown/entity-dropdown.component.ts index e009463dcd..d633b5c210 100644 --- a/src/app/shared/entity-dropdown/entity-dropdown.component.ts +++ b/src/app/shared/entity-dropdown/entity-dropdown.component.ts @@ -18,11 +18,17 @@ import { EntityTypeDataService } from '../../core/data/entity-type-data.service' import { ItemType } from '../../core/shared/item-relationships/item-type.model'; import { getFirstSucceededRemoteWithNotEmptyData } from '../../core/shared/operators'; import { FindListOptions } from '../../core/data/find-list-options.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../loading/themed-loading.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { InfiniteScrollModule } from 'ngx-infinite-scroll'; @Component({ - selector: 'ds-entity-dropdown', - templateUrl: './entity-dropdown.component.html', - styleUrls: ['./entity-dropdown.component.scss'] + selector: 'ds-entity-dropdown', + templateUrl: './entity-dropdown.component.html', + styleUrls: ['./entity-dropdown.component.scss'], + standalone: true, + imports: [InfiniteScrollModule, NgIf, NgFor, ThemedLoadingComponent, AsyncPipe, TranslateModule] }) export class EntityDropdownComponent implements OnInit, OnDestroy { /** diff --git a/src/app/shared/eperson-group-list/eperson-group-list.component.spec.ts b/src/app/shared/eperson-group-list/eperson-group-list.component.spec.ts index 8c5fc88137..09fa2ea181 100644 --- a/src/app/shared/eperson-group-list/eperson-group-list.component.spec.ts +++ b/src/app/shared/eperson-group-list/eperson-group-list.component.spec.ts @@ -67,15 +67,13 @@ describe('EpersonGroupListComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), EpersonGroupListComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: EPersonDataService, useValue: mockEpersonService }, { provide: GroupDataService, useValue: mockGroupService }, { provide: RequestService, useValue: getMockRequestService() }, @@ -83,11 +81,11 @@ describe('EpersonGroupListComponent test suite', () => { EpersonGroupListComponent, ChangeDetectorRef, Injector - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -270,8 +268,9 @@ describe('EpersonGroupListComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { diff --git a/src/app/shared/eperson-group-list/eperson-group-list.component.ts b/src/app/shared/eperson-group-list/eperson-group-list.component.ts index 7cad7a9783..c905ac94f2 100644 --- a/src/app/shared/eperson-group-list/eperson-group-list.component.ts +++ b/src/app/shared/eperson-group-list/eperson-group-list.component.ts @@ -20,6 +20,11 @@ import { getFirstCompletedRemoteData } from '../../core/shared/operators'; import { PaginationService } from '../../core/pagination/pagination.service'; import { FindListOptions } from '../../core/data/find-list-options.model'; import { getDataServiceFor } from '../../core/data/base/data-service.decorator'; +import { TranslateModule } from '@ngx-translate/core'; +import { PaginationComponent } from '../pagination/pagination.component'; +import { GroupSearchBoxComponent } from './group-search-box/group-search-box.component'; +import { EpersonSearchBoxComponent } from './eperson-search-box/eperson-search-box.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; export interface SearchEvent { scope: string; @@ -27,12 +32,14 @@ export interface SearchEvent { } @Component({ - selector: 'ds-eperson-group-list', - styleUrls: ['./eperson-group-list.component.scss'], - templateUrl: './eperson-group-list.component.html', - animations: [ - fadeInOut - ] + selector: 'ds-eperson-group-list', + styleUrls: ['./eperson-group-list.component.scss'], + templateUrl: './eperson-group-list.component.html', + animations: [ + fadeInOut + ], + standalone: true, + imports: [NgIf, EpersonSearchBoxComponent, GroupSearchBoxComponent, PaginationComponent, NgFor, AsyncPipe, TranslateModule] }) /** * Component that shows a list of eperson or group diff --git a/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.spec.ts b/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.spec.ts index e88f08a131..f4bd325ea1 100644 --- a/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.spec.ts +++ b/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.spec.ts @@ -17,23 +17,21 @@ describe('EpersonSearchBoxComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), EpersonSearchBoxComponent, TestComponent - ], - providers: [ + ], + providers: [ UntypedFormBuilder, EpersonSearchBoxComponent - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -107,8 +105,11 @@ describe('EpersonSearchBoxComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FormsModule, + ReactiveFormsModule] }) class TestComponent { diff --git a/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.ts b/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.ts index 4689d29a8c..a8ae221577 100644 --- a/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.ts +++ b/src/app/shared/eperson-group-list/eperson-search-box/eperson-search-box.component.ts @@ -1,17 +1,20 @@ import { Component, EventEmitter, Output } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; +import { UntypedFormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { Subscription } from 'rxjs'; import { SearchEvent } from '../eperson-group-list.component'; import { isNotNull } from '../../empty.util'; +import { TranslateModule } from '@ngx-translate/core'; /** * A component used to show a search box for epersons. */ @Component({ - selector: 'ds-eperson-search-box', - templateUrl: './eperson-search-box.component.html', + selector: 'ds-eperson-search-box', + templateUrl: './eperson-search-box.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, TranslateModule] }) export class EpersonSearchBoxComponent { diff --git a/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.spec.ts b/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.spec.ts index b4c663902d..b7f3cdf866 100644 --- a/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.spec.ts +++ b/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.spec.ts @@ -17,23 +17,21 @@ describe('GroupSearchBoxComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), GroupSearchBoxComponent, TestComponent - ], - providers: [ + ], + providers: [ UntypedFormBuilder, GroupSearchBoxComponent - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -106,8 +104,11 @@ describe('GroupSearchBoxComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FormsModule, + ReactiveFormsModule] }) class TestComponent { diff --git a/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.ts b/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.ts index 154bee2d07..204c93d1b5 100644 --- a/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.ts +++ b/src/app/shared/eperson-group-list/group-search-box/group-search-box.component.ts @@ -1,17 +1,20 @@ import { Component, EventEmitter, Output } from '@angular/core'; -import { UntypedFormBuilder } from '@angular/forms'; +import { UntypedFormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { Subscription } from 'rxjs'; import { SearchEvent } from '../eperson-group-list.component'; import { isNotNull } from '../../empty.util'; +import { TranslateModule } from '@ngx-translate/core'; /** * A component used to show a search box for groups. */ @Component({ - selector: 'ds-group-search-box', - templateUrl: './group-search-box.component.html', + selector: 'ds-group-search-box', + templateUrl: './group-search-box.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, TranslateModule] }) export class GroupSearchBoxComponent { diff --git a/src/app/shared/error/error.component.spec.ts b/src/app/shared/error/error.component.spec.ts index f8483ac7aa..c6e0ed42b2 100644 --- a/src/app/shared/error/error.component.spec.ts +++ b/src/app/shared/error/error.component.spec.ts @@ -17,17 +17,17 @@ describe('ErrorComponent (inline template)', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [ErrorComponent], // declare the test component - providers: [TranslateService] - }).compileComponents(); // compile template and css + ErrorComponent + ], + providers: [TranslateService] +}).compileComponents(); // compile template and css })); beforeEach(() => { diff --git a/src/app/shared/error/error.component.ts b/src/app/shared/error/error.component.ts index 6572598c8b..2a050b80f5 100644 --- a/src/app/shared/error/error.component.ts +++ b/src/app/shared/error/error.component.ts @@ -4,11 +4,14 @@ import { TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { AlertType } from '../alert/alert-type'; +import { AlertComponent } from '../alert/alert.component'; @Component({ - selector: 'ds-error', - styleUrls: ['./error.component.scss'], - templateUrl: './error.component.html' + selector: 'ds-error', + styleUrls: ['./error.component.scss'], + templateUrl: './error.component.html', + standalone: true, + imports: [AlertComponent] }) export class ErrorComponent { diff --git a/src/app/shared/file-download-link/file-download-link.component.spec.ts b/src/app/shared/file-download-link/file-download-link.component.spec.ts index 61e9ecb4aa..9f322e9fe7 100644 --- a/src/app/shared/file-download-link/file-download-link.component.spec.ts +++ b/src/app/shared/file-download-link/file-download-link.component.spec.ts @@ -41,11 +41,12 @@ describe('FileDownloadLinkComponent', () => { function initTestbed() { TestBed.configureTestingModule({ - declarations: [FileDownloadLinkComponent, RouterLinkDirectiveStub], - providers: [ - {provide: AuthorizationDataService, useValue: authorizationService}, - ] - }) + imports: [FileDownloadLinkComponent], + declarations: [RouterLinkDirectiveStub], + providers: [ + { provide: AuthorizationDataService, useValue: authorizationService }, + ] +}) .compileComponents(); } diff --git a/src/app/shared/file-download-link/file-download-link.component.ts b/src/app/shared/file-download-link/file-download-link.component.ts index a79a71b634..7cbafacd66 100644 --- a/src/app/shared/file-download-link/file-download-link.component.ts +++ b/src/app/shared/file-download-link/file-download-link.component.ts @@ -7,11 +7,15 @@ import { hasValue, isNotEmpty } from '../empty.util'; import { map } from 'rxjs/operators'; import { of as observableOf, combineLatest as observableCombineLatest, Observable } from 'rxjs'; import { Item } from '../../core/shared/item.model'; +import { NgClass, NgIf, NgTemplateOutlet, AsyncPipe } from '@angular/common'; +import { RouterLink } from '@angular/router'; @Component({ - selector: 'ds-file-download-link', - templateUrl: './file-download-link.component.html', - styleUrls: ['./file-download-link.component.scss'] + selector: 'ds-file-download-link', + templateUrl: './file-download-link.component.html', + styleUrls: ['./file-download-link.component.scss'], + standalone: true, + imports: [RouterLink, NgClass, NgIf, NgTemplateOutlet, AsyncPipe] }) /** * Component displaying a download link diff --git a/src/app/shared/file-download-link/themed-file-download-link.component.ts b/src/app/shared/file-download-link/themed-file-download-link.component.ts index 4e619b8f28..e77adabc41 100644 --- a/src/app/shared/file-download-link/themed-file-download-link.component.ts +++ b/src/app/shared/file-download-link/themed-file-download-link.component.ts @@ -5,9 +5,10 @@ import { Bitstream } from '../../core/shared/bitstream.model'; import { Item } from '../../core/shared/item.model'; @Component({ - selector: 'ds-themed-file-download-link', - styleUrls: [], - templateUrl: '../theme-support/themed.component.html', + selector: 'ds-themed-file-download-link', + styleUrls: [], + templateUrl: '../theme-support/themed.component.html', + standalone: true }) export class ThemedFileDownloadLinkComponent extends ThemedComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts index ff5a119b6f..7f3a597b98 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts @@ -17,7 +17,7 @@ import { ViewChild, ViewContainerRef } from '@angular/core'; -import { UntypedFormArray, UntypedFormGroup } from '@angular/forms'; +import { FormsModule, ReactiveFormsModule, UntypedFormArray, UntypedFormGroup } from '@angular/forms'; import { DYNAMIC_FORM_CONTROL_TYPE_ARRAY, @@ -55,8 +55,11 @@ import { DynamicNGBootstrapTextAreaComponent, DynamicNGBootstrapTimePickerComponent } from '@ng-dynamic-forms/ui-ng-bootstrap'; -import { TranslateService } from '@ngx-translate/core'; -import { ReorderableRelationship } from './existing-metadata-list-element/existing-metadata-list-element.component'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; +import { + ExistingMetadataListElementComponent, + ReorderableRelationship +} from './existing-metadata-list-element/existing-metadata-list-element.component'; import { DYNAMIC_FORM_CONTROL_TYPE_ONEBOX } from './models/onebox/dynamic-onebox.model'; import { DYNAMIC_FORM_CONTROL_TYPE_SCROLLABLE_DROPDOWN } from './models/scrollable-dropdown/dynamic-scrollable-dropdown.model'; @@ -84,7 +87,7 @@ import { combineLatest as observableCombineLatest, Observable, Subscription } fr import { DsDynamicTypeBindRelationService } from './ds-dynamic-type-bind-relation.service'; import { SearchResult } from '../../../search/models/search-result.model'; import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; -import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { NgbModal, NgbModalRef, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { RelationshipDataService } from '../../../../core/data/relationship-data.service'; import { SelectableListService } from '../../../object-list/selectable-list/selectable-list.service'; import { DsDynamicDisabledComponent } from './models/disabled/dynamic-disabled.component'; @@ -120,6 +123,10 @@ import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './ds-dynamic-form-cons import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model'; import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface'; import { itemLinksToFollow } from '../../../utils/relation-query.utils'; +import { AsyncPipe, NgClass, NgForOf, NgIf, NgTemplateOutlet } from "@angular/common"; +import { + ExistingRelationListElementComponent +} from "./existing-relation-list-element/existing-relation-list-element.component"; export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type | null { switch (model.type) { @@ -191,7 +198,21 @@ export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type< selector: 'ds-dynamic-form-control-container', styleUrls: ['./ds-dynamic-form-control-container.component.scss'], templateUrl: './ds-dynamic-form-control-container.component.html', - changeDetection: ChangeDetectionStrategy.Default + changeDetection: ChangeDetectionStrategy.Default, + imports: [ + ExistingMetadataListElementComponent, + NgIf, + NgClass, + AsyncPipe, + TranslateModule, + ReactiveFormsModule, + NgForOf, + FormsModule, + NgbTooltipModule, + NgTemplateOutlet, + ExistingRelationListElementComponent + ], + standalone: true }) export class DsDynamicFormControlContainerComponent extends DynamicFormControlContainerComponent implements OnInit, OnChanges, OnDestroy { @ContentChildren(DynamicTemplateDirective) contentTemplateList: QueryList; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts index 45511d6941..fbcaab5f02 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, ContentChildren, - EventEmitter, + EventEmitter, forwardRef, Input, Output, QueryList, @@ -19,10 +19,16 @@ import { DynamicTemplateDirective, } from '@ng-dynamic-forms/core'; import { DsDynamicFormControlContainerComponent } from './ds-dynamic-form-control-container.component'; +import { NgForOf } from '@angular/common'; @Component({ selector: 'ds-dynamic-form', - templateUrl: './ds-dynamic-form.component.html' + templateUrl: './ds-dynamic-form.component.html', + imports: [ + forwardRef(() => DsDynamicFormControlContainerComponent), + NgForOf + ], + standalone: true }) export class DsDynamicFormComponent extends DynamicFormComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.spec.ts index b5af2a8843..3aa73d3efb 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.spec.ts @@ -72,22 +72,22 @@ describe('ExistingMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ExistingMetadataListElementComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ExistingMetadataListElementComponent + ], + providers: [ { provide: SelectableListService, useValue: selectionService }, { provide: Store, useValue: store }, { provide: SubmissionService, useValue: submissionServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts index aa50133e8a..8c440b6206 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.ts @@ -21,6 +21,12 @@ import { DynamicConcatModel } from '../models/ds-dynamic-concat.model'; import { RemoveRelationshipAction } from '../relation-lookup-modal/relationship.actions'; import { SubmissionService } from '../../../../../submission/submission.service'; import { SubmissionObjectEntry } from '../../../../../submission/objects/submission-objects.reducer'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ThemedLoadingComponent } from '../../../../loading/themed-loading.component'; +import { + MetadataRepresentationLoaderComponent +} from '../../../../metadata-representation/metadata-representation-loader.component'; +import { TranslateModule } from '@ngx-translate/core'; /** * Abstract class that defines objects that can be reordered @@ -136,7 +142,15 @@ export class ReorderableRelationship extends Reorderable { @Component({ selector: 'ds-existing-metadata-list-element', templateUrl: './existing-metadata-list-element.component.html', - styleUrls: ['./existing-metadata-list-element.component.scss'] + styleUrls: ['./existing-metadata-list-element.component.scss'], + imports: [ + NgIf, + ThemedLoadingComponent, + AsyncPipe, + MetadataRepresentationLoaderComponent, + TranslateModule + ], + standalone: true }) export class ExistingMetadataListElementComponent implements OnInit, OnChanges, OnDestroy { @Input() listId: string; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.spec.ts index 5a53599f91..897ed82b51 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.spec.ts @@ -65,14 +65,14 @@ describe('ExistingRelationListElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ExistingRelationListElementComponent], - providers: [ + imports: [ExistingRelationListElementComponent], + providers: [ { provide: SelectableListService, useValue: selectionService }, { provide: Store, useValue: store }, { provide: SubmissionService, useClass: SubmissionServiceStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts index c3a8b157a6..89af38ada4 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.ts @@ -14,6 +14,11 @@ import { RemoveRelationshipAction } from '../relation-lookup-modal/relationship. import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { ReorderableRelationship } from '../existing-metadata-list-element/existing-metadata-list-element.component'; import { SubmissionService } from '../../../../../submission/submission.service'; +import { ThemedLoadingComponent } from '../../../../loading/themed-loading.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { + ListableObjectComponentLoaderComponent +} from '../../../../object-collection/shared/listable-object/listable-object-component-loader.component'; /** * Abstract class that defines objects that can be reordered @@ -53,7 +58,14 @@ export abstract class Reorderable { @Component({ selector: 'ds-existing-relation-list-element', templateUrl: './existing-relation-list-element.component.html', - styleUrls: ['./existing-relation-list-element.component.scss'] + styleUrls: ['./existing-relation-list-element.component.scss'], + imports: [ + ThemedLoadingComponent, + AsyncPipe, + ListableObjectComponentLoaderComponent, + NgIf + ], + standalone: true }) export class ExistingRelationListElementComponent implements OnInit, OnChanges, OnDestroy { @Input() listId: string; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts index 9d48bdac21..8c85cf143d 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component.ts @@ -1,6 +1,6 @@ -import { CdkDragDrop } from '@angular/cdk/drag-drop'; -import { Component, EventEmitter, Input, Output, QueryList } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { CdkDrag, CdkDragDrop, CdkDragHandle, CdkDropList } from '@angular/cdk/drag-drop'; +import { Component, EventEmitter, forwardRef, Input, Output, QueryList } from '@angular/core'; +import { ReactiveFormsModule, UntypedFormGroup } from '@angular/forms'; import { DynamicFormArrayComponent, DynamicFormControlCustomEvent, @@ -15,11 +15,24 @@ import { import { Relationship } from '../../../../../../core/shared/item-relationships/relationship.model'; import { hasValue } from '../../../../../empty.util'; import { DynamicRowArrayModel } from '../ds-dynamic-row-array-model'; +import { NgClass, NgForOf, NgTemplateOutlet } from '@angular/common'; +import { DsDynamicFormControlContainerComponent } from '../../ds-dynamic-form-control-container.component'; @Component({ selector: 'ds-dynamic-form-array', templateUrl: './dynamic-form-array.component.html', - styleUrls: ['./dynamic-form-array.component.scss'] + styleUrls: ['./dynamic-form-array.component.scss'], + imports: [ + ReactiveFormsModule, + CdkDropList, + NgClass, + NgForOf, + CdkDrag, + CdkDragHandle, + forwardRef(() => DsDynamicFormControlContainerComponent), + NgTemplateOutlet + ], + standalone: true }) export class DsDynamicFormArrayComponent extends DynamicFormArrayComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts index ceb498fe56..d47ce50f96 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.spec.ts @@ -19,14 +19,13 @@ describe('CustomSwitchComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ ReactiveFormsModule, NoopAnimationsModule, - DynamicFormsCoreModule.forRoot() - ], - declarations: [CustomSwitchComponent] - - }).compileComponents().then(() => { + DynamicFormsCoreModule.forRoot(), + CustomSwitchComponent + ] +}).compileComponents().then(() => { fixture = TestBed.createComponent(CustomSwitchComponent); component = fixture.componentInstance; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts index 47780e66f6..f58a0e9d4f 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/custom-switch/custom-switch.component.ts @@ -1,15 +1,21 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { ReactiveFormsModule, UntypedFormGroup } from '@angular/forms'; import { DynamicNGBootstrapCheckboxComponent } from '@ng-dynamic-forms/ui-ng-bootstrap'; import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; import { DynamicCustomSwitchModel } from './custom-switch.model'; +import { NgClass } from "@angular/common"; @Component({ selector: 'ds-custom-switch', styleUrls: ['./custom-switch.component.scss'], templateUrl: './custom-switch.component.html', + imports: [ + NgClass, + ReactiveFormsModule + ], + standalone: true }) /** * Component displaying a custom switch usable in dynamic forms diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts index c0d1c83bf9..91fed6cdd8 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.spec.ts @@ -20,16 +20,14 @@ describe('DsDatePickerInlineComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - - imports: [ + imports: [ ReactiveFormsModule, NoopAnimationsModule, NgbDatepickerModule, - DynamicFormsCoreModule.forRoot() - ], - declarations: [DsDatePickerInlineComponent] - - }).compileComponents().then(() => { + DynamicFormsCoreModule.forRoot(), + DsDatePickerInlineComponent + ] +}).compileComponents().then(() => { fixture = TestBed.createComponent(DsDatePickerInlineComponent); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts index 2eb6e9291c..00e71e4e04 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, Input, Output, ViewChild } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; -import { NgbDatepicker, NgbDatepickerConfig } from '@ng-bootstrap/ng-bootstrap'; +import { ReactiveFormsModule, UntypedFormGroup } from '@angular/forms'; +import { NgbDatepicker, NgbDatepickerConfig, NgbDatepickerModule } from '@ng-bootstrap/ng-bootstrap'; import { DynamicDatePickerModel, DynamicFormControlComponent, @@ -8,10 +8,18 @@ import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; +import { NgClass, NgIf } from '@angular/common'; @Component({ selector: 'ds-dynamic-date-picker-inline', - templateUrl: './dynamic-date-picker-inline.component.html' + templateUrl: './dynamic-date-picker-inline.component.html', + imports: [ + NgClass, + NgbDatepickerModule, + ReactiveFormsModule, + NgIf + ], + standalone: true }) export class DsDatePickerInlineComponent extends DynamicFormControlComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts index ffc36008c6..c6bd80cde1 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.spec.ts @@ -43,21 +43,19 @@ describe('DsDatePickerComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - NgbModule - ], - declarations: [ + imports: [ + NgbModule, DsDatePickerComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, DsDatePickerComponent, { provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService }, { provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -240,8 +238,10 @@ describe('DsDatePickerComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts index 8d5ce5b48e..81de011a24 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { FormsModule, UntypedFormGroup } from '@angular/forms'; import { DynamicDsDatePickerModel } from './date-picker.model'; import { hasValue } from '../../../../../empty.util'; import { @@ -7,6 +7,8 @@ import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; +import { NgClass, NgIf } from '@angular/common'; +import { NumberPickerComponent } from '../../../../number-picker/number-picker.component'; export const DS_DATE_PICKER_SEPARATOR = '-'; @@ -14,6 +16,13 @@ export const DS_DATE_PICKER_SEPARATOR = '-'; selector: 'ds-date-picker', styleUrls: ['./date-picker.component.scss'], templateUrl: './date-picker.component.html', + imports: [ + NgClass, + NgIf, + NumberPickerComponent, + FormsModule + ], + standalone: true }) export class DsDatePickerComponent extends DynamicFormControlComponent implements OnInit { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts index a25ad4d231..d8b873656a 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.spec.ts @@ -39,14 +39,13 @@ describe('DsDynamicDisabledComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [DsDynamicDisabledComponent], - imports: [FormsModule, TranslateModule.forRoot()], - providers: [ + imports: [FormsModule, TranslateModule.forRoot(), DsDynamicDisabledComponent], + providers: [ { provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService }, { provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts index 222ad51049..6b8fbeeae8 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/disabled/dynamic-disabled.component.ts @@ -4,13 +4,18 @@ import { UntypedFormGroup } from '@angular/forms'; import { DynamicFormControlComponent, DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; import { DynamicDisabledModel } from './dynamic-disabled.model'; +import { TranslateModule } from '@ngx-translate/core'; /** * Component representing a simple disabled input field */ @Component({ selector: 'ds-dynamic-disabled', - templateUrl: './dynamic-disabled.component.html' + templateUrl: './dynamic-disabled.component.html', + imports: [ + TranslateModule + ], + standalone: true }) /** * Component for displaying a form input with a disabled property diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts index cfd1bc293c..ebbc7712c4 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/form-group/dynamic-form-group.component.ts @@ -1,5 +1,5 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, QueryList } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { ChangeDetectionStrategy, Component, EventEmitter, forwardRef, Input, Output, QueryList } from '@angular/core'; +import { ReactiveFormsModule, UntypedFormGroup } from '@angular/forms'; import { DynamicFormControlComponent, DynamicFormControlCustomEvent, @@ -12,11 +12,20 @@ import { DynamicFormValidationService, DynamicTemplateDirective } from '@ng-dynamic-forms/core'; +import { NgClass, NgForOf } from '@angular/common'; +import { DsDynamicFormControlContainerComponent } from '../../ds-dynamic-form-control-container.component'; @Component({ selector: 'ds-dynamic-form-group', templateUrl: './dynamic-form-group.component.html', - changeDetection: ChangeDetectionStrategy.Default + changeDetection: ChangeDetectionStrategy.Default, + imports: [ + ReactiveFormsModule, + NgClass, + NgForOf, + forwardRef(() => DsDynamicFormControlContainerComponent), + ], + standalone: true }) export class DsDynamicFormGroupComponent extends DynamicFormControlComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.spec.ts index 51ce584bb1..89b730f942 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.spec.ts @@ -78,18 +78,16 @@ describe('DsDynamicListComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ DynamicFormsCoreModule, DynamicFormsNGBootstrapUIModule, FormsModule, ReactiveFormsModule, - NgbModule - ], - declarations: [ + NgbModule, DsDynamicListComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, DsDynamicListComponent, DynamicFormValidationService, @@ -97,9 +95,9 @@ describe('DsDynamicListComponent test suite', () => { { provide: VocabularyService, useValue: vocabularyServiceStub }, { provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService }, { provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -286,8 +284,14 @@ describe('DsDynamicListComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [DynamicFormsCoreModule, + DynamicFormsNGBootstrapUIModule, + FormsModule, + ReactiveFormsModule, + NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts index 16c46fc26b..ea15aeb745 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/list/dynamic-list.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { UntypedFormGroup, ValidatorFn, ValidationErrors, AbstractControl } from '@angular/forms'; +import { UntypedFormGroup, ValidatorFn, ValidationErrors, AbstractControl, ReactiveFormsModule } from '@angular/forms'; import { DynamicCheckboxModel, DynamicFormControlComponent, @@ -17,6 +17,8 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/share import { PaginatedList } from '../../../../../../core/data/paginated-list.model'; import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model'; import { PageInfo } from '../../../../../../core/shared/page-info.model'; +import { NgClass, NgForOf, NgIf } from '@angular/common'; +import { NgbButtonsModule } from '@ng-bootstrap/ng-bootstrap'; export interface ListItem { id: string; @@ -31,7 +33,15 @@ export interface ListItem { @Component({ selector: 'ds-dynamic-list', styleUrls: ['./dynamic-list.component.scss'], - templateUrl: './dynamic-list.component.html' + templateUrl: './dynamic-list.component.html', + imports: [ + NgClass, + NgIf, + NgbButtonsModule, + NgForOf, + ReactiveFormsModule + ], + standalone: true }) export class DsDynamicListComponent extends DynamicFormControlComponent implements OnInit { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.spec.ts index 2fea4fc985..98defc8887 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.spec.ts @@ -140,30 +140,28 @@ describe('Dynamic Lookup component', () => { beforeEach(waitForAsync(() => { vocabularyServiceStub = new VocabularyServiceStub(); TestBed.configureTestingModule({ - imports: [ + imports: [ DynamicFormsCoreModule, DynamicFormsNGBootstrapUIModule, FormsModule, InfiniteScrollModule, ReactiveFormsModule, NgbModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), DsDynamicLookupComponent, TestComponent, AuthorityConfidenceStateDirective, ObjNgFor - ], // declare the test component - providers: [ + ], + providers: [ ChangeDetectorRef, DsDynamicLookupComponent, { provide: VocabularyService, useValue: vocabularyServiceStub }, { provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService }, { provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); beforeEach(() => { @@ -559,8 +557,15 @@ describe('Dynamic Lookup component', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [DynamicFormsCoreModule, + DynamicFormsNGBootstrapUIModule, + FormsModule, + InfiniteScrollModule, + ReactiveFormsModule, + NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.ts index 63545f45d2..bae8c13ad2 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component.ts @@ -1,9 +1,9 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { FormsModule, UntypedFormGroup } from '@angular/forms'; import { of as observableOf, Subscription } from 'rxjs'; import { catchError, distinctUntilChanged } from 'rxjs/operators'; -import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'; +import { NgbDropdown, NgbDropdownModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service'; @@ -19,6 +19,11 @@ import { } from '../../../../../../core/data/paginated-list.model'; import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/shared/operators'; import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { AuthorityConfidenceStateDirective } from '../../../../directives/authority-confidence-state.directive'; +import { NgClass, NgForOf, NgIf, NgTemplateOutlet } from '@angular/common'; +import { InfiniteScrollModule } from 'ngx-infinite-scroll'; +import { ObjNgFor } from '../../../../../utils/object-ngfor.pipe'; /** * Component representing a lookup or lookup-name input field @@ -26,7 +31,21 @@ import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component'; @Component({ selector: 'ds-dynamic-lookup', styleUrls: ['./dynamic-lookup.component.scss'], - templateUrl: './dynamic-lookup.component.html' + templateUrl: './dynamic-lookup.component.html', + imports: [ + TranslateModule, + NgbTooltipModule, + NgbDropdownModule, + AuthorityConfidenceStateDirective, + FormsModule, + NgIf, + NgClass, + InfiniteScrollModule, + NgForOf, + NgTemplateOutlet, + ObjNgFor + ], + standalone: true }) export class DsDynamicLookupComponent extends DsDynamicVocabularyComponent implements OnDestroy, OnInit { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts index 69520aba63..0f5e88bcd6 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.spec.ts @@ -127,32 +127,30 @@ describe('DsDynamicOneboxComponent test suite', () => { ); init(); TestBed.configureTestingModule({ - imports: [ + imports: [ DynamicFormsCoreModule, DynamicFormsNGBootstrapUIModule, FormsModule, NgbModule, ReactiveFormsModule, TranslateModule.forRoot(), - CdkTreeModule - ], - declarations: [ + CdkTreeModule, DsDynamicOneboxComponent, TestComponent, AuthorityConfidenceStateDirective, ObjNgFor, VocabularyTreeviewComponent - ], // declare the test component - providers: [ + ], + providers: [ ChangeDetectorRef, DsDynamicOneboxComponent, { provide: VocabularyService, useValue: vocabularyServiceStub }, { provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService }, { provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService }, { provide: NgbModal, useValue: modal } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); }); @@ -452,8 +450,15 @@ describe('DsDynamicOneboxComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [DynamicFormsCoreModule, + DynamicFormsNGBootstrapUIModule, + FormsModule, + NgbModule, + ReactiveFormsModule, + CdkTreeModule] }) class TestComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.ts index 2ff4256404..f7d6ef4d13 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/onebox/dynamic-onebox.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { FormsModule, UntypedFormGroup } from '@angular/forms'; import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; import { @@ -14,7 +14,13 @@ import { tap } from 'rxjs/operators'; import { Observable, of as observableOf, Subject, Subscription } from 'rxjs'; -import { NgbModal, NgbModalRef, NgbTypeahead, NgbTypeaheadSelectItemEvent } from '@ng-bootstrap/ng-bootstrap'; +import { + NgbModal, + NgbModalRef, + NgbTypeahead, + NgbTypeaheadModule, + NgbTypeaheadSelectItemEvent +} from '@ng-bootstrap/ng-bootstrap'; import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service'; import { DynamicOneboxModel } from './dynamic-onebox.model'; @@ -32,6 +38,10 @@ import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component'; import { Vocabulary } from '../../../../../../core/submission/vocabularies/models/vocabulary.model'; import { VocabularyEntryDetail } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry-detail.model'; import { VocabularyTreeviewModalComponent } from '../../../../vocabulary-treeview-modal/vocabulary-treeview-modal.component'; +import { AsyncPipe, NgForOf, NgIf, NgTemplateOutlet } from '@angular/common'; +import { AuthorityConfidenceStateDirective } from '../../../../directives/authority-confidence-state.directive'; +import { TranslateModule } from '@ngx-translate/core'; +import { ObjNgFor } from '../../../../../utils/object-ngfor.pipe'; /** * Component representing a onebox input field. @@ -40,7 +50,19 @@ import { VocabularyTreeviewModalComponent } from '../../../../vocabulary-treevie @Component({ selector: 'ds-dynamic-onebox', styleUrls: ['./dynamic-onebox.component.scss'], - templateUrl: './dynamic-onebox.component.html' + templateUrl: './dynamic-onebox.component.html', + imports: [ + NgbTypeaheadModule, + NgIf, + AsyncPipe, + AuthorityConfidenceStateDirective, + NgTemplateOutlet, + TranslateModule, + ObjNgFor, + NgForOf, + FormsModule + ], + standalone: true }) export class DsDynamicOneboxComponent extends DsDynamicVocabularyComponent implements OnInit { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts index feca7f95c6..40e73065b8 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts @@ -107,20 +107,18 @@ describe('DsDynamicRelationGroupComponent test suite', () => { /* TODO make sure these files use mocks instead of real services/components https://github.com/DSpace/dspace-angular/issues/281 */ TestBed.configureTestingModule({ - imports: [ + imports: [ BrowserAnimationsModule, FormsModule, ReactiveFormsModule, NgbModule, StoreModule.forRoot({}, storeModuleConfig), - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), FormComponent, DsDynamicRelationGroupComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, DsDynamicRelationGroupComponent, DynamicFormValidationService, @@ -130,9 +128,9 @@ describe('DsDynamicRelationGroupComponent test suite', () => { FormService, { provide: VocabularyService, useValue: new VocabularyServiceStub() }, { provide: Store, useClass: StoreMock } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -314,8 +312,12 @@ describe('DsDynamicRelationGroupComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FormsModule, + ReactiveFormsModule, + NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts index 7fdfb61b74..5c9d10909a 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components.ts @@ -1,4 +1,14 @@ -import { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild } from '@angular/core'; +import { + ChangeDetectorRef, + Component, + EventEmitter, + forwardRef, + Input, + OnDestroy, + OnInit, + Output, + ViewChild +} from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { combineLatest, Observable, of as observableOf, Subscription } from 'rxjs'; @@ -30,6 +40,11 @@ import { environment } from '../../../../../../../environments/environment'; import { PLACEHOLDER_PARENT_METADATA } from '../../ds-dynamic-form-constants'; import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/shared/operators'; import { VocabularyEntryDetail } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry-detail.model'; +import { AsyncPipe, NgClass, NgIf } from '@angular/common'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../../../../loading/themed-loading.component'; +import { ChipsComponent } from '../../../../chips/chips.component'; /** * Component representing a group input field @@ -38,7 +53,18 @@ import { VocabularyEntryDetail } from '../../../../../../core/submission/vocabul selector: 'ds-dynamic-relation-group', styleUrls: ['./dynamic-relation-group.component.scss'], templateUrl: './dynamic-relation-group.component.html', - animations: [shrinkInOut] + animations: [shrinkInOut], + imports: [ + NgIf, + AsyncPipe, + NgbTooltipModule, + TranslateModule, + NgClass, + ThemedLoadingComponent, + ChipsComponent, + forwardRef(() => FormComponent), + ], + standalone: true }) export class DsDynamicRelationGroupComponent extends DynamicFormControlComponent implements OnDestroy, OnInit { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.spec.ts index 05e46c6e6d..51d9a42fc3 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.spec.ts @@ -61,28 +61,26 @@ describe('Dynamic Dynamic Scrollable Dropdown component', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ DynamicFormsCoreModule, DynamicFormsNGBootstrapUIModule, FormsModule, InfiniteScrollModule, ReactiveFormsModule, NgbModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), DsDynamicScrollableDropdownComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, DsDynamicScrollableDropdownComponent, { provide: VocabularyService, useValue: vocabularyServiceStub }, { provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService }, { provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -215,8 +213,15 @@ describe('Dynamic Dynamic Scrollable Dropdown component', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [DynamicFormsCoreModule, + DynamicFormsNGBootstrapUIModule, + FormsModule, + InfiniteScrollModule, + ReactiveFormsModule, + NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts index a4ca210193..7b5ab1ff60 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/scrollable-dropdown/dynamic-scrollable-dropdown.component.ts @@ -3,7 +3,7 @@ import { UntypedFormGroup } from '@angular/forms'; import { Observable, of as observableOf } from 'rxjs'; import { catchError, distinctUntilChanged, map, tap } from 'rxjs/operators'; -import { NgbDropdown } from '@ng-bootstrap/ng-bootstrap'; +import { NgbDropdown, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model'; @@ -18,6 +18,9 @@ import { } from '../../../../../../core/data/paginated-list.model'; import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component'; import { FormFieldMetadataValueObject } from '../../../models/form-field-metadata-value.model'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; +import { InfiniteScrollModule } from 'ngx-infinite-scroll'; +import { TranslateModule } from '@ngx-translate/core'; /** * Component representing a dropdown input field @@ -25,7 +28,16 @@ import { FormFieldMetadataValueObject } from '../../../models/form-field-metadat @Component({ selector: 'ds-dynamic-scrollable-dropdown', styleUrls: ['./dynamic-scrollable-dropdown.component.scss'], - templateUrl: './dynamic-scrollable-dropdown.component.html' + templateUrl: './dynamic-scrollable-dropdown.component.html', + imports: [ + NgbDropdownModule, + NgIf, + AsyncPipe, + InfiniteScrollModule, + NgForOf, + TranslateModule + ], + standalone: true }) export class DsDynamicScrollableDropdownComponent extends DsDynamicVocabularyComponent implements OnInit { @Input() bindId = true; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.spec.ts index a6a4c45170..1414f13393 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.spec.ts @@ -75,26 +75,24 @@ describe('DsDynamicTagComponent test suite', () => { const vocabularyServiceStub = new VocabularyServiceStub(); init(); TestBed.configureTestingModule({ - imports: [ + imports: [ DynamicFormsCoreModule, DynamicFormsNGBootstrapUIModule, FormsModule, NgbModule, ReactiveFormsModule, - ], - declarations: [ DsDynamicTagComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, DsDynamicTagComponent, { provide: VocabularyService, useValue: vocabularyServiceStub }, { provide: DynamicFormLayoutService, useValue: mockDynamicFormLayoutService }, { provide: DynamicFormValidationService, useValue: mockDynamicFormValidationService } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -286,8 +284,14 @@ describe('DsDynamicTagComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [DynamicFormsCoreModule, + DynamicFormsNGBootstrapUIModule, + FormsModule, + NgbModule, + ReactiveFormsModule] }) class TestComponent { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.ts index 4abb68a53b..248bd0ace8 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/tag/dynamic-tag.component.ts @@ -1,10 +1,10 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; -import { UntypedFormGroup } from '@angular/forms'; +import { FormsModule, UntypedFormGroup } from '@angular/forms'; import { DynamicFormLayoutService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; import { Observable, of as observableOf } from 'rxjs'; import { catchError, debounceTime, distinctUntilChanged, map, merge, switchMap, tap } from 'rxjs/operators'; -import { NgbTypeahead, NgbTypeaheadSelectItemEvent } from '@ng-bootstrap/ng-bootstrap'; +import { NgbTypeahead, NgbTypeaheadModule, NgbTypeaheadSelectItemEvent } from '@ng-bootstrap/ng-bootstrap'; import isEqual from 'lodash/isEqual'; import { VocabularyService } from '../../../../../../core/submission/vocabularies/vocabulary.service'; @@ -20,6 +20,8 @@ import { import { VocabularyEntry } from '../../../../../../core/submission/vocabularies/models/vocabulary-entry.model'; import { PageInfo } from '../../../../../../core/shared/page-info.model'; import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component'; +import { NgIf } from '@angular/common'; +import { ChipsComponent } from '../../../../chips/chips.component'; /** * Component representing a tag input field @@ -27,7 +29,14 @@ import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component'; @Component({ selector: 'ds-dynamic-tag', styleUrls: ['./dynamic-tag.component.scss'], - templateUrl: './dynamic-tag.component.html' + templateUrl: './dynamic-tag.component.html', + imports: [ + NgbTypeaheadModule, + FormsModule, + NgIf, + ChipsComponent + ], + standalone: true }) export class DsDynamicTagComponent extends DsDynamicVocabularyComponent implements OnInit { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.spec.ts index 9d57296f82..f84d4c36af 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.spec.ts @@ -103,36 +103,35 @@ describe('DsDynamicLookupRelationModalComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [DsDynamicLookupRelationModalComponent], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule, DsDynamicLookupRelationModalComponent], + providers: [ { - provide: SearchConfigurationService, useValue: { - paginatedSearchOptions: observableOf(pSearchOptions) - } + provide: SearchConfigurationService, useValue: { + paginatedSearchOptions: observableOf(pSearchOptions) + } }, { provide: ExternalSourceDataService, useValue: externalSourceService }, { provide: LookupRelationService, useValue: lookupRelationService }, { - provide: SelectableListService, useValue: selectableListService + provide: SelectableListService, useValue: selectableListService }, { - provide: RelationshipDataService, useValue: { getNameVariant: () => observableOf(nameVariant) } + provide: RelationshipDataService, useValue: { getNameVariant: () => observableOf(nameVariant) } }, { provide: RelationshipTypeDataService, useValue: {} }, { provide: RemoteDataBuildService, useValue: rdbService }, { - provide: Store, useValue: { - // eslint-disable-next-line no-empty, @typescript-eslint/no-empty-function - dispatch: () => { + provide: Store, useValue: { + // eslint-disable-next-line no-empty, @typescript-eslint/no-empty-function + dispatch: () => { + } } - } }, { provide: NgZone, useValue: new NgZone({}) }, NgbActiveModal - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts index 446497a74f..acf532c3ab 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/dynamic-lookup-relation-modal.component.ts @@ -1,6 +1,6 @@ import { Component, EventEmitter, NgZone, OnDestroy, OnInit, Output } from '@angular/core'; import { combineLatest as observableCombineLatest, Observable, Subscription, BehaviorSubject } from 'rxjs'; -import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; +import { NgbActiveModal, NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { hasValue, isNotEmpty } from '../../../../empty.util'; import { map, skip, switchMap, take } from 'rxjs/operators'; import { SEARCH_CONFIG_SERVICE } from '../../../../../my-dspace-page/my-dspace-page.component'; @@ -29,6 +29,18 @@ import { RemoteDataBuildService } from '../../../../../core/cache/builders/remot import { getAllSucceededRemoteDataPayload } from '../../../../../core/shared/operators'; import { followLink } from '../../../../utils/follow-link-config.model'; import { RelationshipType } from '../../../../../core/shared/item-relationships/relationship-type.model'; +import { + ThemedDynamicLookupRelationExternalSourceTabComponent +} from "./external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component"; +import { TranslateModule } from "@ngx-translate/core"; +import { ThemedLoadingComponent } from "../../../../loading/themed-loading.component"; +import { AsyncPipe, NgForOf, NgIf } from "@angular/common"; +import { + ThemedDynamicLookupRelationSearchTabComponent +} from "./search-tab/themed-dynamic-lookup-relation-search-tab.component"; +import { + DsDynamicLookupRelationSelectionTabComponent +} from "./selection-tab/dynamic-lookup-relation-selection-tab.component"; @Component({ selector: 'ds-dynamic-lookup-relation-modal', @@ -39,7 +51,19 @@ import { RelationshipType } from '../../../../../core/shared/item-relationships/ provide: SEARCH_CONFIG_SERVICE, useClass: SearchConfigurationService } - ] + ], + imports: [ + ThemedDynamicLookupRelationExternalSourceTabComponent, + TranslateModule, + ThemedLoadingComponent, + NgIf, + NgbNavModule, + ThemedDynamicLookupRelationSearchTabComponent, + AsyncPipe, + NgForOf, + DsDynamicLookupRelationSelectionTabComponent + ], + standalone: true }) /** diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.spec.ts index cfffc5ddb7..3a03ec2e1b 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.spec.ts @@ -103,20 +103,19 @@ describe('DsDynamicLookupRelationExternalSourceTabComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [DsDynamicLookupRelationExternalSourceTabComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule, BrowserAnimationsModule], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule, BrowserAnimationsModule, DsDynamicLookupRelationExternalSourceTabComponent, VarDirective], + providers: [ { - provide: SearchConfigurationService, useValue: { - paginatedSearchOptions: observableOf(pSearchOptions) - } + provide: SearchConfigurationService, useValue: { + paginatedSearchOptions: observableOf(pSearchOptions) + } }, { provide: ExternalSourceDataService, useValue: externalSourceService }, { provide: SelectableListService, useValue: selectableListService }, { provide: PaginationService, useValue: new PaginationServiceStub() } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts index 08ff5378ab..baa9289750 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/dynamic-lookup-relation-external-source-tab.component.ts @@ -25,6 +25,14 @@ import { PaginationService } from '../../../../../../core/pagination/pagination. import { Observable, Subscription } from 'rxjs'; import { ItemType } from '../../../../../../core/shared/item-relationships/item-type.model'; import { getFirstCompletedRemoteData } from '../../../../../../core/shared/operators'; +import { ThemedSearchFormComponent } from '../../../../../search-form/themed-search-form.component'; +import { PageSizeSelectorComponent } from '../../../../../page-size-selector/page-size-selector.component'; +import { ObjectCollectionComponent } from '../../../../../object-collection/object-collection.component'; +import { VarDirective } from '../../../../../utils/var.directive'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { ErrorComponent } from '../../../../../error/error.component'; +import { ThemedLoadingComponent } from '../../../../../loading/themed-loading.component'; @Component({ selector: 'ds-dynamic-lookup-relation-external-source-tab', @@ -39,7 +47,19 @@ import { getFirstCompletedRemoteData } from '../../../../../../core/shared/opera animations: [ fadeIn, fadeInOut - ] + ], + imports: [ + ThemedSearchFormComponent, + PageSizeSelectorComponent, + ObjectCollectionComponent, + VarDirective, + AsyncPipe, + TranslateModule, + ErrorComponent, + NgIf, + ThemedLoadingComponent + ], + standalone: true }) /** * Component rendering the tab content of an external source during submission lookup diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.spec.ts index c8711b6b47..274337b927 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.spec.ts @@ -67,17 +67,16 @@ describe('DsDynamicLookupRelationExternalSourceTabComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [ExternalSourceEntryImportModalComponent], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule, ExternalSourceEntryImportModalComponent], + providers: [ { provide: LookupRelationService, useValue: lookupRelationService }, { provide: SelectableListService, useValue: selectService }, { provide: NotificationsService, useValue: notificationsService }, { provide: ItemDataService, useValue: itemService }, { provide: NgbActiveModal, useValue: modalStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts index bf1f2f7e70..500f0c8f42 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts @@ -21,10 +21,12 @@ import { getFirstSucceededRemoteData, getRemoteDataPayload } from '../../../../. import { switchMap, take } from 'rxjs/operators'; import { ItemSearchResult } from '../../../../../../object-collection/shared/item-search-result.model'; import { NotificationsService } from '../../../../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ItemType } from '../../../../../../../core/shared/item-relationships/item-type.model'; import { SubmissionImportExternalCollectionComponent } from '../../../../../../../submission/import-external/import-external-collection/submission-import-external-collection.component'; import { CollectionListEntry } from '../../../../../../collection-dropdown/collection-dropdown.component'; +import { SearchResultsComponent } from '../../../../../../search/search-results/search-results.component'; +import { AsyncPipe, NgIf } from '@angular/common'; /** * The possible types of import for the external entry @@ -40,7 +42,14 @@ export enum ImportType { @Component({ selector: 'ds-external-source-entry-import-modal', styleUrls: ['./external-source-entry-import-modal.component.scss'], - templateUrl: './external-source-entry-import-modal.component.html' + templateUrl: './external-source-entry-import-modal.component.html', + imports: [ + TranslateModule, + SearchResultsComponent, + NgIf, + AsyncPipe + ], + standalone: true }) /** * Component to display a modal window for importing an external source entry diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/themed-external-source-entry-import-modal.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/themed-external-source-entry-import-modal.component.ts index 26e6097c2d..e5a56479f6 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/themed-external-source-entry-import-modal.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/themed-external-source-entry-import-modal.component.ts @@ -3,9 +3,10 @@ import { ThemedComponent } from '../../../../../../theme-support/themed.componen import { Component } from '@angular/core'; @Component({ - selector: 'ds-themed-external-source-entry-import-modal', - styleUrls: [], - templateUrl: '../../../../../../../shared/theme-support/themed.component.html', + selector: 'ds-themed-external-source-entry-import-modal', + styleUrls: [], + templateUrl: '../../../../../../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedExternalSourceEntryImportModalComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts index 113d902c3d..71996a8643 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/themed-dynamic-lookup-relation-external-source-tab.component.ts @@ -9,9 +9,10 @@ import { ExternalSource } from '../../../../../../core/shared/external-source.mo import { DsDynamicLookupRelationExternalSourceTabComponent } from './dynamic-lookup-relation-external-source-tab.component'; @Component({ - selector: 'ds-themed-dynamic-lookup-relation-external-source-tab', - styleUrls: [], - templateUrl: '../../../../../theme-support/themed.component.html', + selector: 'ds-themed-dynamic-lookup-relation-external-source-tab', + styleUrls: [], + templateUrl: '../../../../../theme-support/themed.component.html', + standalone: true }) export class ThemedDynamicLookupRelationExternalSourceTabComponent extends ThemedComponent { protected inAndOutputNames: (keyof DsDynamicLookupRelationExternalSourceTabComponent & keyof this)[] = ['label', 'listId', diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.spec.ts index f689743156..67a8fe3b22 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.spec.ts @@ -92,25 +92,23 @@ describe('DsDynamicLookupRelationSearchTabComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [DsDynamicLookupRelationSearchTabComponent, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), DsDynamicLookupRelationSearchTabComponent, VarDirective], + providers: [ { provide: SearchService, useValue: { search: () => createSuccessfulRemoteDataObject$(results) } }, { - provide: SelectableListService, useValue: selectableListService + provide: SelectableListService, useValue: selectableListService }, { - provide: SearchConfigurationService, useValue: { - paginatedSearchOptions: observableOf(pSearchOptions) - } + provide: SearchConfigurationService, useValue: { + paginatedSearchOptions: observableOf(pSearchOptions) + } }, { provide: LookupRelationService, useValue: lookupRelationService }, { provide: PaginationService, useValue: new PaginationServiceStub() }, { provide: RelationshipDataService, useValue: relationshipService } - - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts index 9452918a97..b894e6b024 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/dynamic-lookup-relation-search-tab.component.ts @@ -23,6 +23,11 @@ import { RelationshipType } from '../../../../../../core/shared/item-relationshi import { Relationship } from '../../../../../../core/shared/item-relationships/relationship.model'; import { SearchObjects } from '../../../../../search/models/search-objects.model'; import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { VarDirective } from '../../../../../utils/var.directive'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { ThemedSearchComponent } from '../../../../../search/themed-search.component'; @Component({ @@ -34,7 +39,16 @@ import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model' provide: SEARCH_CONFIG_SERVICE, useClass: SearchConfigurationService } - ] + ], + imports: [ + AsyncPipe, + VarDirective, + TranslateModule, + NgbDropdownModule, + NgIf, + ThemedSearchComponent + ], + standalone: true }) /** diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts index d44f8f84a0..ecdf7cf815 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/search-tab/themed-dynamic-lookup-relation-search-tab.component.ts @@ -12,9 +12,10 @@ import { SearchObjects } from '../../../../../search/models/search-objects.model import { DSpaceObject } from '../../../../../../core/shared/dspace-object.model'; @Component({ - selector: 'ds-themed-dynamic-lookup-relation-search-tab', - styleUrls: [], - templateUrl: '../../../../../theme-support/themed.component.html', + selector: 'ds-themed-dynamic-lookup-relation-search-tab', + styleUrls: [], + templateUrl: '../../../../../theme-support/themed.component.html', + standalone: true }) export class ThemedDynamicLookupRelationSearchTabComponent extends ThemedComponent { protected inAndOutputNames: (keyof DsDynamicLookupRelationSearchTabComponent & keyof this)[] = ['relationship', 'listId', diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.spec.ts index 472a719b27..6d1e5c15f2 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.spec.ts @@ -46,23 +46,22 @@ describe('DsDynamicLookupRelationSelectionTabComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [DsDynamicLookupRelationSelectionTabComponent, VarDirective], - imports: [TranslateModule.forRoot()], - providers: [ + imports: [TranslateModule.forRoot(), DsDynamicLookupRelationSelectionTabComponent, VarDirective], + providers: [ { - provide: SearchConfigurationService, useValue: { - paginatedSearchOptions: observableOf(pSearchOptions) - }, + provide: SearchConfigurationService, useValue: { + paginatedSearchOptions: observableOf(pSearchOptions) + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router }, { - provide: PaginationService, useValue: new PaginationServiceStub() + provide: PaginationService, useValue: new PaginationServiceStub() } - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts index a78bf8896c..45557f5415 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/selection-tab/dynamic-lookup-relation-selection-tab.component.ts @@ -13,6 +13,10 @@ import { PageInfo } from '../../../../../../core/shared/page-info.model'; import { Context } from '../../../../../../core/shared/context.model'; import { createSuccessfulRemoteDataObject } from '../../../../../remote-data.utils'; import { PaginationService } from '../../../../../../core/pagination/pagination.service'; +import { ObjectCollectionComponent } from '../../../../../object-collection/object-collection.component'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { PageSizeSelectorComponent } from '../../../../../page-size-selector/page-size-selector.component'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-dynamic-lookup-relation-selection-tab', @@ -23,7 +27,15 @@ import { PaginationService } from '../../../../../../core/pagination/pagination. provide: SEARCH_CONFIG_SERVICE, useClass: SearchConfigurationService } - ] + ], + imports: [ + ObjectCollectionComponent, + NgIf, + AsyncPipe, + PageSizeSelectorComponent, + TranslateModule + ], + standalone: true }) /** diff --git a/src/app/shared/form/chips/chips.component.spec.ts b/src/app/shared/form/chips/chips.component.spec.ts index 050950ed4d..032e3b278d 100644 --- a/src/app/shared/form/chips/chips.component.spec.ts +++ b/src/app/shared/form/chips/chips.component.spec.ts @@ -27,22 +27,20 @@ describe('ChipsComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NgbModule, SortablejsModule.forRoot({ animation: 150 }), - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), ChipsComponent, TestComponent, AuthorityConfidenceStateDirective - ], // declare the test component - providers: [ + ], + providers: [ ChangeDetectorRef, ChipsComponent, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -178,8 +176,10 @@ describe('ChipsComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/chips/chips.component.ts b/src/app/shared/form/chips/chips.component.ts index 5166657582..1230876bea 100644 --- a/src/app/shared/form/chips/chips.component.ts +++ b/src/app/shared/form/chips/chips.component.ts @@ -1,19 +1,33 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, } from '@angular/core'; -import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap'; +import { NgbTooltip, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import isObject from 'lodash/isObject'; import { Chips } from './models/chips.model'; import { ChipsItem } from './models/chips-item.model'; import { DragService } from '../../../core/drag.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { Options } from 'sortablejs'; import { BehaviorSubject } from 'rxjs'; +import { AsyncPipe, NgClass, NgForOf, NgIf } from '@angular/common'; +import { SortablejsModule } from 'ngx-sortablejs'; +import { AuthorityConfidenceStateDirective } from '../directives/authority-confidence-state.directive'; @Component({ selector: 'ds-chips', styleUrls: ['./chips.component.scss'], templateUrl: './chips.component.html', + imports: [ + NgbTooltipModule, + NgClass, + NgForOf, + SortablejsModule, + AsyncPipe, + AuthorityConfidenceStateDirective, + NgIf, + TranslateModule + ], + standalone: true }) export class ChipsComponent implements OnChanges { diff --git a/src/app/shared/form/directives/authority-confidence-state.directive.ts b/src/app/shared/form/directives/authority-confidence-state.directive.ts index 49eee5ae8f..3df34490f4 100644 --- a/src/app/shared/form/directives/authority-confidence-state.directive.ts +++ b/src/app/shared/form/directives/authority-confidence-state.directive.ts @@ -33,7 +33,8 @@ import { VocabularyEntryDetail } from '../../../core/submission/vocabularies/mod * Directive to add to the element a bootstrap utility class based on metadata confidence value */ @Directive({ - selector: '[dsAuthorityConfidenceState]' + selector: '[dsAuthorityConfidenceState]', + standalone: true }) export class AuthorityConfidenceStateDirective implements OnChanges, AfterViewInit { diff --git a/src/app/shared/form/form.component.html b/src/app/shared/form/form.component.html index 1b27c9d308..2421410333 100644 --- a/src/app/shared/form/form.component.html +++ b/src/app/shared/form/form.component.html @@ -17,7 +17,7 @@ class="col-xs-2 d-flex flex-column justify-content-sm-start align-items-end"> diff --git a/src/app/shared/form/form.component.spec.ts b/src/app/shared/form/form.component.spec.ts index 2f3be3fded..ce24fc020c 100644 --- a/src/app/shared/form/form.component.spec.ts +++ b/src/app/shared/form/form.component.spec.ts @@ -137,29 +137,27 @@ describe('FormComponent test suite', () => { init(); /* TODO make sure these files use mocks instead of real services/components https://github.com/DSpace/dspace-angular/issues/281 */ TestBed.configureTestingModule({ - imports: [ + imports: [ BrowserModule, CommonModule, FormsModule, ReactiveFormsModule, NgbModule, StoreModule.forRoot({}, storeModuleConfig), - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), FormComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, DynamicFormValidationService, FormBuilderService, FormComponent, FormService, { provide: Store, useClass: StoreMock } - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -438,8 +436,14 @@ describe('FormComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [BrowserModule, + CommonModule, + FormsModule, + ReactiveFormsModule, + NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/form.component.ts b/src/app/shared/form/form.component.ts index 79cf8ad2c7..e999d3a4f8 100644 --- a/src/app/shared/form/form.component.ts +++ b/src/app/shared/form/form.component.ts @@ -1,6 +1,12 @@ import { distinctUntilChanged, filter, map } from 'rxjs/operators'; import { ChangeDetectorRef, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; -import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; +import { + AbstractControl, + ReactiveFormsModule, + UntypedFormArray, + UntypedFormControl, + UntypedFormGroup +} from '@angular/forms'; import { Observable, Subscription } from 'rxjs'; import { @@ -8,7 +14,7 @@ import { DynamicFormControlEvent, DynamicFormControlModel, DynamicFormGroupModel, - DynamicFormLayout, + DynamicFormLayout, DynamicFormsCoreModule, } from '@ng-dynamic-forms/core'; import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; import findIndex from 'lodash/findIndex'; @@ -18,6 +24,9 @@ import { hasValue, isNotEmpty, isNotNull, isNull } from '../empty.util'; import { FormService } from './form.service'; import { FormEntry, FormError } from './form.reducer'; import { FormFieldMetadataValueObject } from './builder/models/form-field-metadata-value.model'; +import { DsDynamicFormComponent } from './builder/ds-dynamic-form-ui/ds-dynamic-form.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgIf } from '@angular/common'; /** * The default form component. @@ -26,7 +35,16 @@ import { FormFieldMetadataValueObject } from './builder/models/form-field-metada exportAs: 'formComponent', selector: 'ds-form', styleUrls: ['form.component.scss'], - templateUrl: 'form.component.html' + templateUrl: 'form.component.html', + imports: [ + DsDynamicFormComponent, + ReactiveFormsModule, + TranslateModule, + DynamicFormsCoreModule, + NgIf, + AsyncPipe, + ], + standalone: true }) export class FormComponent implements OnDestroy, OnInit { diff --git a/src/app/shared/form/form.module.ts b/src/app/shared/form/form.module.ts index 792de6f251..6ba1c938fe 100644 --- a/src/app/shared/form/form.module.ts +++ b/src/app/shared/form/form.module.ts @@ -80,39 +80,37 @@ const DIRECTIVES = [ ]; @NgModule({ - declarations: [ - ...COMPONENTS, - ...DIRECTIVES, - ], - imports: [ - CommonModule, - DynamicFormsCoreModule, - DynamicFormsNGBootstrapUIModule, - SearchModule, - SharedModule, - TranslateModule, - SortablejsModule, - NgxMaskModule.forRoot(), - NgbDatepickerModule, - NgbTimepickerModule, - CdkTreeModule, - ], - exports: [ - ...COMPONENTS, - ...DIRECTIVES, - ], - providers: [ - { - provide: DYNAMIC_FORM_CONTROL_MAP_FN, - useValue: dsDynamicFormControlMapFn - }, - DynamicFormLayoutService, - DynamicFormService, - DynamicFormValidationService, - FormBuilderService, - DsDynamicTypeBindRelationService, - FormService, - ] + imports: [ + CommonModule, + DynamicFormsCoreModule, + DynamicFormsNGBootstrapUIModule, + SearchModule, + SharedModule, + TranslateModule, + SortablejsModule, + NgxMaskModule.forRoot(), + NgbDatepickerModule, + NgbTimepickerModule, + CdkTreeModule, + ...COMPONENTS, + ...DIRECTIVES + ], + exports: [ + ...COMPONENTS, + ...DIRECTIVES, + ], + providers: [ + { + provide: DYNAMIC_FORM_CONTROL_MAP_FN, + useValue: dsDynamicFormControlMapFn + }, + DynamicFormLayoutService, + DynamicFormService, + DynamicFormValidationService, + FormBuilderService, + DsDynamicTypeBindRelationService, + FormService, + ] }) export class FormModule { } diff --git a/src/app/shared/form/number-picker/number-picker.component.spec.ts b/src/app/shared/form/number-picker/number-picker.component.spec.ts index d4484dbfa3..da9866ea5c 100644 --- a/src/app/shared/form/number-picker/number-picker.component.spec.ts +++ b/src/app/shared/form/number-picker/number-picker.component.spec.ts @@ -20,21 +20,19 @@ describe('NumberPickerComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, - NgbModule - ], - declarations: [ + NgbModule, NumberPickerComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, NumberPickerComponent, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -146,8 +144,12 @@ describe('NumberPickerComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FormsModule, + ReactiveFormsModule, + NgbModule] }) class TestComponent { diff --git a/src/app/shared/form/number-picker/number-picker.component.ts b/src/app/shared/form/number-picker/number-picker.component.ts index 82240c41d1..19fbb9c748 100644 --- a/src/app/shared/form/number-picker/number-picker.component.ts +++ b/src/app/shared/form/number-picker/number-picker.component.ts @@ -1,6 +1,7 @@ import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, SimpleChanges, } from '@angular/core'; -import { ControlValueAccessor, UntypedFormBuilder, NG_VALUE_ACCESSOR } from '@angular/forms'; +import { ControlValueAccessor, UntypedFormBuilder, NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'; import { isEmpty } from '../../empty.util'; +import { NgClass } from '@angular/common'; @Component({ selector: 'ds-number-picker', @@ -9,6 +10,11 @@ import { isEmpty } from '../../empty.util'; providers: [ {provide: NG_VALUE_ACCESSOR, useExisting: NumberPickerComponent, multi: true} ], + imports: [ + NgClass, + FormsModule + ], + standalone: true }) export class NumberPickerComponent implements OnInit, ControlValueAccessor { diff --git a/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.spec.ts b/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.spec.ts index 590c69a159..4e843f5040 100644 --- a/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.spec.ts +++ b/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.spec.ts @@ -12,12 +12,11 @@ describe('VocabularyTreeviewModalComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ TranslateModule.forRoot() ], - declarations: [ VocabularyTreeviewModalComponent ], - providers: [ + imports: [TranslateModule.forRoot(), VocabularyTreeviewModalComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, - ], - }) + ] +}) .compileComponents(); }); diff --git a/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.ts b/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.ts index c6b0bf20fe..33248ffbf9 100644 --- a/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.ts +++ b/src/app/shared/form/vocabulary-treeview-modal/vocabulary-treeview-modal.component.ts @@ -2,11 +2,18 @@ import { Component, Input } from '@angular/core'; import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; import { VocabularyOptions } from '../../../core/submission/vocabularies/models/vocabulary-options.model'; import { VocabularyEntryDetail } from '../../../core/submission/vocabularies/models/vocabulary-entry-detail.model'; +import { VocabularyTreeviewComponent } from '../vocabulary-treeview/vocabulary-treeview.component'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ selector: 'ds-vocabulary-treeview-modal', templateUrl: './vocabulary-treeview-modal.component.html', - styleUrls: ['./vocabulary-treeview-modal.component.scss'] + styleUrls: ['./vocabulary-treeview-modal.component.scss'], + imports: [ + VocabularyTreeviewComponent, + TranslateModule + ], + standalone: true }) /** * Component that contains a modal to display a VocabularyTreeviewComponent diff --git a/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.spec.ts b/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.spec.ts index 9e6e8dedd3..f6b120cd01 100644 --- a/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.spec.ts +++ b/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.spec.ts @@ -75,25 +75,23 @@ describe('VocabularyTreeviewComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ CdkTreeModule, StoreModule.forRoot({ auth: authReducer }, storeModuleConfig), - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), VocabularyTreeviewComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: VocabularyTreeviewService, useValue: vocabularyTreeviewServiceStub }, { provide: VocabularyService, useValue: vocabularyServiceStub }, { provide: NgbActiveModal, useValue: modalStub }, provideMockStore({ initialState }), ChangeDetectorRef, VocabularyTreeviewComponent - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents().then(() => { + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents().then(() => { vocabularyTreeviewServiceStub.getData.and.returnValue(observableOf([])); vocabularyTreeviewServiceStub.isLoading.and.returnValue(observableOf(false)); }); @@ -283,8 +281,10 @@ describe('VocabularyTreeviewComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [CdkTreeModule] }) class TestComponent { diff --git a/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts b/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts index 13d4495e61..3de31f57fe 100644 --- a/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts +++ b/src/app/shared/form/vocabulary-treeview/vocabulary-treeview.component.ts @@ -1,10 +1,10 @@ -import { FlatTreeControl } from '@angular/cdk/tree'; +import { CdkTreeModule, FlatTreeControl } from '@angular/cdk/tree'; import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, OnChanges, SimpleChanges } from '@angular/core'; import { map } from 'rxjs/operators'; import { Observable, Subscription } from 'rxjs'; import { Store } from '@ngrx/store'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { VocabularyEntryDetail } from '../../../core/submission/vocabularies/models/vocabulary-entry-detail.model'; import { hasValue, isEmpty, isNotEmpty } from '../../empty.util'; @@ -19,6 +19,11 @@ import { CoreState } from '../../../core/core-state.model'; import { lowerCase } from 'lodash/string'; import { VocabularyService } from '../../../core/submission/vocabularies/vocabulary.service'; import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators'; +import { FormsModule } from '@angular/forms'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { ThemedLoadingComponent } from '../../loading/themed-loading.component'; +import { AlertComponent } from '../../alert/alert.component'; /** * Component that shows a hierarchical vocabulary in a tree view @@ -26,7 +31,18 @@ import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operato @Component({ selector: 'ds-vocabulary-treeview', templateUrl: './vocabulary-treeview.component.html', - styleUrls: ['./vocabulary-treeview.component.scss'] + styleUrls: ['./vocabulary-treeview.component.scss'], + imports: [ + FormsModule, + NgbTooltipModule, + NgIf, + CdkTreeModule, + TranslateModule, + AsyncPipe, + ThemedLoadingComponent, + AlertComponent + ], + standalone: true }) export class VocabularyTreeviewComponent implements OnDestroy, OnInit, OnChanges { diff --git a/src/app/shared/google-recaptcha/google-recaptcha.component.spec.ts b/src/app/shared/google-recaptcha/google-recaptcha.component.spec.ts index 67f66c9757..a1c415b5b2 100644 --- a/src/app/shared/google-recaptcha/google-recaptcha.component.spec.ts +++ b/src/app/shared/google-recaptcha/google-recaptcha.component.spec.ts @@ -22,12 +22,12 @@ describe('GoogleRecaptchaComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ GoogleRecaptchaComponent ], - providers: [ - { provide: ConfigurationDataService, useValue: configurationDataService }, - { provide: NativeWindowService, useFactory: NativeWindowMockFactory }, + imports: [GoogleRecaptchaComponent], + providers: [ + { provide: ConfigurationDataService, useValue: configurationDataService }, + { provide: NativeWindowService, useFactory: NativeWindowMockFactory }, ] - }) +}) .compileComponents(); }); diff --git a/src/app/shared/google-recaptcha/google-recaptcha.component.ts b/src/app/shared/google-recaptcha/google-recaptcha.component.ts index 16c49ba45b..c5697cf1ae 100644 --- a/src/app/shared/google-recaptcha/google-recaptcha.component.ts +++ b/src/app/shared/google-recaptcha/google-recaptcha.component.ts @@ -5,11 +5,14 @@ import { getFirstSucceededRemoteDataPayload } from '../../core/shared/operators' import { Observable } from 'rxjs'; import { NativeWindowRef, NativeWindowService } from 'src/app/core/services/window.service'; import { isNotEmpty } from '../empty.util'; +import { AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-google-recaptcha', - templateUrl: './google-recaptcha.component.html', - styleUrls: ['./google-recaptcha.component.scss'], + selector: 'ds-google-recaptcha', + templateUrl: './google-recaptcha.component.html', + styleUrls: ['./google-recaptcha.component.scss'], + standalone: true, + imports: [AsyncPipe] }) export class GoogleRecaptchaComponent implements OnInit { diff --git a/src/app/shared/hover-class.directive.spec.ts b/src/app/shared/hover-class.directive.spec.ts index 9c222dfe3a..924e0cf06d 100644 --- a/src/app/shared/hover-class.directive.spec.ts +++ b/src/app/shared/hover-class.directive.spec.ts @@ -4,7 +4,8 @@ import { HoverClassDirective } from './hover-class.directive'; import { By } from '@angular/platform-browser'; @Component({ - template: `
` + template: `
`, + standalone: true }) class TestComponent { } @@ -16,8 +17,8 @@ describe('HoverClassDirective', () => { beforeEach(() => { fixture = TestBed.configureTestingModule({ - declarations: [TestComponent, HoverClassDirective] - }).createComponent(TestComponent); + imports: [TestComponent, HoverClassDirective] +}).createComponent(TestComponent); fixture.detectChanges(); component = fixture.componentInstance; diff --git a/src/app/shared/hover-class.directive.ts b/src/app/shared/hover-class.directive.ts index 4c41486858..a6beb22656 100644 --- a/src/app/shared/hover-class.directive.ts +++ b/src/app/shared/hover-class.directive.ts @@ -1,7 +1,8 @@ import { Directive, ElementRef, HostListener, Input } from '@angular/core'; @Directive({ - selector: '[dsHoverClass]' + selector: '[dsHoverClass]', + standalone: true }) /** * A directive adding a class to an element when hovered over diff --git a/src/app/shared/idle-modal/idle-modal.component.spec.ts b/src/app/shared/idle-modal/idle-modal.component.spec.ts index 7ea0b96d5b..8bc5bd11ec 100644 --- a/src/app/shared/idle-modal/idle-modal.component.spec.ts +++ b/src/app/shared/idle-modal/idle-modal.component.spec.ts @@ -22,15 +22,14 @@ describe('IdleModalComponent', () => { authServiceStub = jasmine.createSpyObj('authService', ['setIdle']); storeStub = jasmine.createSpyObj('store', ['dispatch']); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [IdleModalComponent], - providers: [ + imports: [TranslateModule.forRoot(), IdleModalComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { provide: AuthService, useValue: authServiceStub }, { provide: Store, useValue: storeStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/idle-modal/idle-modal.component.ts b/src/app/shared/idle-modal/idle-modal.component.ts index 4873137ff1..3baf219aea 100644 --- a/src/app/shared/idle-modal/idle-modal.component.ts +++ b/src/app/shared/idle-modal/idle-modal.component.ts @@ -6,10 +6,13 @@ import { hasValue } from '../empty.util'; import { Store } from '@ngrx/store'; import { AppState } from '../../app.reducer'; import { LogOutAction } from '../../core/auth/auth.actions'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-idle-modal', - templateUrl: 'idle-modal.component.html', + selector: 'ds-idle-modal', + templateUrl: 'idle-modal.component.html', + standalone: true, + imports: [TranslateModule] }) export class IdleModalComponent implements OnInit { diff --git a/src/app/shared/impersonate-navbar/impersonate-navbar.component.spec.ts b/src/app/shared/impersonate-navbar/impersonate-navbar.component.spec.ts index af03afc05f..3b8ece938c 100644 --- a/src/app/shared/impersonate-navbar/impersonate-navbar.component.spec.ts +++ b/src/app/shared/impersonate-navbar/impersonate-navbar.component.spec.ts @@ -42,18 +42,18 @@ describe('ImpersonateNavbarComponent', () => { }; TestBed.configureTestingModule({ - declarations: [ImpersonateNavbarComponent, VarDirective], - imports: [ + imports: [ TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), StoreModule.forRoot({ auth: authReducer }, storeModuleConfig), - ], - providers: [ + ImpersonateNavbarComponent, VarDirective + ], + providers: [ { provide: AuthService, useValue: authService }, provideMockStore({ initialState }), - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/impersonate-navbar/impersonate-navbar.component.ts b/src/app/shared/impersonate-navbar/impersonate-navbar.component.ts index 6166ee950d..ed0d1471c2 100644 --- a/src/app/shared/impersonate-navbar/impersonate-navbar.component.ts +++ b/src/app/shared/impersonate-navbar/impersonate-navbar.component.ts @@ -4,10 +4,15 @@ import { AppState } from '../../app.reducer'; import { AuthService } from '../../core/auth/auth.service'; import { Observable } from 'rxjs'; import { isAuthenticated } from '../../core/auth/selectors'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-impersonate-navbar', - templateUrl: 'impersonate-navbar.component.html' + selector: 'ds-impersonate-navbar', + templateUrl: 'impersonate-navbar.component.html', + standalone: true, + imports: [NgIf, NgbTooltipModule, AsyncPipe, TranslateModule] }) /** * Navbar component for actions to take concerning impersonating users diff --git a/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.spec.ts b/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.spec.ts index 4c979a1d4c..61b7901458 100644 --- a/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.spec.ts +++ b/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.spec.ts @@ -35,11 +35,10 @@ describe('DsoInputSuggestionsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule], - declarations: [DsoInputSuggestionsComponent], - providers: [], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(DsoInputSuggestionsComponent, { + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule, DsoInputSuggestionsComponent], + providers: [], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(DsoInputSuggestionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.ts b/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.ts index 26c7d91b41..cfe1f73c3d 100644 --- a/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.ts +++ b/src/app/shared/input-suggestions/dso-input-suggestions/dso-input-suggestions.component.ts @@ -1,25 +1,31 @@ import { Component, forwardRef, Input } from '@angular/core'; -import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'; import { InputSuggestionsComponent } from '../input-suggestions.component'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { ViewMode } from '../../../core/shared/view-mode.model'; import { CollectionElementLinkType } from '../../object-collection/collection-element-link.type'; import { hasValue } from '../../empty.util'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { ListableObjectComponentLoaderComponent } from '../../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { NgClass, NgFor, AsyncPipe } from '@angular/common'; +import { DebounceDirective } from '../../utils/debounce.directive'; +import { ClickOutsideDirective } from '../../utils/click-outside.directive'; @Component({ - selector: 'ds-dso-input-suggestions', - styleUrls: ['./../input-suggestions.component.scss'], - templateUrl: './dso-input-suggestions.component.html', - providers: [ - { - provide: NG_VALUE_ACCESSOR, - // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 - // eslint-disable-next-line @angular-eslint/no-forward-ref - useExisting: forwardRef(() => DsoInputSuggestionsComponent), - multi: true - } - ] + selector: 'ds-dso-input-suggestions', + styleUrls: ['./../input-suggestions.component.scss'], + templateUrl: './dso-input-suggestions.component.html', + providers: [ + { + provide: NG_VALUE_ACCESSOR, + // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 + // eslint-disable-next-line @angular-eslint/no-forward-ref + useExisting: forwardRef(() => DsoInputSuggestionsComponent), + multi: true + } + ], + standalone: true, + imports: [FormsModule, ClickOutsideDirective, DebounceDirective, NgClass, NgFor, ListableObjectComponentLoaderComponent, AsyncPipe] }) /** diff --git a/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.spec.ts b/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.spec.ts index 6a0324d2ac..0f0ce3ef21 100644 --- a/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.spec.ts +++ b/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.spec.ts @@ -21,11 +21,10 @@ describe('FilterInputSuggestionsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule], - declarations: [FilterInputSuggestionsComponent], - providers: [], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(FilterInputSuggestionsComponent, { + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule, FilterInputSuggestionsComponent], + providers: [], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(FilterInputSuggestionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.ts b/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.ts index ee47dc80c9..35f7f0c0c2 100644 --- a/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.ts +++ b/src/app/shared/input-suggestions/filter-suggestions/filter-input-suggestions.component.ts @@ -1,21 +1,27 @@ import { Component, forwardRef, Input } from '@angular/core'; -import { NG_VALUE_ACCESSOR } from '@angular/forms'; +import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms'; import { InputSuggestionsComponent } from '../input-suggestions.component'; import { InputSuggestion } from '../input-suggestions.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { DebounceDirective } from '../../utils/debounce.directive'; +import { NgIf, NgTemplateOutlet, NgClass, NgFor, AsyncPipe } from '@angular/common'; +import { ClickOutsideDirective } from '../../utils/click-outside.directive'; @Component({ - selector: 'ds-filter-input-suggestions', - styleUrls: ['./../input-suggestions.component.scss'], - templateUrl: './filter-input-suggestions.component.html', - providers: [ - { - provide: NG_VALUE_ACCESSOR, - // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 - // eslint-disable-next-line @angular-eslint/no-forward-ref - useExisting: forwardRef(() => FilterInputSuggestionsComponent), - multi: true - } - ] + selector: 'ds-filter-input-suggestions', + styleUrls: ['./../input-suggestions.component.scss'], + templateUrl: './filter-input-suggestions.component.html', + providers: [ + { + provide: NG_VALUE_ACCESSOR, + // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 + // eslint-disable-next-line @angular-eslint/no-forward-ref + useExisting: forwardRef(() => FilterInputSuggestionsComponent), + multi: true + } + ], + standalone: true, + imports: [FormsModule, ClickOutsideDirective, NgIf, NgTemplateOutlet, DebounceDirective, NgClass, NgFor, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/input-suggestions/input-suggestions.component.spec.ts b/src/app/shared/input-suggestions/input-suggestions.component.spec.ts index 9793844e89..2751c31ad0 100644 --- a/src/app/shared/input-suggestions/input-suggestions.component.spec.ts +++ b/src/app/shared/input-suggestions/input-suggestions.component.spec.ts @@ -23,11 +23,10 @@ describe('InputSuggestionsComponent', () => { }, { displayValue: 'suggestion tres', value: 'suggestion tres' }]; TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule], - declarations: [InputSuggestionsComponent], - providers: [], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(InputSuggestionsComponent, { + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule, InputSuggestionsComponent], + providers: [], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(InputSuggestionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/input-suggestions/input-suggestions.component.ts b/src/app/shared/input-suggestions/input-suggestions.component.ts index 7e05dbcc8c..2eefe461c8 100644 --- a/src/app/shared/input-suggestions/input-suggestions.component.ts +++ b/src/app/shared/input-suggestions/input-suggestions.component.ts @@ -12,11 +12,16 @@ import { } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; import { hasValue, isNotEmpty } from '../empty.util'; -import { ControlValueAccessor } from '@angular/forms'; +import { ControlValueAccessor, FormsModule } from '@angular/forms'; +import { NgClass, NgFor, AsyncPipe } from '@angular/common'; +import { DebounceDirective } from '../utils/debounce.directive'; +import { ClickOutsideDirective } from '../utils/click-outside.directive'; @Component({ - selector: 'ds-input-suggestions', - templateUrl: './input-suggestions.component.html', + selector: 'ds-input-suggestions', + templateUrl: './input-suggestions.component.html', + standalone: true, + imports: [FormsModule, ClickOutsideDirective, DebounceDirective, NgClass, NgFor, AsyncPipe] }) /** diff --git a/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.spec.ts b/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.spec.ts index dad2edc30e..8a935f9fbb 100644 --- a/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.spec.ts +++ b/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.spec.ts @@ -23,15 +23,14 @@ describe('ValidationSuggestionsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule, ReactiveFormsModule], - declarations: [ValidationSuggestionsComponent], - providers: [FormsModule, + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, FormsModule, ReactiveFormsModule, ValidationSuggestionsComponent], + providers: [FormsModule, ReactiveFormsModule, { provide: MetadataFieldDataService, useValue: {} }, { provide: ObjectUpdatesService, useValue: {} }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ValidationSuggestionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ValidationSuggestionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.ts b/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.ts index 050b3296c5..5d0cee18e9 100644 --- a/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.ts +++ b/src/app/shared/input-suggestions/validation-suggestions/validation-suggestions.component.ts @@ -1,24 +1,29 @@ import { Component, forwardRef, Input, OnInit } from '@angular/core'; -import { UntypedFormControl, UntypedFormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms'; +import { UntypedFormControl, UntypedFormGroup, NG_VALUE_ACCESSOR, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { ObjectUpdatesService } from '../../../core/data/object-updates/object-updates.service'; import { MetadatumViewModel } from '../../../core/shared/metadata.models'; import { MetadataFieldValidator } from '../../utils/metadatafield-validator.directive'; import { InputSuggestionsComponent } from '../input-suggestions.component'; import { InputSuggestion } from '../input-suggestions.model'; +import { NgClass, NgFor, AsyncPipe } from '@angular/common'; +import { DebounceDirective } from '../../utils/debounce.directive'; +import { ClickOutsideDirective } from '../../utils/click-outside.directive'; @Component({ - selector: 'ds-validation-suggestions', - styleUrls: ['./../input-suggestions.component.scss'], - templateUrl: './validation-suggestions.component.html', - providers: [ - { - provide: NG_VALUE_ACCESSOR, - // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 - // eslint-disable-next-line @angular-eslint/no-forward-ref - useExisting: forwardRef(() => ValidationSuggestionsComponent), - multi: true - } - ] + selector: 'ds-validation-suggestions', + styleUrls: ['./../input-suggestions.component.scss'], + templateUrl: './validation-suggestions.component.html', + providers: [ + { + provide: NG_VALUE_ACCESSOR, + // Usage of forwardRef necessary https://github.com/angular/angular.io/issues/1151 + // eslint-disable-next-line @angular-eslint/no-forward-ref + useExisting: forwardRef(() => ValidationSuggestionsComponent), + multi: true + } + ], + standalone: true, + imports: [FormsModule, ReactiveFormsModule, ClickOutsideDirective, DebounceDirective, NgClass, NgFor, AsyncPipe] }) /** diff --git a/src/app/shared/lang-switch/lang-switch.component.spec.ts b/src/app/shared/lang-switch/lang-switch.component.spec.ts index 6d3c847086..a587da11e7 100644 --- a/src/app/shared/lang-switch/lang-switch.component.spec.ts +++ b/src/app/shared/lang-switch/lang-switch.component.spec.ts @@ -67,18 +67,15 @@ describe('LangSwitchComponent', () => { }; TestBed.configureTestingModule({ - imports: [HttpClientTestingModule, TranslateModule.forRoot( - { + imports: [HttpClientTestingModule, TranslateModule.forRoot({ loader: { provide: TranslateLoader, useClass: CustomLoader } - } - )], - declarations: [LangSwitchComponent], - schemas: [NO_ERRORS_SCHEMA], - providers: [ - TranslateService, - { provide: LocaleService, useValue: getMockLocaleService() }, - ] - }).compileComponents() + }), LangSwitchComponent], + schemas: [NO_ERRORS_SCHEMA], + providers: [ + TranslateService, + { provide: LocaleService, useValue: getMockLocaleService() }, + ] +}).compileComponents() .then(() => { translate = TestBed.inject(TranslateService); translate.addLangs(mockConfig.languages.filter((langConfig: LangConfig) => langConfig.active === true).map((a) => a.code)); @@ -153,18 +150,15 @@ describe('LangSwitchComponent', () => { }; TestBed.configureTestingModule({ - imports: [HttpClientTestingModule, TranslateModule.forRoot( - { + imports: [HttpClientTestingModule, TranslateModule.forRoot({ loader: { provide: TranslateLoader, useClass: CustomLoader } - } - )], - declarations: [LangSwitchComponent], - schemas: [NO_ERRORS_SCHEMA], - providers: [ - TranslateService, - { provide: LocaleService, useValue: getMockLocaleService() } - ] - }).compileComponents(); + }), LangSwitchComponent], + schemas: [NO_ERRORS_SCHEMA], + providers: [ + TranslateService, + { provide: LocaleService, useValue: getMockLocaleService() } + ] +}).compileComponents(); translate = TestBed.inject(TranslateService); translate.addLangs(mockConfig.languages.filter((MyLangConfig) => MyLangConfig.active === true).map((a) => a.code)); translate.setDefaultLang('en'); diff --git a/src/app/shared/lang-switch/lang-switch.component.ts b/src/app/shared/lang-switch/lang-switch.component.ts index 41d707a056..58c06ca461 100644 --- a/src/app/shared/lang-switch/lang-switch.component.ts +++ b/src/app/shared/lang-switch/lang-switch.component.ts @@ -1,15 +1,19 @@ import { Component, OnInit } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { LangConfig } from '../../../config/lang-config.interface'; import { environment } from '../../../environments/environment'; import { LocaleService } from '../../core/locale/locale.service'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgFor } from '@angular/common'; @Component({ - selector: 'ds-lang-switch', - styleUrls: ['lang-switch.component.scss'], - templateUrl: 'lang-switch.component.html', + selector: 'ds-lang-switch', + styleUrls: ['lang-switch.component.scss'], + templateUrl: 'lang-switch.component.html', + standalone: true, + imports: [NgIf, NgbDropdownModule, NgFor, TranslateModule] }) /** diff --git a/src/app/shared/loading/loading.component.spec.ts b/src/app/shared/loading/loading.component.spec.ts index d564d43dc0..166b375db0 100644 --- a/src/app/shared/loading/loading.component.spec.ts +++ b/src/app/shared/loading/loading.component.spec.ts @@ -17,17 +17,17 @@ describe('LoadingComponent (inline template)', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [LoadingComponent], // declare the test component - providers: [TranslateService] - }).compileComponents(); // compile template and css + LoadingComponent + ], + providers: [TranslateService] +}).compileComponents(); // compile template and css })); beforeEach(() => { diff --git a/src/app/shared/loading/loading.component.ts b/src/app/shared/loading/loading.component.ts index e64d89620b..a150436a9f 100644 --- a/src/app/shared/loading/loading.component.ts +++ b/src/app/shared/loading/loading.component.ts @@ -4,11 +4,14 @@ import { TranslateService } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { hasValue } from '../empty.util'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-loading', - styleUrls: ['./loading.component.scss'], - templateUrl: './loading.component.html' + selector: 'ds-loading', + styleUrls: ['./loading.component.scss'], + templateUrl: './loading.component.html', + standalone: true, + imports: [NgIf] }) export class LoadingComponent implements OnDestroy, OnInit { diff --git a/src/app/shared/loading/themed-loading.component.ts b/src/app/shared/loading/themed-loading.component.ts index 48773d75c8..212efd1a43 100644 --- a/src/app/shared/loading/themed-loading.component.ts +++ b/src/app/shared/loading/themed-loading.component.ts @@ -7,9 +7,10 @@ import { ThemeService } from '../theme-support/theme.service'; * Themed wrapper for LoadingComponent */ @Component({ - selector: 'ds-themed-loading', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-loading', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedLoadingComponent extends ThemedComponent { diff --git a/src/app/shared/log-in/container/log-in-container.component.spec.ts b/src/app/shared/log-in/container/log-in-container.component.spec.ts index 4700cf9307..bd4e461709 100644 --- a/src/app/shared/log-in/container/log-in-container.component.spec.ts +++ b/src/app/shared/log-in/container/log-in-container.component.spec.ts @@ -34,27 +34,25 @@ describe('LogInContainerComponent', () => { }); // refine the test module by declaring the test component TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, StoreModule.forRoot(authReducer), SharedModule, TranslateModule.forRoot(), RouterTestingModule, - ], - declarations: [ TestComponent - ], - providers: [ + ], + providers: [ { provide: AuthService, useClass: AuthServiceStub }, { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, { provide: HardRedirectService, useValue: hardRedirectService }, LogInContainerComponent - ], - schemas: [ + ], + schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }) + ] +}) .compileComponents(); })); @@ -113,8 +111,13 @@ describe('LogInContainerComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FormsModule, + ReactiveFormsModule, + SharedModule, + RouterTestingModule] }) class TestComponent { diff --git a/src/app/shared/log-in/container/log-in-container.component.ts b/src/app/shared/log-in/container/log-in-container.component.ts index f6a08a1e1e..4501cb02f7 100644 --- a/src/app/shared/log-in/container/log-in-container.component.ts +++ b/src/app/shared/log-in/container/log-in-container.component.ts @@ -2,14 +2,17 @@ import { Component, Injector, Input, OnInit } from '@angular/core'; import { rendersAuthMethodType } from '../methods/log-in.methods-decorator'; import { AuthMethod } from '../../../core/auth/models/auth.method'; +import { NgComponentOutlet } from '@angular/common'; /** * This component represents a component container for log-in methods available. */ @Component({ - selector: 'ds-log-in-container', - templateUrl: './log-in-container.component.html', - styleUrls: ['./log-in-container.component.scss'] + selector: 'ds-log-in-container', + templateUrl: './log-in-container.component.html', + styleUrls: ['./log-in-container.component.scss'], + standalone: true, + imports: [NgComponentOutlet] }) export class LogInContainerComponent implements OnInit { diff --git a/src/app/shared/log-in/log-in.component.spec.ts b/src/app/shared/log-in/log-in.component.spec.ts index 57ed3e4694..0e064c2cc0 100644 --- a/src/app/shared/log-in/log-in.component.spec.ts +++ b/src/app/shared/log-in/log-in.component.spec.ts @@ -51,23 +51,21 @@ describe('LogInComponent', () => { // refine the test module by declaring the test component void TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, StoreModule.forRoot(authReducer, { - runtimeChecks: { - strictStateImmutability: false, - strictActionImmutability: false - } + runtimeChecks: { + strictStateImmutability: false, + strictActionImmutability: false + } }), RouterTestingModule, SharedModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), TestComponent - ], - providers: [ + ], + providers: [ { provide: AuthService, useClass: AuthServiceStub }, { provide: NativeWindowService, useFactory: NativeWindowMockFactory }, // { provide: Router, useValue: new RouterStub() }, @@ -76,11 +74,11 @@ describe('LogInComponent', () => { { provide: AuthorizationDataService, useValue: authorizationService }, provideMockStore({ initialState }), LogInComponent - ], - schemas: [ + ], + schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }) + ] +}) .compileComponents(); })); @@ -132,8 +130,13 @@ describe('LogInComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FormsModule, + ReactiveFormsModule, + RouterTestingModule, + SharedModule] }) class TestComponent { diff --git a/src/app/shared/log-in/log-in.component.ts b/src/app/shared/log-in/log-in.component.ts index 4bfae18332..53617f3e5d 100644 --- a/src/app/shared/log-in/log-in.component.ts +++ b/src/app/shared/log-in/log-in.component.ts @@ -12,16 +12,21 @@ import { hasValue } from '../empty.util'; import { AuthService } from '../../core/auth/auth.service'; import { CoreState } from '../../core/core-state.model'; import { AuthMethodType } from '../../core/auth/models/auth.method-type'; +import { LogInContainerComponent } from './container/log-in-container.component'; +import { ThemedLoadingComponent } from '../loading/themed-loading.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; /** * /users/sign-in * @class LogInComponent */ @Component({ - selector: 'ds-log-in', - templateUrl: './log-in.component.html', - styleUrls: ['./log-in.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'ds-log-in', + templateUrl: './log-in.component.html', + styleUrls: ['./log-in.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [NgIf, ThemedLoadingComponent, NgFor, LogInContainerComponent, AsyncPipe] }) export class LogInComponent implements OnInit { diff --git a/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.spec.ts b/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.spec.ts index 5d7a175973..989ed8c998 100644 --- a/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.spec.ts +++ b/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.spec.ts @@ -54,14 +54,12 @@ describe('LogInExternalProviderComponent', () => { beforeEach(waitForAsync(() => { // refine the test module by declaring the test component void TestBed.configureTestingModule({ - imports: [ + imports: [ StoreModule.forRoot({ auth: authReducer }, storeModuleConfig), - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), LogInExternalProviderComponent - ], - providers: [ + ], + providers: [ { provide: AuthService, useClass: AuthServiceStub }, { provide: 'authMethodProvider', useValue: new AuthMethod(AuthMethodType.Orcid, 0, location) }, { provide: 'isStandalonePage', useValue: true }, @@ -70,11 +68,11 @@ describe('LogInExternalProviderComponent', () => { { provide: ActivatedRoute, useValue: new ActivatedRouteStub() }, { provide: HardRedirectService, useValue: hardRedirectService }, provideMockStore({ initialState }), - ], - schemas: [ + ], + schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }) + ] +}) .compileComponents(); })); diff --git a/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.ts b/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.ts index f182968457..d30d324d2a 100644 --- a/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.ts +++ b/src/app/shared/log-in/methods/log-in-external-provider/log-in-external-provider.component.ts @@ -15,11 +15,14 @@ import { URLCombiner } from '../../../../core/url-combiner/url-combiner'; import { CoreState } from '../../../../core/core-state.model'; import { renderAuthMethodFor } from '../log-in.methods-decorator'; import { AuthMethodType } from '../../../../core/auth/models/auth.method-type'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-log-in-external-provider', - templateUrl: './log-in-external-provider.component.html', - styleUrls: ['./log-in-external-provider.component.scss'] + selector: 'ds-log-in-external-provider', + templateUrl: './log-in-external-provider.component.html', + styleUrls: ['./log-in-external-provider.component.scss'], + standalone: true, + imports: [TranslateModule] }) @renderAuthMethodFor(AuthMethodType.Oidc) @renderAuthMethodFor(AuthMethodType.Shibboleth) diff --git a/src/app/shared/log-in/methods/password/log-in-password.component.spec.ts b/src/app/shared/log-in/methods/password/log-in-password.component.spec.ts index 2c9081d1c3..840ea44dfe 100644 --- a/src/app/shared/log-in/methods/password/log-in-password.component.spec.ts +++ b/src/app/shared/log-in/methods/password/log-in-password.component.spec.ts @@ -48,28 +48,26 @@ describe('LogInPasswordComponent', () => { beforeEach(waitForAsync(() => { // refine the test module by declaring the test component void TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, StoreModule.forRoot({ auth: authReducer }, storeModuleConfig), - TranslateModule.forRoot() - ], - declarations: [ - LogInPasswordComponent, - BrowserOnlyMockPipe, - ], - providers: [ + TranslateModule.forRoot(), + LogInPasswordComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ { provide: AuthService, useClass: AuthServiceStub }, { provide: AuthorizationDataService, useClass: AuthorizationDataServiceStub }, { provide: 'authMethodProvider', useValue: new AuthMethod(AuthMethodType.Password, 0) }, { provide: 'isStandalonePage', useValue: true }, { provide: HardRedirectService, useValue: hardRedirectService }, provideMockStore({ initialState }), - ], - schemas: [ + ], + schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }) + ] +}) .compileComponents(); })); diff --git a/src/app/shared/log-in/methods/password/log-in-password.component.ts b/src/app/shared/log-in/methods/password/log-in-password.component.ts index 6132394019..ac1db8330f 100644 --- a/src/app/shared/log-in/methods/password/log-in-password.component.ts +++ b/src/app/shared/log-in/methods/password/log-in-password.component.ts @@ -1,6 +1,6 @@ import { map } from 'rxjs/operators'; import { Component, Inject, OnInit } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; +import { UntypedFormBuilder, UntypedFormGroup, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { select, Store } from '@ngrx/store'; import { Observable } from 'rxjs'; @@ -18,16 +18,22 @@ import { CoreState } from '../../../../core/core-state.model'; import { getForgotPasswordRoute, getRegisterRoute } from '../../../../app-routing-paths'; import { FeatureID } from '../../../../core/data/feature-authorization/feature-id'; import { AuthorizationDataService } from '../../../../core/data/feature-authorization/authorization-data.service'; +import { BrowserOnlyPipe } from '../../../utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * /users/sign-in * @class LogInPasswordComponent */ @Component({ - selector: 'ds-log-in-password', - templateUrl: './log-in-password.component.html', - styleUrls: ['./log-in-password.component.scss'], - animations: [fadeOut] + selector: 'ds-log-in-password', + templateUrl: './log-in-password.component.html', + styleUrls: ['./log-in-password.component.scss'], + animations: [fadeOut], + standalone: true, + imports: [FormsModule, ReactiveFormsModule, NgIf, RouterLink, AsyncPipe, TranslateModule, BrowserOnlyPipe] }) @renderAuthMethodFor(AuthMethodType.Password) export class LogInPasswordComponent implements OnInit { diff --git a/src/app/shared/log-out/log-out.component.spec.ts b/src/app/shared/log-out/log-out.component.spec.ts index 028738a019..cbd5ed9ed3 100644 --- a/src/app/shared/log-out/log-out.component.spec.ts +++ b/src/app/shared/log-out/log-out.component.spec.ts @@ -35,28 +35,26 @@ describe('LogOutComponent', () => { beforeEach(waitForAsync(() => { // refine the test module by declaring the test component TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, StoreModule.forRoot(authReducer, { - runtimeChecks: { - strictStateImmutability: false, - strictActionImmutability: false - } + runtimeChecks: { + strictStateImmutability: false, + strictActionImmutability: false + } }), - TranslateModule.forRoot() - ], - declarations: [ - LogOutComponent, - BrowserOnlyMockPipe, - ], - providers: [ + TranslateModule.forRoot(), + LogOutComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ { provide: Router, useValue: routerStub }, - ], - schemas: [ + ], + schemas: [ CUSTOM_ELEMENTS_SCHEMA - ] - }) + ] +}) .compileComponents(); })); diff --git a/src/app/shared/log-out/log-out.component.ts b/src/app/shared/log-out/log-out.component.ts index 6fa71caa32..77b2675d15 100644 --- a/src/app/shared/log-out/log-out.component.ts +++ b/src/app/shared/log-out/log-out.component.ts @@ -8,12 +8,17 @@ import { LogOutAction } from '../../core/auth/auth.actions'; import { getLogOutError, } from '../../core/auth/selectors'; import { AppState } from '../../app.reducer'; import { fadeOut } from '../animations/fade'; +import { BrowserOnlyPipe } from '../utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-log-out', - templateUrl: './log-out.component.html', - styleUrls: ['./log-out.component.scss'], - animations: [fadeOut] + selector: 'ds-log-out', + templateUrl: './log-out.component.html', + styleUrls: ['./log-out.component.scss'], + animations: [fadeOut], + standalone: true, + imports: [NgIf, AsyncPipe, TranslateModule, BrowserOnlyPipe] }) export class LogOutComponent implements OnInit { /** diff --git a/src/app/shared/menu/menu-item/external-link-menu-item.component.spec.ts b/src/app/shared/menu/menu-item/external-link-menu-item.component.spec.ts index 4c55758b3d..28d258f268 100644 --- a/src/app/shared/menu/menu-item/external-link-menu-item.component.spec.ts +++ b/src/app/shared/menu/menu-item/external-link-menu-item.component.spec.ts @@ -19,13 +19,12 @@ describe('ExternalLinkMenuItemComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ExternalLinkMenuItemComponent], - providers: [ + imports: [TranslateModule.forRoot(), ExternalLinkMenuItemComponent], + providers: [ { provide: 'itemModelProvider', useValue: { text: text, href: link } }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/menu/menu-item/external-link-menu-item.component.ts b/src/app/shared/menu/menu-item/external-link-menu-item.component.ts index 5fbbe608db..a295cad0c7 100644 --- a/src/app/shared/menu/menu-item/external-link-menu-item.component.ts +++ b/src/app/shared/menu/menu-item/external-link-menu-item.component.ts @@ -3,13 +3,17 @@ import { rendersMenuItemForType } from '../menu-item.decorator'; import { isNotEmpty } from '../../empty.util'; import { ExternalLinkMenuItemModel } from './models/external-link.model'; import { MenuItemType } from '../menu-item-type.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass } from '@angular/common'; /** * Component that renders a menu section of type EXTERNAL */ @Component({ - selector: 'ds-external-link-menu-item', - templateUrl: './external-link-menu-item.component.html' + selector: 'ds-external-link-menu-item', + templateUrl: './external-link-menu-item.component.html', + standalone: true, + imports: [NgClass, TranslateModule] }) @rendersMenuItemForType(MenuItemType.EXTERNAL) export class ExternalLinkMenuItemComponent implements OnInit { diff --git a/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts b/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts index 96444a5447..a888144c6b 100644 --- a/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts +++ b/src/app/shared/menu/menu-item/link-menu-item.component.spec.ts @@ -25,14 +25,14 @@ describe('LinkMenuItemComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [LinkMenuItemComponent, RouterLinkDirectiveStub, QueryParamsDirectiveStub], - providers: [ + imports: [TranslateModule.forRoot(), LinkMenuItemComponent], + declarations: [RouterLinkDirectiveStub, QueryParamsDirectiveStub], + providers: [ { provide: 'itemModelProvider', useValue: { text: text, link: link, queryParams: queryParams } }, { provide: Router, useValue: RouterStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/menu/menu-item/link-menu-item.component.ts b/src/app/shared/menu/menu-item/link-menu-item.component.ts index 39f9006987..e567169aa2 100644 --- a/src/app/shared/menu/menu-item/link-menu-item.component.ts +++ b/src/app/shared/menu/menu-item/link-menu-item.component.ts @@ -3,14 +3,18 @@ import { LinkMenuItemModel } from './models/link.model'; import { rendersMenuItemForType } from '../menu-item.decorator'; import { isNotEmpty } from '../../empty.util'; import { MenuItemType } from '../menu-item-type.model'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass } from '@angular/common'; /** * Component that renders a menu section of type LINK */ @Component({ - selector: 'ds-link-menu-item', - templateUrl: './link-menu-item.component.html' + selector: 'ds-link-menu-item', + templateUrl: './link-menu-item.component.html', + standalone: true, + imports: [NgClass, RouterLink, TranslateModule] }) @rendersMenuItemForType(MenuItemType.LINK) export class LinkMenuItemComponent implements OnInit { diff --git a/src/app/shared/menu/menu-item/onclick-menu-item.component.spec.ts b/src/app/shared/menu/menu-item/onclick-menu-item.component.spec.ts index 18ae66b23d..fd1fbed5a2 100644 --- a/src/app/shared/menu/menu-item/onclick-menu-item.component.spec.ts +++ b/src/app/shared/menu/menu-item/onclick-menu-item.component.spec.ts @@ -17,13 +17,12 @@ describe('OnClickMenuItemComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [OnClickMenuItemComponent], - providers: [ + imports: [TranslateModule.forRoot(), OnClickMenuItemComponent], + providers: [ { provide: 'itemModelProvider', useValue: item }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/menu/menu-item/onclick-menu-item.component.ts b/src/app/shared/menu/menu-item/onclick-menu-item.component.ts index 68e477b1fb..d0ee8f7fe3 100644 --- a/src/app/shared/menu/menu-item/onclick-menu-item.component.ts +++ b/src/app/shared/menu/menu-item/onclick-menu-item.component.ts @@ -2,14 +2,18 @@ import { Component, Inject } from '@angular/core'; import { rendersMenuItemForType } from '../menu-item.decorator'; import { OnClickMenuItemModel } from './models/onclick.model'; import { MenuItemType } from '../menu-item-type.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; /** * Component that renders a menu section of type ONCLICK */ @Component({ - selector: 'ds-onclick-menu-item', - styleUrls: ['./onclick-menu-item.component.scss'], - templateUrl: './onclick-menu-item.component.html' + selector: 'ds-onclick-menu-item', + styleUrls: ['./onclick-menu-item.component.scss'], + templateUrl: './onclick-menu-item.component.html', + standalone: true, + imports: [NgIf, TranslateModule] }) @rendersMenuItemForType(MenuItemType.ONCLICK) export class OnClickMenuItemComponent { diff --git a/src/app/shared/menu/menu-item/text-menu-item.component.spec.ts b/src/app/shared/menu/menu-item/text-menu-item.component.spec.ts index a0c159af23..8aaf889054 100644 --- a/src/app/shared/menu/menu-item/text-menu-item.component.spec.ts +++ b/src/app/shared/menu/menu-item/text-menu-item.component.spec.ts @@ -11,13 +11,12 @@ describe('TextMenuItemComponent', () => { const text = 'HELLO'; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [TextMenuItemComponent], - providers: [ + imports: [TranslateModule.forRoot(), TextMenuItemComponent], + providers: [ { provide: 'itemModelProvider', useValue: { text: text } }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); })); diff --git a/src/app/shared/menu/menu-item/text-menu-item.component.ts b/src/app/shared/menu/menu-item/text-menu-item.component.ts index 25549f53a8..8bf059b6d6 100644 --- a/src/app/shared/menu/menu-item/text-menu-item.component.ts +++ b/src/app/shared/menu/menu-item/text-menu-item.component.ts @@ -2,13 +2,16 @@ import { Component, Inject } from '@angular/core'; import { TextMenuItemModel } from './models/text.model'; import { rendersMenuItemForType } from '../menu-item.decorator'; import { MenuItemType } from '../menu-item-type.model'; +import { TranslateModule } from '@ngx-translate/core'; /** * Component that renders a menu section of type TEXT */ @Component({ - selector: 'ds-text-menu-item', - templateUrl: './text-menu-item.component.html', + selector: 'ds-text-menu-item', + templateUrl: './text-menu-item.component.html', + standalone: true, + imports: [TranslateModule] }) @rendersMenuItemForType(MenuItemType.TEXT) export class TextMenuItemComponent { diff --git a/src/app/shared/menu/menu-section/menu-section.component.spec.ts b/src/app/shared/menu/menu-section/menu-section.component.spec.ts index f40f45f9b4..8cbb639d55 100644 --- a/src/app/shared/menu/menu-section/menu-section.component.spec.ts +++ b/src/app/shared/menu/menu-section/menu-section.component.spec.ts @@ -22,15 +22,14 @@ describe('MenuSectionComponent', () => { active: false } as any; TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule], - declarations: [MenuSectionComponent], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, MenuSectionComponent], + providers: [ { provide: Injector, useValue: {} }, { provide: MenuService, useClass: MenuServiceStub }, { provide: MenuSection, useValue: dummySection }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MenuSectionComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MenuSectionComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/menu/menu-section/menu-section.component.ts b/src/app/shared/menu/menu-section/menu-section.component.ts index 9b5bd499e1..a29c0c6320 100644 --- a/src/app/shared/menu/menu-section/menu-section.component.ts +++ b/src/app/shared/menu/menu-section/menu-section.component.ts @@ -14,8 +14,9 @@ import { MenuItemType } from '../menu-item-type.model'; * A basic implementation of a menu section's component */ @Component({ - selector: 'ds-menu-section', - template: '' + selector: 'ds-menu-section', + template: '', + standalone: true }) export class MenuSectionComponent implements OnInit, OnDestroy { diff --git a/src/app/shared/menu/menu.component.spec.ts b/src/app/shared/menu/menu.component.spec.ts index f0660fab4a..b678eeb8cd 100644 --- a/src/app/shared/menu/menu.component.spec.ts +++ b/src/app/shared/menu/menu.component.spec.ts @@ -55,17 +55,16 @@ describe('MenuComponent', () => { }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule], - declarations: [MenuComponent], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, RouterTestingModule, MenuComponent], + providers: [ Injector, { provide: ThemeService, useValue: getMockThemeService() }, { provide: MenuService, useClass: MenuServiceStub }, { provide: AuthorizationDataService, useValue: authorizationService }, { provide: ActivatedRoute, useValue: routeStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MenuComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MenuComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/menu/menu.component.ts b/src/app/shared/menu/menu.component.ts index 35e180b476..7f7ccb91a7 100644 --- a/src/app/shared/menu/menu.component.ts +++ b/src/app/shared/menu/menu.component.ts @@ -18,8 +18,9 @@ import { ThemeService } from '../theme-support/theme.service'; * A basic implementation of a MenuComponent */ @Component({ - selector: 'ds-menu', - template: '' + selector: 'ds-menu', + template: '', + standalone: true }) export class MenuComponent implements OnInit, OnDestroy { /** diff --git a/src/app/shared/menu/menu.module.ts b/src/app/shared/menu/menu.module.ts index 28bdab9987..c07fe7a209 100644 --- a/src/app/shared/menu/menu.module.ts +++ b/src/app/shared/menu/menu.module.ts @@ -31,20 +31,18 @@ const PROVIDERS = [ ]; @NgModule({ - imports: [ - ...MODULES - ], - declarations: [ - ...COMPONENTS, - ...ENTRY_COMPONENTS, - ], - providers: [ - ...PROVIDERS, - ...ENTRY_COMPONENTS, - ], - exports: [ - ...COMPONENTS - ] + imports: [ + ...MODULES, + ...COMPONENTS, + ...ENTRY_COMPONENTS + ], + providers: [ + ...PROVIDERS, + ...ENTRY_COMPONENTS, + ], + exports: [ + ...COMPONENTS + ] }) /** diff --git a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts index 5ef272db3b..40301daf0f 100644 --- a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts +++ b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.spec.ts @@ -7,7 +7,8 @@ import { MetadataFieldWrapperComponent } from './metadata-field-wrapper.componen @Component({ selector: 'ds-component-without-content', template: '\n' + - '' + '', + standalone: true }) class NoContentComponent { public hideIfNoTextContent = true; @@ -16,9 +17,10 @@ class NoContentComponent { @Component({ selector: 'ds-component-with-empty-spans', template: '\n' + - ' \n' + - ' \n' + - '' + ' \n' + + ' \n' + + '', + standalone: true }) class SpanContentComponent { @Input() hideIfNoTextContent = true; @@ -27,8 +29,9 @@ class SpanContentComponent { @Component({ selector: 'ds-component-with-text', template: '\n' + - ' The quick brown fox jumps over the lazy dog\n' + - '' + ' The quick brown fox jumps over the lazy dog\n' + + '', + standalone: true }) class TextContentComponent { @Input() hideIfNoTextContent = true; @@ -41,8 +44,8 @@ describe('MetadataFieldWrapperComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [MetadataFieldWrapperComponent, NoContentComponent, SpanContentComponent, TextContentComponent] - }).compileComponents(); + imports: [MetadataFieldWrapperComponent, NoContentComponent, SpanContentComponent, TextContentComponent] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.ts b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.ts index 5c6b99248f..e5aa73b1c9 100644 --- a/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.ts +++ b/src/app/shared/metadata-field-wrapper/metadata-field-wrapper.component.ts @@ -1,13 +1,16 @@ import { Component, Input } from '@angular/core'; +import { NgIf } from '@angular/common'; /** * This component renders any content inside this wrapper. * The wrapper prints a label before the content (if available) */ @Component({ - selector: 'ds-metadata-field-wrapper', - styleUrls: ['./metadata-field-wrapper.component.scss'], - templateUrl: './metadata-field-wrapper.component.html' + selector: 'ds-metadata-field-wrapper', + styleUrls: ['./metadata-field-wrapper.component.scss'], + templateUrl: './metadata-field-wrapper.component.html', + standalone: true, + imports: [NgIf] }) export class MetadataFieldWrapperComponent { diff --git a/src/app/shared/metadata-representation/metadata-representation-loader.component.spec.ts b/src/app/shared/metadata-representation/metadata-representation-loader.component.spec.ts index 7edf1a700e..1eca9df0dd 100644 --- a/src/app/shared/metadata-representation/metadata-representation-loader.component.spec.ts +++ b/src/app/shared/metadata-representation/metadata-representation-loader.component.spec.ts @@ -40,20 +40,19 @@ describe('MetadataRepresentationLoaderComponent', () => { getThemeName: themeName, }); TestBed.configureTestingModule({ - imports: [], - declarations: [MetadataRepresentationLoaderComponent, PlainTextMetadataListElementComponent, MetadataRepresentationDirective], - schemas: [NO_ERRORS_SCHEMA], - providers: [ + imports: [MetadataRepresentationLoaderComponent, PlainTextMetadataListElementComponent, MetadataRepresentationDirective], + schemas: [NO_ERRORS_SCHEMA], + providers: [ { - provide: METADATA_REPRESENTATION_COMPONENT_FACTORY, - useValue: jasmine.createSpy('getMetadataRepresentationComponent').and.returnValue(PlainTextMetadataListElementComponent) + provide: METADATA_REPRESENTATION_COMPONENT_FACTORY, + useValue: jasmine.createSpy('getMetadataRepresentationComponent').and.returnValue(PlainTextMetadataListElementComponent) }, { - provide: ThemeService, - useValue: themeService, + provide: ThemeService, + useValue: themeService, } - ] - }).overrideComponent(MetadataRepresentationLoaderComponent, { + ] +}).overrideComponent(MetadataRepresentationLoaderComponent, { set: { changeDetection: ChangeDetectionStrategy.Default, entryComponents: [PlainTextMetadataListElementComponent] diff --git a/src/app/shared/metadata-representation/metadata-representation-loader.component.ts b/src/app/shared/metadata-representation/metadata-representation-loader.component.ts index 42ee093278..1194936e6e 100644 --- a/src/app/shared/metadata-representation/metadata-representation-loader.component.ts +++ b/src/app/shared/metadata-representation/metadata-representation-loader.component.ts @@ -12,8 +12,10 @@ import { hasValue, isNotEmpty, hasNoValue } from '../empty.util'; import { ThemeService } from '../theme-support/theme.service'; @Component({ - selector: 'ds-metadata-representation-loader', - templateUrl: './metadata-representation-loader.component.html' + selector: 'ds-metadata-representation-loader', + templateUrl: './metadata-representation-loader.component.html', + standalone: true, + imports: [MetadataRepresentationDirective] }) /** * Component for determining what component to use depending on the item's entity type (dspace.entity.type), its metadata representation and, optionally, its context diff --git a/src/app/shared/metadata-representation/metadata-representation.directive.ts b/src/app/shared/metadata-representation/metadata-representation.directive.ts index 9ff0573baf..e58a48b2c9 100644 --- a/src/app/shared/metadata-representation/metadata-representation.directive.ts +++ b/src/app/shared/metadata-representation/metadata-representation.directive.ts @@ -1,7 +1,8 @@ import { Directive, ViewContainerRef } from '@angular/core'; @Directive({ - selector: '[dsMetadataRepresentation]', + selector: '[dsMetadataRepresentation]', + standalone: true }) /** * Directive used as a hook to know where to inject the dynamic metadata representation component diff --git a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts index b79040fb12..b8ecbb7343 100644 --- a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts @@ -37,15 +37,16 @@ describe('ClaimedTaskActionsApproveComponent', () => { beforeEach(waitForAsync(() => { mockPoolTaskDataService = new PoolTaskDataService(null, null, null, null); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), - ], - providers: [ + ClaimedTaskActionsApproveComponent + ], + providers: [ { provide: ClaimedTaskDataService, useValue: claimedTaskService }, { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -53,10 +54,9 @@ describe('ClaimedTaskActionsApproveComponent', () => { { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestService }, { provide: PoolTaskDataService, useValue: mockPoolTaskDataService }, - ], - declarations: [ClaimedTaskActionsApproveComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedTaskActionsApproveComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedTaskActionsApproveComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts index 467d1514c9..0ac7d08528 100644 --- a/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.ts @@ -6,18 +6,22 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; import { Router } from '@angular/router'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SearchService } from '../../../../core/shared/search/search.service'; import { RequestService } from '../../../../core/data/request.service'; import { ClaimedApprovedTaskSearchResult } from '../../../object-collection/shared/claimed-approved-task-search-result.model'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; export const WORKFLOW_TASK_OPTION_APPROVE = 'submit_approve'; @rendersWorkflowTaskOption(WORKFLOW_TASK_OPTION_APPROVE) @Component({ - selector: 'ds-claimed-task-actions-approve', - styleUrls: ['./claimed-task-actions-approve.component.scss'], - templateUrl: './claimed-task-actions-approve.component.html', + selector: 'ds-claimed-task-actions-approve', + styleUrls: ['./claimed-task-actions-approve.component.scss'], + templateUrl: './claimed-task-actions-approve.component.html', + standalone: true, + imports: [NgbTooltipModule, NgIf, AsyncPipe, TranslateModule] }) /** * Component for displaying and processing the approve action on a workflow task item diff --git a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts index a2e0b14134..008040d0dd 100644 --- a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts @@ -95,16 +95,16 @@ describe('ClaimedTaskActionsComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ClaimedTaskActionsComponent, VarDirective], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ClaimedTaskActionsComponent, VarDirective + ], + providers: [ { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: Router, useValue: new RouterStub() }, @@ -112,9 +112,9 @@ describe('ClaimedTaskActionsComponent', () => { { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestServce }, { provide: WorkflowActionDataService, useValue: workflowActionService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedTaskActionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedTaskActionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts index 195a2193e5..267e66295e 100644 --- a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts @@ -1,8 +1,8 @@ import { Component, Injector, Input, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { Observable } from 'rxjs'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { ClaimedTaskDataService } from '../../../core/tasks/claimed-task-data.service'; import { ClaimedTask } from '../../../core/tasks/models/claimed-task-object.model'; @@ -16,14 +16,20 @@ import { WorkflowAction } from '../../../core/tasks/models/workflow-action-objec import { WorkflowActionDataService } from '../../../core/data/workflow-action-data.service'; import { getWorkflowItemViewRoute } from '../../../workflowitems-edit-page/workflowitems-edit-page-routing-paths'; import { Item } from '../../../core/shared/item.model'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { ClaimedTaskActionsLoaderComponent } from './switcher/claimed-task-actions-loader.component'; +import { NgFor, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../utils/var.directive'; /** * This component represents actions related to ClaimedTask object. */ @Component({ - selector: 'ds-claimed-task-actions', - styleUrls: ['./claimed-task-actions.component.scss'], - templateUrl: './claimed-task-actions.component.html', + selector: 'ds-claimed-task-actions', + styleUrls: ['./claimed-task-actions.component.scss'], + templateUrl: './claimed-task-actions.component.html', + standalone: true, + imports: [VarDirective, NgFor, ClaimedTaskActionsLoaderComponent, NgbTooltipModule, RouterLink, AsyncPipe, TranslateModule] }) export class ClaimedTaskActionsComponent extends MyDSpaceActionsComponent implements OnInit { diff --git a/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.spec.ts index 092e53f3f4..6a6f079224 100644 --- a/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.spec.ts @@ -36,15 +36,16 @@ describe('ClaimedTaskActionsDeclineTaskComponent', () => { mockPoolTaskDataService = new PoolTaskDataService(null, null, null, null); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ClaimedTaskActionsDeclineTaskComponent + ], + providers: [ { provide: ClaimedTaskDataService, useValue: claimedTaskService }, { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -52,10 +53,9 @@ describe('ClaimedTaskActionsDeclineTaskComponent', () => { { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestService }, { provide: PoolTaskDataService, useValue: mockPoolTaskDataService }, - ], - declarations: [ClaimedTaskActionsDeclineTaskComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedTaskActionsDeclineTaskComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedTaskActionsDeclineTaskComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts b/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts index 5afbde7d7d..40e28f800f 100644 --- a/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/decline-task/claimed-task-actions-decline-task.component.ts @@ -3,7 +3,7 @@ import { ClaimedTaskActionsAbstractComponent } from '../abstract/claimed-task-ac import { rendersWorkflowTaskOption } from '../switcher/claimed-task-actions-decorator'; import { Router } from '@angular/router'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SearchService } from '../../../../core/shared/search/search.service'; import { RequestService } from '../../../../core/data/request.service'; import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; @@ -12,14 +12,18 @@ import { } from '../../../object-collection/shared/claimed-declined-task-task-search-result.model'; import { Observable, of as observableOf } from 'rxjs'; import { RemoteData } from 'src/app/core/data/remote-data'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; export const WORKFLOW_TASK_OPTION_DECLINE_TASK = 'submit_decline_task'; @rendersWorkflowTaskOption(WORKFLOW_TASK_OPTION_DECLINE_TASK) @Component({ - selector: 'ds-claimed-task-actions-decline-task', - templateUrl: './claimed-task-actions-decline-task.component.html', - styleUrls: ['./claimed-task-actions-decline-task.component.scss'] + selector: 'ds-claimed-task-actions-decline-task', + templateUrl: './claimed-task-actions-decline-task.component.html', + styleUrls: ['./claimed-task-actions-decline-task.component.scss'], + standalone: true, + imports: [NgbTooltipModule, NgIf, AsyncPipe, TranslateModule] }) /** * Component for displaying and processing the decline task action on a workflow task item diff --git a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts index 7bdf57561f..cb233a3cfc 100644 --- a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts @@ -31,15 +31,16 @@ describe('ClaimedTaskActionsEditMetadataComponent', () => { mockPoolTaskDataService = new PoolTaskDataService(null, null, null, null); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), - ], - providers: [ + ClaimedTaskActionsEditMetadataComponent + ], + providers: [ { provide: ClaimedTaskDataService, useValue: {} }, { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -47,10 +48,9 @@ describe('ClaimedTaskActionsEditMetadataComponent', () => { { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestService }, { provide: PoolTaskDataService, useValue: mockPoolTaskDataService }, - ], - declarations: [ClaimedTaskActionsEditMetadataComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedTaskActionsEditMetadataComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedTaskActionsEditMetadataComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts index 7da189dddd..cb755dccb0 100644 --- a/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.ts @@ -1,19 +1,23 @@ import { Component, Injector } from '@angular/core'; import { ClaimedTaskActionsAbstractComponent } from '../abstract/claimed-task-actions-abstract.component'; import { rendersWorkflowTaskOption } from '../switcher/claimed-task-actions-decorator'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SearchService } from '../../../../core/shared/search/search.service'; import { RequestService } from '../../../../core/data/request.service'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, AsyncPipe } from '@angular/common'; export const WORKFLOW_TASK_OPTION_EDIT_METADATA = 'submit_edit_metadata'; @rendersWorkflowTaskOption(WORKFLOW_TASK_OPTION_EDIT_METADATA) @Component({ - selector: 'ds-claimed-task-actions-edit-metadata', - styleUrls: ['./claimed-task-actions-edit-metadata.component.scss'], - templateUrl: './claimed-task-actions-edit-metadata.component.html', + selector: 'ds-claimed-task-actions-edit-metadata', + styleUrls: ['./claimed-task-actions-edit-metadata.component.scss'], + templateUrl: './claimed-task-actions-edit-metadata.component.html', + standalone: true, + imports: [NgIf, NgbTooltipModule, RouterLink, AsyncPipe, TranslateModule] }) /** * Component for displaying the edit metadata action on a workflow task item diff --git a/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.spec.ts index bb41fedfb5..f3b18d2110 100644 --- a/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.spec.ts @@ -48,13 +48,11 @@ describe('AdvancedClaimedTaskActionRatingComponent', () => { searchService = new SearchServiceStub(); await TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - ], - declarations: [ - AdvancedClaimedTaskActionRatingComponent, - ], - providers: [ + AdvancedClaimedTaskActionRatingComponent + ], + providers: [ { provide: ActivatedRoute, useValue: route }, { provide: ClaimedTaskDataService, useValue: claimedTaskDataService }, { provide: NotificationsService, useValue: notificationService }, @@ -62,9 +60,9 @@ describe('AdvancedClaimedTaskActionRatingComponent', () => { { provide: Router, useValue: router }, { provide: SearchService, useValue: searchService }, Location, - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts b/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts index a1cc81e050..a2d39cfca3 100644 --- a/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/rating/advanced-claimed-task-action-rating.component.ts @@ -1,7 +1,7 @@ import { Component, Injector } from '@angular/core'; import { Router, ActivatedRoute } from '@angular/router'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SearchService } from '../../../../core/shared/search/search.service'; import { RequestService } from '../../../../core/data/request.service'; import { @@ -12,15 +12,18 @@ import { ADVANCED_WORKFLOW_TASK_OPTION_RATING, } from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-rating/advanced-workflow-action-rating.component'; import { rendersWorkflowTaskOption } from '../switcher/claimed-task-actions-decorator'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; /** * Advanced Workflow button that redirect to the {@link AdvancedWorkflowActionRatingComponent} */ @rendersWorkflowTaskOption(ADVANCED_WORKFLOW_TASK_OPTION_RATING) @Component({ - selector: 'ds-advanced-claimed-task-action-rating-reviewer', - templateUrl: './advanced-claimed-task-action-rating.component.html', - styleUrls: ['./advanced-claimed-task-action-rating.component.scss'] + selector: 'ds-advanced-claimed-task-action-rating-reviewer', + templateUrl: './advanced-claimed-task-action-rating.component.html', + styleUrls: ['./advanced-claimed-task-action-rating.component.scss'], + standalone: true, + imports: [NgbTooltipModule, TranslateModule] }) export class AdvancedClaimedTaskActionRatingComponent extends AdvancedClaimedTaskActionsAbstractComponent { diff --git a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts index 2d369ae014..f0ef17be3e 100644 --- a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.spec.ts @@ -44,18 +44,18 @@ describe('ClaimedTaskActionsRejectComponent', () => { beforeEach(waitForAsync(() => { mockPoolTaskDataService = new PoolTaskDataService(null, null, null, null); TestBed.configureTestingModule({ - imports: [ + imports: [ NgbModule, ReactiveFormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), - ], - declarations: [ClaimedTaskActionsRejectComponent], - providers: [ + ClaimedTaskActionsRejectComponent + ], + providers: [ { provide: ClaimedTaskDataService, useValue: claimedTaskService }, Injector, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -65,9 +65,9 @@ describe('ClaimedTaskActionsRejectComponent', () => { { provide: PoolTaskDataService, useValue: mockPoolTaskDataService }, UntypedFormBuilder, NgbModal, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedTaskActionsRejectComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedTaskActionsRejectComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); fixture = TestBed.createComponent(ClaimedTaskActionsRejectComponent); diff --git a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts index 7d68af1b8f..1190327c15 100644 --- a/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/reject/claimed-task-actions-reject.component.ts @@ -1,26 +1,29 @@ import { Component, Injector, OnInit } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; +import { UntypedFormBuilder, UntypedFormGroup, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'; +import { NgbModal, NgbModalRef, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { ClaimedTaskActionsAbstractComponent } from '../abstract/claimed-task-actions-abstract.component'; import { rendersWorkflowTaskOption } from '../switcher/claimed-task-actions-decorator'; import { Router } from '@angular/router'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SearchService } from '../../../../core/shared/search/search.service'; import { RequestService } from '../../../../core/data/request.service'; import { Observable, of } from 'rxjs'; import { RemoteData } from '../../../../core/data/remote-data'; import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; import { ClaimedDeclinedTaskSearchResult } from '../../../object-collection/shared/claimed-declined-task-search-result.model'; +import { NgIf, AsyncPipe } from '@angular/common'; export const WORKFLOW_TASK_OPTION_REJECT = 'submit_reject'; @rendersWorkflowTaskOption(WORKFLOW_TASK_OPTION_REJECT) @Component({ - selector: 'ds-claimed-task-actions-reject', - styleUrls: ['./claimed-task-actions-reject.component.scss'], - templateUrl: './claimed-task-actions-reject.component.html', + selector: 'ds-claimed-task-actions-reject', + styleUrls: ['./claimed-task-actions-reject.component.scss'], + templateUrl: './claimed-task-actions-reject.component.html', + standalone: true, + imports: [NgbTooltipModule, NgIf, FormsModule, ReactiveFormsModule, AsyncPipe, TranslateModule] }) /** * Component for displaying and processing the reject action on a workflow task item diff --git a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts index 765849f0ae..d031102795 100644 --- a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.spec.ts @@ -37,15 +37,16 @@ describe('ClaimedTaskActionsReturnToPoolComponent', () => { beforeEach(waitForAsync(() => { mockPoolTaskDataService = new PoolTaskDataService(null, null, null, null); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), - ], - providers: [ + ClaimedTaskActionsReturnToPoolComponent + ], + providers: [ { provide: ClaimedTaskDataService, useValue: claimedTaskService }, { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -53,10 +54,9 @@ describe('ClaimedTaskActionsReturnToPoolComponent', () => { { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestService }, { provide: PoolTaskDataService, useValue: mockPoolTaskDataService }, - ], - declarations: [ClaimedTaskActionsReturnToPoolComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedTaskActionsReturnToPoolComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedTaskActionsReturnToPoolComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts index 7949176968..ee5744c3af 100644 --- a/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/return-to-pool/claimed-task-actions-return-to-pool.component.ts @@ -4,21 +4,25 @@ import { rendersWorkflowTaskOption } from '../switcher/claimed-task-actions-deco import { Observable } from 'rxjs'; import { Router } from '@angular/router'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SearchService } from '../../../../core/shared/search/search.service'; import { RequestService } from '../../../../core/data/request.service'; import { RemoteData } from '../../../../core/data/remote-data'; import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; import { PoolTaskDataService } from '../../../../core/tasks/pool-task-data.service'; import { take } from 'rxjs/operators'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; export const WORKFLOW_TASK_OPTION_RETURN_TO_POOL = 'return_to_pool'; @rendersWorkflowTaskOption(WORKFLOW_TASK_OPTION_RETURN_TO_POOL) @Component({ - selector: 'ds-claimed-task-actions-return-to-pool', - styleUrls: ['./claimed-task-actions-return-to-pool.component.scss'], - templateUrl: './claimed-task-actions-return-to-pool.component.html', + selector: 'ds-claimed-task-actions-return-to-pool', + styleUrls: ['./claimed-task-actions-return-to-pool.component.scss'], + templateUrl: './claimed-task-actions-return-to-pool.component.html', + standalone: true, + imports: [NgbTooltipModule, NgIf, AsyncPipe, TranslateModule] }) /** * Component for displaying and processing the return to pool action on a workflow task item diff --git a/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.spec.ts index 81fe423481..102c320cf1 100644 --- a/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.spec.ts @@ -51,14 +51,12 @@ describe('AdvancedClaimedTaskActionSelectReviewerComponent', () => { searchService = new SearchServiceStub(); await TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - ], - declarations: [ - AdvancedClaimedTaskActionSelectReviewerComponent, - NgbTooltip, - ], - providers: [ + AdvancedClaimedTaskActionSelectReviewerComponent + ], + declarations: [NgbTooltip], + providers: [ { provide: ActivatedRoute, useValue: route }, { provide: ClaimedTaskDataService, useValue: claimedTaskDataService }, { provide: NotificationsService, useValue: notificationService }, @@ -66,9 +64,9 @@ describe('AdvancedClaimedTaskActionSelectReviewerComponent', () => { { provide: Router, useValue: router }, { provide: SearchService, useValue: searchService }, Location, - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts b/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts index d6217320ba..e3ac607037 100644 --- a/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/select-reviewer/advanced-claimed-task-action-select-reviewer.component.ts @@ -5,22 +5,25 @@ import { } from '../abstract/advanced-claimed-task-actions-abstract.component'; import { Router, ActivatedRoute } from '@angular/router'; import { NotificationsService } from '../../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { SearchService } from '../../../../core/shared/search/search.service'; import { RequestService } from '../../../../core/data/request.service'; import { ADVANCED_WORKFLOW_ACTION_SELECT_REVIEWER, ADVANCED_WORKFLOW_TASK_OPTION_SELECT_REVIEWER } from '../../../../workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/advanced-workflow-action-select-reviewer.component'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; /** * Advanced Workflow button that redirect to the {@link AdvancedWorkflowActionSelectReviewerComponent} */ @rendersWorkflowTaskOption(ADVANCED_WORKFLOW_TASK_OPTION_SELECT_REVIEWER) @Component({ - selector: 'ds-advanced-claimed-task-action-select-reviewer', - templateUrl: './advanced-claimed-task-action-select-reviewer.component.html', - styleUrls: ['./advanced-claimed-task-action-select-reviewer.component.scss'] + selector: 'ds-advanced-claimed-task-action-select-reviewer', + templateUrl: './advanced-claimed-task-action-select-reviewer.component.html', + styleUrls: ['./advanced-claimed-task-action-select-reviewer.component.scss'], + standalone: true, + imports: [NgbTooltipModule, TranslateModule] }) export class AdvancedClaimedTaskActionSelectReviewerComponent extends AdvancedClaimedTaskActionsAbstractComponent { diff --git a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.spec.ts index 95e31f5523..b5bfa7c86d 100644 --- a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.spec.ts @@ -62,10 +62,9 @@ describe('ClaimedTaskActionsLoaderComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ClaimedTaskActionsLoaderComponent, ClaimedTaskActionsEditMetadataComponent, ClaimedTaskActionsDirective], - schemas: [NO_ERRORS_SCHEMA], - providers: [ + imports: [TranslateModule.forRoot(), ClaimedTaskActionsLoaderComponent, ClaimedTaskActionsEditMetadataComponent, ClaimedTaskActionsDirective], + schemas: [NO_ERRORS_SCHEMA], + providers: [ { provide: ClaimedTaskDataService, useValue: {} }, { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -73,8 +72,8 @@ describe('ClaimedTaskActionsLoaderComponent', () => { { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestService }, { provide: PoolTaskDataService, useValue: {} } - ] - }).overrideComponent(ClaimedTaskActionsLoaderComponent, { + ] +}).overrideComponent(ClaimedTaskActionsLoaderComponent, { set: { changeDetection: ChangeDetectionStrategy.Default, entryComponents: [ClaimedTaskActionsEditMetadataComponent] diff --git a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts index c0dc1cad02..0dc9a14e73 100644 --- a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions-loader.component.ts @@ -20,8 +20,10 @@ import { WorkflowItem } from '../../../../core/submission/models/workflowitem.mo import { ClaimedTaskActionsAbstractComponent } from '../abstract/claimed-task-actions-abstract.component'; @Component({ - selector: 'ds-claimed-task-actions-loader', - templateUrl: './claimed-task-actions-loader.component.html' + selector: 'ds-claimed-task-actions-loader', + templateUrl: './claimed-task-actions-loader.component.html', + standalone: true, + imports: [ClaimedTaskActionsDirective] }) /** * Component for loading a ClaimedTaskAction component depending on the "option" input diff --git a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions.directive.ts b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions.directive.ts index a4a55b541b..a30a8a038c 100644 --- a/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions.directive.ts +++ b/src/app/shared/mydspace-actions/claimed-task/switcher/claimed-task-actions.directive.ts @@ -1,7 +1,8 @@ import { Directive, ViewContainerRef } from '@angular/core'; @Directive({ - selector: '[dsClaimedTaskActions]', + selector: '[dsClaimedTaskActions]', + standalone: true }) /** * Directive used as a hook to know where to inject the dynamic Claimed Task Actions component diff --git a/src/app/shared/mydspace-actions/item/item-actions.component.spec.ts b/src/app/shared/mydspace-actions/item/item-actions.component.spec.ts index e6abfa76a1..6fccb4f172 100644 --- a/src/app/shared/mydspace-actions/item/item-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/item/item-actions.component.spec.ts @@ -61,25 +61,25 @@ const requestServce = getMockRequestService(); describe('ItemActionsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ItemActionsComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ItemActionsComponent + ], + providers: [ { provide: Injector, useValue: {} }, { provide: Router, useValue: new RouterStub() }, { provide: ItemDataService, useValue: mockDataService }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestServce } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemActionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemActionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/item/item-actions.component.ts b/src/app/shared/mydspace-actions/item/item-actions.component.ts index 4df11d65d9..e65a42f9d9 100644 --- a/src/app/shared/mydspace-actions/item/item-actions.component.ts +++ b/src/app/shared/mydspace-actions/item/item-actions.component.ts @@ -1,6 +1,6 @@ import { Component, Injector, Input, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { Router, RouterLink } from '@angular/router'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; import { ItemDataService } from '../../../core/data/item-data.service'; import { Item } from '../../../core/shared/item.model'; @@ -8,14 +8,17 @@ import { NotificationsService } from '../../notifications/notifications.service' import { RequestService } from '../../../core/data/request.service'; import { SearchService } from '../../../core/shared/search/search.service'; import { getItemPageRoute } from '../../../item-page/item-page-routing-paths'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; /** * This component represents mydspace actions related to Item object. */ @Component({ - selector: 'ds-item-actions', - styleUrls: ['./item-actions.component.scss'], - templateUrl: './item-actions.component.html', + selector: 'ds-item-actions', + styleUrls: ['./item-actions.component.scss'], + templateUrl: './item-actions.component.html', + standalone: true, + imports: [NgbTooltipModule, RouterLink, TranslateModule] }) export class ItemActionsComponent extends MyDSpaceActionsComponent implements OnInit { diff --git a/src/app/shared/mydspace-actions/mydspace-actions.module.ts b/src/app/shared/mydspace-actions/mydspace-actions.module.ts index 68e3a8fb58..0c56e7f75e 100644 --- a/src/app/shared/mydspace-actions/mydspace-actions.module.ts +++ b/src/app/shared/mydspace-actions/mydspace-actions.module.ts @@ -40,19 +40,17 @@ const DECLARATIONS = [ * This module contains Item actions used in MyDSpace */ @NgModule({ - imports: [ - CommonModule, - SharedModule, - ], - declarations: [ - ...DECLARATIONS, - ], - providers: [ - ...ENTRY_COMPONENTS, - ], - exports: [ - ...DECLARATIONS, - ], + imports: [ + CommonModule, + SharedModule, + ...DECLARATIONS + ], + providers: [ + ...ENTRY_COMPONENTS, + ], + exports: [ + ...DECLARATIONS, + ] }) export class MyDSpaceActionsModule { diff --git a/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts b/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts index fe9d955287..58aa91f71b 100644 --- a/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts +++ b/src/app/shared/mydspace-actions/mydspace-reloadable-actions.spec.ts @@ -73,16 +73,16 @@ describe('MyDSpaceReloadableActionsComponent', () => { mockDataService = new PoolTaskDataService(null, null, null, null); mockClaimedTaskDataService = new ClaimedTaskDataService(null, null, null, null); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), - ], - declarations: [PoolTaskActionsComponent], - providers: [ + PoolTaskActionsComponent + ], + providers: [ { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: Router, useValue: new RouterStub() }, @@ -90,9 +90,9 @@ describe('MyDSpaceReloadableActionsComponent', () => { { provide: ClaimedTaskDataService, useValue: mockClaimedTaskDataService }, { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PoolTaskActionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PoolTaskActionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts index cb0799caa6..092281412c 100644 --- a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts @@ -77,16 +77,16 @@ describe('PoolTaskActionsComponent', () => { mockDataService = new PoolTaskDataService(null, null, null, null); mockClaimedTaskDataService = new ClaimedTaskDataService(null, null, null, null); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock, - }, + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock, + }, }), - ], - declarations: [PoolTaskActionsComponent], - providers: [ + PoolTaskActionsComponent + ], + providers: [ { provide: Injector, useValue: {} }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: Router, useValue: new RouterStub() }, @@ -94,9 +94,9 @@ describe('PoolTaskActionsComponent', () => { { provide: ClaimedTaskDataService, useValue: mockClaimedTaskDataService }, { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PoolTaskActionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PoolTaskActionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts index c8dcd87a33..25635c7453 100644 --- a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts +++ b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts @@ -1,9 +1,9 @@ import { Component, Injector, Input, OnDestroy } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { Observable } from 'rxjs'; import { switchMap, take } from 'rxjs/operators'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; import { RemoteData } from '../../../core/data/remote-data'; @@ -18,14 +18,18 @@ import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { MyDSpaceReloadableActionsComponent } from '../mydspace-reloadable-actions'; import { ProcessTaskResponse } from '../../../core/tasks/models/process-task-response'; import { getWorkflowItemViewRoute } from '../../../workflowitems-edit-page/workflowitems-edit-page-routing-paths'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; /** * This component represents mydspace actions related to PoolTask object. */ @Component({ - selector: 'ds-pool-task-actions', - styleUrls: ['./pool-task-actions.component.scss'], - templateUrl: './pool-task-actions.component.html', + selector: 'ds-pool-task-actions', + styleUrls: ['./pool-task-actions.component.scss'], + templateUrl: './pool-task-actions.component.html', + standalone: true, + imports: [NgbTooltipModule, NgIf, RouterLink, AsyncPipe, TranslateModule] }) export class PoolTaskActionsComponent extends MyDSpaceReloadableActionsComponent implements OnDestroy { diff --git a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts index 9f266d054e..9e46f4df4a 100644 --- a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts @@ -66,25 +66,25 @@ mockObject = Object.assign(new WorkflowItem(), { item: observableOf(rd), id: '12 describe('WorkflowitemActionsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [WorkflowitemActionsComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + WorkflowitemActionsComponent + ], + providers: [ { provide: Injector, useValue: {} }, { provide: Router, useValue: new RouterStub() }, { provide: WorkflowItemDataService, useValue: mockDataService }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestServce } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(WorkflowitemActionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(WorkflowitemActionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts index 3587356642..35d0ba9476 100644 --- a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts +++ b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts @@ -1,7 +1,7 @@ import { Component, Injector, Input } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; @@ -10,14 +10,17 @@ import { NotificationsService } from '../../notifications/notifications.service' import { RequestService } from '../../../core/data/request.service'; import { SearchService } from '../../../core/shared/search/search.service'; import { getWorkflowItemViewRoute } from '../../../workflowitems-edit-page/workflowitems-edit-page-routing-paths'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; /** * This component represents actions related to WorkflowItem object. */ @Component({ - selector: 'ds-workflowitem-actions', - styleUrls: ['./workflowitem-actions.component.scss'], - templateUrl: './workflowitem-actions.component.html', + selector: 'ds-workflowitem-actions', + styleUrls: ['./workflowitem-actions.component.scss'], + templateUrl: './workflowitem-actions.component.html', + standalone: true, + imports: [NgbTooltipModule, RouterLink, TranslateModule] }) export class WorkflowitemActionsComponent extends MyDSpaceActionsComponent { diff --git a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts index c76cce3982..2978df7b65 100644 --- a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts @@ -161,29 +161,29 @@ describe('WorkspaceitemActionsComponent', () => { isAuthorized: observableOf(true) }); await TestBed.configureTestingModule({ - imports: [ + imports: [ NgbModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [WorkspaceitemActionsComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + WorkspaceitemActionsComponent + ], + providers: [ Injector, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, { provide: Router, useValue: new RouterStub() }, { provide: WorkspaceitemDataService, useValue: mockDataService }, { provide: SearchService, useValue: searchService }, { provide: RequestService, useValue: requestServce }, - { provide: AuthService, useValue: authService }, - { provide: AuthorizationDataService, useValue: authorizationService}, + { provide: AuthService, useValue: authService }, + { provide: AuthorizationDataService, useValue: authorizationService }, NgbModal - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(WorkspaceitemActionsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(WorkspaceitemActionsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts index 05afacf0da..538c1b76bd 100644 --- a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts +++ b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts @@ -3,11 +3,11 @@ import { AuthService } from '../../../core/auth/auth.service'; import { Item } from '../../../core/shared/item.model'; import { FeatureID } from '../../../core/data/feature-authorization/feature-id'; import { Component, Injector, Input, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { BehaviorSubject, Observable, switchMap } from 'rxjs'; -import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; -import { TranslateService } from '@ngx-translate/core'; +import { NgbModal, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; @@ -19,14 +19,17 @@ import { getFirstCompletedRemoteData, getRemoteDataPayload } from '../../../core import { RemoteData } from '../../../core/data/remote-data'; import { NoContent } from '../../../core/shared/NoContent.model'; import { getWorkspaceItemViewRoute } from '../../../workspaceitems-edit-page/workspaceitems-edit-page-routing-paths'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * This component represents actions related to WorkspaceItem object. */ @Component({ - selector: 'ds-workspaceitem-actions', - styleUrls: ['./workspaceitem-actions.component.scss'], - templateUrl: './workspaceitem-actions.component.html', + selector: 'ds-workspaceitem-actions', + styleUrls: ['./workspaceitem-actions.component.scss'], + templateUrl: './workspaceitem-actions.component.html', + standalone: true, + imports: [NgbTooltipModule, RouterLink, NgIf, AsyncPipe, TranslateModule] }) export class WorkspaceitemActionsComponent extends MyDSpaceActionsComponent implements OnInit { diff --git a/src/app/shared/ng-for-track-by-id.directive.ts b/src/app/shared/ng-for-track-by-id.directive.ts index 00979bc2bf..cdd62a2aca 100644 --- a/src/app/shared/ng-for-track-by-id.directive.ts +++ b/src/app/shared/ng-for-track-by-id.directive.ts @@ -4,8 +4,9 @@ import { NgForOf } from '@angular/common'; import { DSpaceObject } from '../core/shared/dspace-object.model'; @Directive({ - // eslint-disable-next-line @angular-eslint/directive-selector - selector: '[ngForTrackById]', + // eslint-disable-next-line @angular-eslint/directive-selector + selector: '[ngForTrackById]', + standalone: true }) export class NgForTrackByIdDirective { diff --git a/src/app/shared/notifications/notification/notification.component.spec.ts b/src/app/shared/notifications/notification/notification.component.spec.ts index f6de303726..8d0d1e88ff 100644 --- a/src/app/shared/notifications/notification/notification.component.spec.ts +++ b/src/app/shared/notifications/notification/notification.component.spec.ts @@ -33,24 +33,25 @@ describe('NotificationComponent', () => { }); TestBed.configureTestingModule({ - imports: [ + imports: [ BrowserModule, BrowserAnimationsModule, StoreModule.forRoot({ notificationsReducer }, storeModuleConfig), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - })], - declarations: [NotificationComponent], // declare the test component - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + NotificationComponent + ], + providers: [ { provide: Store, useValue: store }, ChangeDetectorRef, NotificationsService, TranslateService, - ] - }).compileComponents(); // compile template and css + ] +}).compileComponents(); // compile template and css })); diff --git a/src/app/shared/notifications/notification/notification.component.ts b/src/app/shared/notifications/notification/notification.component.ts index 6dbda23e61..50e535ddf5 100644 --- a/src/app/shared/notifications/notification/notification.component.ts +++ b/src/app/shared/notifications/notification/notification.component.ts @@ -24,24 +24,27 @@ import { NotificationAnimationsStatus } from '../models/notification-animations- import { isNotEmpty } from '../../empty.util'; import { INotification } from '../models/notification.model'; import { filter, first } from 'rxjs/operators'; +import { NgIf, NgStyle, NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-notification', - encapsulation: ViewEncapsulation.None, - animations: [ - trigger('enterLeave', [ - fadeInEnter, fadeInState, fadeOutLeave, fadeOutState, - fromBottomEnter, fromBottomInState, fromBottomLeave, fromBottomOutState, - fromRightEnter, fromRightInState, fromRightLeave, fromRightOutState, - fromLeftEnter, fromLeftInState, fromLeftLeave, fromLeftOutState, - fromTopEnter, fromTopInState, fromTopLeave, fromTopOutState, - rotateInState, rotateEnter, rotateOutState, rotateLeave, - scaleInState, scaleEnter, scaleOutState, scaleLeave - ]) - ], - templateUrl: './notification.component.html', - styleUrls: ['./notification.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + selector: 'ds-notification', + encapsulation: ViewEncapsulation.None, + animations: [ + trigger('enterLeave', [ + fadeInEnter, fadeInState, fadeOutLeave, fadeOutState, + fromBottomEnter, fromBottomInState, fromBottomLeave, fromBottomOutState, + fromRightEnter, fromRightInState, fromRightLeave, fromRightOutState, + fromLeftEnter, fromLeftInState, fromLeftLeave, fromLeftOutState, + fromTopEnter, fromTopInState, fromTopLeave, fromTopOutState, + rotateInState, rotateEnter, rotateOutState, rotateLeave, + scaleInState, scaleEnter, scaleOutState, scaleLeave + ]) + ], + templateUrl: './notification.component.html', + styleUrls: ['./notification.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [NgIf, NgStyle, NgClass, NgTemplateOutlet, AsyncPipe] }) export class NotificationComponent implements OnInit, OnDestroy { diff --git a/src/app/shared/notifications/notifications-board/notifications-board.component.spec.ts b/src/app/shared/notifications/notifications-board/notifications-board.component.spec.ts index 08b9585a8c..ac93106703 100644 --- a/src/app/shared/notifications/notifications-board/notifications-board.component.spec.ts +++ b/src/app/shared/notifications/notifications-board/notifications-board.component.spec.ts @@ -24,20 +24,22 @@ describe('NotificationsBoardComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ BrowserModule, BrowserAnimationsModule, StoreModule.forRoot({ notificationsReducer }, { - runtimeChecks: { - strictStateImmutability: false, - strictActionImmutability: false - } - })], - declarations: [NotificationsBoardComponent, NotificationComponent], // declare the test component - providers: [ + runtimeChecks: { + strictStateImmutability: false, + strictActionImmutability: false + } + }), + NotificationsBoardComponent, NotificationComponent + ], + providers: [ { provide: NotificationsService, useClass: NotificationsServiceStub }, - ChangeDetectorRef] - }).compileComponents(); // compile template and css + ChangeDetectorRef + ] +}).compileComponents(); // compile template and css })); beforeEach(inject([NotificationsService, Store], (service: NotificationsService, store: Store) => { diff --git a/src/app/shared/notifications/notifications-board/notifications-board.component.ts b/src/app/shared/notifications/notifications-board/notifications-board.component.ts index 97ae09c1a6..643eeeb862 100644 --- a/src/app/shared/notifications/notifications-board/notifications-board.component.ts +++ b/src/app/shared/notifications/notifications-board/notifications-board.component.ts @@ -18,13 +18,17 @@ import { notificationsStateSelector } from '../selectors'; import { INotification } from '../models/notification.model'; import { NotificationsState } from '../notifications.reducers'; import { INotificationBoardOptions } from '../../../../config/notifications-config.interfaces'; +import { NotificationComponent } from '../notification/notification.component'; +import { NgClass, NgFor } from '@angular/common'; @Component({ - selector: 'ds-notifications-board', - encapsulation: ViewEncapsulation.None, - templateUrl: './notifications-board.component.html', - styleUrls: ['./notifications-board.component.scss'], - changeDetection: ChangeDetectionStrategy.OnPush + selector: 'ds-notifications-board', + encapsulation: ViewEncapsulation.None, + templateUrl: './notifications-board.component.html', + styleUrls: ['./notifications-board.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [NgClass, NgFor, NotificationComponent] }) export class NotificationsBoardComponent implements OnInit, OnDestroy { diff --git a/src/app/shared/notifications/notifications.reducers.spec.ts b/src/app/shared/notifications/notifications.reducers.spec.ts index fde92e8891..a49a1b5c92 100644 --- a/src/app/shared/notifications/notifications.reducers.spec.ts +++ b/src/app/shared/notifications/notifications.reducers.spec.ts @@ -24,15 +24,15 @@ describe('Notifications reducer', () => { beforeEach(async () => { TestBed.configureTestingModule({ - declarations: [NotificationComponent, NotificationsBoardComponent], - providers: [ + providers: [ NotificationsService, ChangeDetectorRef, - ], - imports: [ + ], + imports: [ StoreModule.forRoot({ notificationsReducer }, storeModuleConfig), - ] - }); + NotificationComponent, NotificationsBoardComponent + ] +}); options = new NotificationOptions( 0, diff --git a/src/app/shared/notifications/notifications.service.spec.ts b/src/app/shared/notifications/notifications.service.spec.ts index 92c74e0017..79e1e30ce7 100644 --- a/src/app/shared/notifications/notifications.service.spec.ts +++ b/src/app/shared/notifications/notifications.service.spec.ts @@ -21,22 +21,22 @@ describe('NotificationsService test', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ StoreModule.forRoot({ notificationsReducer }, storeModuleConfig), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [NotificationComponent, NotificationsBoardComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + NotificationComponent, NotificationsBoardComponent + ], + providers: [ { provide: Store, useValue: store }, NotificationsService, TranslateService - ] - }); + ] +}); service = TestBed.inject(NotificationsService); })); diff --git a/src/app/shared/object-collection/object-collection.component.spec.ts b/src/app/shared/object-collection/object-collection.component.spec.ts index 1619e56b0d..86013efb8b 100644 --- a/src/app/shared/object-collection/object-collection.component.spec.ts +++ b/src/app/shared/object-collection/object-collection.component.spec.ts @@ -21,13 +21,13 @@ describe('ObjectCollectionComponent', () => { }; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ObjectCollectionComponent], - providers: [ + imports: [ObjectCollectionComponent], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Router, useClass: RouterStub } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); // compile template and css + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); // compile template and css })); beforeEach(() => { diff --git a/src/app/shared/object-collection/object-collection.component.ts b/src/app/shared/object-collection/object-collection.component.ts index e1f9182562..53d95434c9 100644 --- a/src/app/shared/object-collection/object-collection.component.ts +++ b/src/app/shared/object-collection/object-collection.component.ts @@ -22,15 +22,20 @@ import { CollectionElementLinkType } from './collection-element-link.type'; import { PaginatedList } from '../../core/data/paginated-list.model'; import { Context } from '../../core/shared/context.model'; import { setPlaceHolderAttributes } from '../utils/object-list-utils'; -import { isPlatformBrowser } from '@angular/common'; +import { isPlatformBrowser, NgIf, NgClass, AsyncPipe } from '@angular/common'; +import { ObjectDetailComponent } from '../object-detail/object-detail.component'; +import { ObjectGridComponent } from '../object-grid/object-grid.component'; +import { ThemedObjectListComponent } from '../object-list/themed-object-list.component'; /** * Component that can render a list of listable objects in different view modes */ @Component({ - selector: 'ds-viewable-collection', - styleUrls: ['./object-collection.component.scss'], - templateUrl: './object-collection.component.html', + selector: 'ds-viewable-collection', + styleUrls: ['./object-collection.component.scss'], + templateUrl: './object-collection.component.html', + standalone: true, + imports: [NgIf, ThemedObjectListComponent, NgClass, ObjectGridComponent, ObjectDetailComponent, AsyncPipe] }) export class ObjectCollectionComponent implements OnInit { /** diff --git a/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts b/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts index f661ed6e00..7b46b4f7a7 100644 --- a/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts +++ b/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.spec.ts @@ -57,13 +57,12 @@ describe('ItemAccessStatusBadgeComponent', () => { function initTestBed() { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [AccessStatusBadgeComponent, TruncatePipe], - schemas: [NO_ERRORS_SCHEMA], - providers: [ - {provide: AccessStatusDataService, useValue: accessStatusDataService} - ] - }).compileComponents(); + imports: [TranslateModule.forRoot(), AccessStatusBadgeComponent, TruncatePipe], + schemas: [NO_ERRORS_SCHEMA], + providers: [ + { provide: AccessStatusDataService, useValue: accessStatusDataService } + ] +}).compileComponents(); } function initFixtureAndComponent() { diff --git a/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts b/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts index 2be44669b0..a30f166a43 100644 --- a/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/access-status-badge/access-status-badge.component.ts @@ -8,10 +8,14 @@ import { AccessStatusDataService } from 'src/app/core/data/access-status-data.se import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; import { Item } from '../../../../../core/shared/item.model'; import { ITEM } from '../../../../../core/shared/item.resource-type'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-access-status-badge', - templateUrl: './access-status-badge.component.html' + selector: 'ds-access-status-badge', + templateUrl: './access-status-badge.component.html', + standalone: true, + imports: [NgIf, AsyncPipe, TranslateModule] }) /** * Component rendering the access status of an item as a badge diff --git a/src/app/shared/object-collection/shared/badges/access-status-badge/themed-access-status-badge.component.ts b/src/app/shared/object-collection/shared/badges/access-status-badge/themed-access-status-badge.component.ts index ad8dfd7cb0..26695c970e 100644 --- a/src/app/shared/object-collection/shared/badges/access-status-badge/themed-access-status-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/access-status-badge/themed-access-status-badge.component.ts @@ -7,9 +7,10 @@ import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; * Themed wrapper for AccessStatusBadgeComponent */ @Component({ - selector: 'ds-themed-access-status-badge', - styleUrls: [], - templateUrl: '../../../../theme-support/themed.component.html', + selector: 'ds-themed-access-status-badge', + styleUrls: [], + templateUrl: '../../../../theme-support/themed.component.html', + standalone: true }) export class ThemedAccessStatusBadgeComponent extends ThemedComponent { @Input() object: DSpaceObject; diff --git a/src/app/shared/object-collection/shared/badges/badges.component.spec.ts b/src/app/shared/object-collection/shared/badges/badges.component.spec.ts index 9e0c277a08..ced4f195e2 100644 --- a/src/app/shared/object-collection/shared/badges/badges.component.spec.ts +++ b/src/app/shared/object-collection/shared/badges/badges.component.spec.ts @@ -11,10 +11,10 @@ describe('BadgesComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ BadgesComponent ], - providers: [{provide: ThemeService, useValue: getMockThemeService()}], - schemas: [NO_ERRORS_SCHEMA] - }) + imports: [BadgesComponent], + providers: [{ provide: ThemeService, useValue: getMockThemeService() }], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); }); diff --git a/src/app/shared/object-collection/shared/badges/badges.component.ts b/src/app/shared/object-collection/shared/badges/badges.component.ts index c66fed35fc..5c8c9ff51e 100644 --- a/src/app/shared/object-collection/shared/badges/badges.component.ts +++ b/src/app/shared/object-collection/shared/badges/badges.component.ts @@ -1,6 +1,11 @@ import { Component, Input } from '@angular/core'; import { Context } from 'src/app/core/shared/context.model'; import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; +import { ThemedAccessStatusBadgeComponent } from './access-status-badge/themed-access-status-badge.component'; +import { ThemedTypeBadgeComponent } from './type-badge/themed-type-badge.component'; +import { ThemedMyDSpaceStatusBadgeComponent } from './my-dspace-status-badge/themed-my-dspace-status-badge.component'; +import { NgIf } from '@angular/common'; +import { ThemedStatusBadgeComponent } from './status-badge/themed-status-badge.component'; /** * List of MyDSpace Status Contexts @@ -19,9 +24,11 @@ const MY_DSPACE_STATUS_CONTEXTS = [ * Component that renders all the badges for a listable object */ @Component({ - selector: 'ds-badges', - templateUrl: './badges.component.html', - styleUrls: ['./badges.component.scss'] + selector: 'ds-badges', + templateUrl: './badges.component.html', + styleUrls: ['./badges.component.scss'], + standalone: true, + imports: [ThemedStatusBadgeComponent, NgIf, ThemedMyDSpaceStatusBadgeComponent, ThemedTypeBadgeComponent, ThemedAccessStatusBadgeComponent] }) export class BadgesComponent { /** diff --git a/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.spec.ts b/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.spec.ts index 65fe5b7ef1..9d70e4484c 100644 --- a/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.spec.ts +++ b/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.spec.ts @@ -26,17 +26,17 @@ mockResultObject = Object.assign(new PoolTask(), { workflowitem: observableOf(rd describe('MyDSpaceItemStatusComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [MyDSpaceStatusBadgeComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MyDSpaceStatusBadgeComponent, { + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + MyDSpaceStatusBadgeComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MyDSpaceStatusBadgeComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.ts b/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.ts index 744a927812..64aa19d4e5 100644 --- a/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/my-dspace-status-badge.component.ts @@ -1,13 +1,16 @@ import { Component, Input, OnInit } from '@angular/core'; import { Context } from 'src/app/core/shared/context.model'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component represents a badge with mydspace item status */ @Component({ - selector: 'ds-my-dspace-status-badge', - styleUrls: ['./my-dspace-status-badge.component.scss'], - templateUrl: './my-dspace-status-badge.component.html' + selector: 'ds-my-dspace-status-badge', + styleUrls: ['./my-dspace-status-badge.component.scss'], + templateUrl: './my-dspace-status-badge.component.html', + standalone: true, + imports: [TranslateModule] }) export class MyDSpaceStatusBadgeComponent implements OnInit { diff --git a/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/themed-my-dspace-status-badge.component.ts b/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/themed-my-dspace-status-badge.component.ts index 4c375746c8..f4c71a0f54 100644 --- a/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/themed-my-dspace-status-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/my-dspace-status-badge/themed-my-dspace-status-badge.component.ts @@ -7,9 +7,10 @@ import { MyDSpaceStatusBadgeComponent } from './my-dspace-status-badge.component * Themed wrapper for MyDSpaceStatusBadge */ @Component({ - selector: 'ds-themed-my-dspace-status-badge', - styleUrls: [], - templateUrl: '../../../../theme-support/themed.component.html', + selector: 'ds-themed-my-dspace-status-badge', + styleUrls: [], + templateUrl: '../../../../theme-support/themed.component.html', + standalone: true }) export class ThemedMyDSpaceStatusBadgeComponent extends ThemedComponent { @Input() context: Context; diff --git a/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.spec.ts b/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.spec.ts index f3115073c3..39699edc26 100644 --- a/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.spec.ts +++ b/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.spec.ts @@ -17,10 +17,9 @@ let notPrivateItem = Object.assign(new Item(), { isDiscoverable: true }); describe('ItemStatusBadgeComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [StatusBadgeComponent, TruncatePipe], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(StatusBadgeComponent, { + imports: [TranslateModule.forRoot(), StatusBadgeComponent, TruncatePipe], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(StatusBadgeComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); init(); diff --git a/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.ts b/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.ts index a52f3f6f32..e5cf4026a2 100644 --- a/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/status-badge/status-badge.component.ts @@ -1,10 +1,14 @@ import { Component, Input, OnInit } from '@angular/core'; import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; import { hasValue } from '../../../../empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-status-badge', - templateUrl: './status-badge.component.html' + selector: 'ds-status-badge', + templateUrl: './status-badge.component.html', + standalone: true, + imports: [NgIf, TranslateModule] }) /** * Component rendering the status of an item as a badge diff --git a/src/app/shared/object-collection/shared/badges/status-badge/themed-status-badge.component.ts b/src/app/shared/object-collection/shared/badges/status-badge/themed-status-badge.component.ts index f50d029fff..214073289a 100644 --- a/src/app/shared/object-collection/shared/badges/status-badge/themed-status-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/status-badge/themed-status-badge.component.ts @@ -7,9 +7,10 @@ import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; * Themed wrapper for StatusBadgeComponent */ @Component({ - selector: 'ds-themed-status-badge', - styleUrls: [], - templateUrl: '../../../../theme-support/themed.component.html', + selector: 'ds-themed-status-badge', + styleUrls: [], + templateUrl: '../../../../theme-support/themed.component.html', + standalone: true }) export class ThemedStatusBadgeComponent extends ThemedComponent { @Input() object: DSpaceObject; diff --git a/src/app/shared/object-collection/shared/badges/themed-badges.component.ts b/src/app/shared/object-collection/shared/badges/themed-badges.component.ts index 1671b0c5b0..298be78c22 100644 --- a/src/app/shared/object-collection/shared/badges/themed-badges.component.ts +++ b/src/app/shared/object-collection/shared/badges/themed-badges.component.ts @@ -8,9 +8,10 @@ import { Context } from 'src/app/core/shared/context.model'; * Themed wrapper for BadgesComponent */ @Component({ - selector: 'ds-themed-badges', - styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html', + selector: 'ds-themed-badges', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedBadgesComponent extends ThemedComponent { @Input() object: DSpaceObject; diff --git a/src/app/shared/object-collection/shared/badges/type-badge/themed-type-badge.component.ts b/src/app/shared/object-collection/shared/badges/type-badge/themed-type-badge.component.ts index a8dd0ee04c..1d2785960b 100644 --- a/src/app/shared/object-collection/shared/badges/type-badge/themed-type-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/type-badge/themed-type-badge.component.ts @@ -7,9 +7,10 @@ import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; * Themed wrapper for TypeBadgeComponent */ @Component({ - selector: 'ds-themed-type-badge', - styleUrls: [], - templateUrl: '../../../../theme-support/themed.component.html', + selector: 'ds-themed-type-badge', + styleUrls: [], + templateUrl: '../../../../theme-support/themed.component.html', + standalone: true }) export class ThemedTypeBadgeComponent extends ThemedComponent { @Input() object: DSpaceObject; diff --git a/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.spec.ts b/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.spec.ts index 87adc3761a..1df6f3f838 100644 --- a/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.spec.ts +++ b/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.spec.ts @@ -39,10 +39,9 @@ const mockItemWithoutEntityType = Object.assign(new Item(), { describe('ItemTypeBadgeComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [TypeBadgeComponent, TruncatePipe], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(TypeBadgeComponent, { + imports: [TranslateModule.forRoot(), TypeBadgeComponent, TruncatePipe], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(TypeBadgeComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.ts b/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.ts index ea912063b6..553fb2593c 100644 --- a/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.ts +++ b/src/app/shared/object-collection/shared/badges/type-badge/type-badge.component.ts @@ -2,10 +2,14 @@ import { Component, Input } from '@angular/core'; import { DSpaceObject } from '../../../../../core/shared/dspace-object.model'; import { hasValue, isEmpty } from '../../../../empty.util'; import { getResourceTypeValueFor } from '../../../../../core/cache/object-cache.reducer'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-type-badge', - templateUrl: './type-badge.component.html' + selector: 'ds-type-badge', + templateUrl: './type-badge.component.html', + standalone: true, + imports: [NgIf, TranslateModule] }) /** * Component rendering the type of an item as a badge diff --git a/src/app/shared/object-collection/shared/importable-list-item-control/importable-list-item-control.component.ts b/src/app/shared/object-collection/shared/importable-list-item-control/importable-list-item-control.component.ts index f381a02d86..aca44939dc 100644 --- a/src/app/shared/object-collection/shared/importable-list-item-control/importable-list-item-control.component.ts +++ b/src/app/shared/object-collection/shared/importable-list-item-control/importable-list-item-control.component.ts @@ -1,9 +1,12 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; import { ListableObject } from '../listable-object.model'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-importable-list-item-control', - templateUrl: './importable-list-item-control.component.html' + selector: 'ds-importable-list-item-control', + templateUrl: './importable-list-item-control.component.html', + standalone: true, + imports: [TranslateModule] }) /** * Component adding an import button to a list item diff --git a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts index e893fe807b..b49f24aeb7 100644 --- a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts +++ b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts @@ -35,14 +35,13 @@ describe('ListableObjectComponentLoaderComponent', () => { getThemeName: 'dspace', }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ListableObjectComponentLoaderComponent, ItemListElementComponent, ListableObjectDirective], - schemas: [NO_ERRORS_SCHEMA], - providers: [ + imports: [TranslateModule.forRoot(), ListableObjectComponentLoaderComponent, ItemListElementComponent, ListableObjectDirective], + schemas: [NO_ERRORS_SCHEMA], + providers: [ provideMockStore({}), { provide: ThemeService, useValue: themeService }, - ] - }).overrideComponent(ListableObjectComponentLoaderComponent, { + ] +}).overrideComponent(ListableObjectComponentLoaderComponent, { set: { changeDetection: ChangeDetectionStrategy.Default, entryComponents: [ItemListElementComponent] diff --git a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts index 7a3cc42bf5..0154949c69 100644 --- a/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts +++ b/src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.ts @@ -27,9 +27,11 @@ import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; import { ThemeService } from '../../../theme-support/theme.service'; @Component({ - selector: 'ds-listable-object-component-loader', - styleUrls: ['./listable-object-component-loader.component.scss'], - templateUrl: './listable-object-component-loader.component.html' + selector: 'ds-listable-object-component-loader', + styleUrls: ['./listable-object-component-loader.component.scss'], + templateUrl: './listable-object-component-loader.component.html', + standalone: true, + imports: [ListableObjectDirective] }) /** * Component for determining what component to use depending on the item's entity type (dspace.entity.type) diff --git a/src/app/shared/object-collection/shared/listable-object/listable-object.directive.ts b/src/app/shared/object-collection/shared/listable-object/listable-object.directive.ts index 93c06961f4..d61eb014e2 100644 --- a/src/app/shared/object-collection/shared/listable-object/listable-object.directive.ts +++ b/src/app/shared/object-collection/shared/listable-object/listable-object.directive.ts @@ -1,7 +1,8 @@ import { Directive, ViewContainerRef } from '@angular/core'; @Directive({ - selector: '[dsListableObject]', + selector: '[dsListableObject]', + standalone: true }) /** * Directive used as a hook to know where to inject the dynamic listable object component diff --git a/src/app/shared/object-collection/shared/mydspace-item-collection/item-collection.component.ts b/src/app/shared/object-collection/shared/mydspace-item-collection/item-collection.component.ts index 87f79d3570..e477085d42 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-collection/item-collection.component.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-collection/item-collection.component.ts @@ -11,14 +11,19 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; import { LinkService } from '../../../../core/cache/builders/link.service'; import { followLink } from '../../../utils/follow-link-config.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * This component represents a badge with collection information. */ @Component({ - selector: 'ds-item-collection', - styleUrls: ['./item-collection.component.scss'], - templateUrl: './item-collection.component.html' + selector: 'ds-item-collection', + styleUrls: ['./item-collection.component.scss'], + templateUrl: './item-collection.component.html', + standalone: true, + imports: [NgIf, RouterLink, AsyncPipe, TranslateModule] }) export class ItemCollectionComponent implements OnInit { diff --git a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts index abaf029155..de902bd4f2 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts @@ -26,20 +26,20 @@ mockResultObject = Object.assign(new PoolTask(), { workflowitem: observableOf(rd describe('ItemSubmitterComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ItemSubmitterComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ItemSubmitterComponent + ], + providers: [ { provide: LinkService, useValue: getMockLinkService() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemSubmitterComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemSubmitterComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts index 990aa9906b..837aeb22d5 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts @@ -11,14 +11,18 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; import { LinkService } from '../../../../core/cache/builders/link.service'; import { followLink } from '../../../utils/follow-link-config.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * This component represents a badge with submitter information. */ @Component({ - selector: 'ds-item-submitter', - styleUrls: ['./item-submitter.component.scss'], - templateUrl: './item-submitter.component.html' + selector: 'ds-item-submitter', + styleUrls: ['./item-submitter.component.scss'], + templateUrl: './item-submitter.component.html', + standalone: true, + imports: [NgIf, AsyncPipe, TranslateModule] }) export class ItemSubmitterComponent implements OnInit { diff --git a/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts b/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts index 4614adcf43..a7238fff6a 100644 --- a/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts +++ b/src/app/shared/object-collection/shared/object-collection-element/abstract-listable-element.component.ts @@ -7,8 +7,9 @@ import { DSpaceObject } from '../../../../core/shared/dspace-object.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; @Component({ - selector: 'ds-abstract-object-element', - template: ``, + selector: 'ds-abstract-object-element', + template: ``, + standalone: true }) export class AbstractListableElementComponent { diff --git a/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.spec.ts b/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.spec.ts index c8756567b8..661cf3a843 100644 --- a/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.spec.ts +++ b/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.spec.ts @@ -44,16 +44,15 @@ describe('SelectableListItemControlComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [SelectableListItemControlComponent, VarDirective], - imports: [FormsModule], - providers: [ + imports: [FormsModule, SelectableListItemControlComponent, VarDirective], + providers: [ { - provide: SelectableListService, - useValue: selectionService + provide: SelectableListService, + useValue: selectionService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.ts b/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.ts index ebe49331d5..e32ea9ed72 100644 --- a/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.ts +++ b/src/app/shared/object-collection/shared/selectable-list-item-control/selectable-list-item-control.component.ts @@ -3,11 +3,16 @@ import { ListableObject } from '../listable-object.model'; import { SelectableListService } from '../../../object-list/selectable-list/selectable-list.service'; import { map, skip, take } from 'rxjs/operators'; import { Observable } from 'rxjs'; +import { FormsModule } from '@angular/forms'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../../utils/var.directive'; @Component({ - selector: 'ds-selectable-list-item-control', - // styleUrls: ['./selectable-list-item-control.component.scss'], - templateUrl: './selectable-list-item-control.component.html' + selector: 'ds-selectable-list-item-control', + // styleUrls: ['./selectable-list-item-control.component.scss'], + templateUrl: './selectable-list-item-control.component.html', + standalone: true, + imports: [VarDirective, NgIf, FormsModule, AsyncPipe] }) /** * Component for rendering list item that has a control (checkbox or radio button) because it's selectable diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts index 5d39dd909a..862f5fd2b2 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.spec.ts @@ -75,15 +75,14 @@ const objectCacheServiceMock = jasmine.createSpyObj('ObjectCacheService', { describe('ClaimedTaskSearchResultDetailElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ClaimedTaskSearchResultDetailElementComponent, VarDirective], - providers: [ + imports: [NoopAnimationsModule, ClaimedTaskSearchResultDetailElementComponent, VarDirective], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: LinkService, useValue: linkService }, { provide: ObjectCacheService, useValue: objectCacheServiceMock } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedTaskSearchResultDetailElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedTaskSearchResultDetailElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.ts index 7e463d3b3b..e3ce0d55db 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-task-search-result/claimed-task-search-result-detail-element.component.ts @@ -18,14 +18,19 @@ import { isNotEmpty, hasValue } from '../../../empty.util'; import { ObjectCacheService } from '../../../../core/cache/object-cache.service'; import { Context } from 'src/app/core/shared/context.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { ClaimedTaskActionsComponent } from '../../../mydspace-actions/claimed-task/claimed-task-actions.component'; +import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * This component renders claimed task object for the search result in the detail view. */ @Component({ - selector: 'ds-claimed-task-search-result-detail-element', - styleUrls: ['../search-result-detail-element.component.scss'], - templateUrl: './claimed-task-search-result-detail-element.component.html' + selector: 'ds-claimed-task-search-result-detail-element', + styleUrls: ['../search-result-detail-element.component.scss'], + templateUrl: './claimed-task-search-result-detail-element.component.html', + standalone: true, + imports: [NgIf, ItemDetailPreviewComponent, ClaimedTaskActionsComponent, AsyncPipe] }) @listableObjectComponent(ClaimedTaskSearchResult, ViewMode.DetailedListElement) diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.spec.ts index 56a0df1faa..be1951cb73 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.spec.ts @@ -47,23 +47,21 @@ const mockItemWithAuthorAndDate: Item = Object.assign(new Item(), { describe('ItemDetailPreviewFieldComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [ItemDetailPreviewFieldComponent, TruncatePipe], - providers: [ + ItemDetailPreviewFieldComponent, TruncatePipe + ], + providers: [ { provide: 'objectElementProvider', useValue: { mockItemWithAuthorAndDate } } - - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemDetailPreviewFieldComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemDetailPreviewFieldComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.ts index 5faf02eac0..5880b89cb2 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview-field/item-detail-preview-field.component.ts @@ -3,13 +3,18 @@ import { Component, Input } from '@angular/core'; import { Metadata } from '../../../../../core/shared/metadata.utils'; import { Item } from '../../../../../core/shared/item.model'; import { SearchResult } from '../../../../search/models/search-result.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, NgFor } from '@angular/common'; +import { MetadataFieldWrapperComponent } from '../../../../metadata-field-wrapper/metadata-field-wrapper.component'; /** * This component show values for the given item metadata */ @Component({ - selector: 'ds-item-detail-preview-field', - templateUrl: './item-detail-preview-field.component.html' + selector: 'ds-item-detail-preview-field', + templateUrl: './item-detail-preview-field.component.html', + standalone: true, + imports: [MetadataFieldWrapperComponent, NgIf, NgFor, TranslateModule] }) export class ItemDetailPreviewFieldComponent { diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.spec.ts index 0b5acd343b..ff3a1fe91f 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.spec.ts @@ -84,17 +84,17 @@ describe('ItemDetailPreviewComponent', () => { }; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [ItemDetailPreviewComponent, ItemDetailPreviewFieldComponent, TruncatePipe, FileSizePipe, VarDirective], - providers: [ + ItemDetailPreviewComponent, ItemDetailPreviewFieldComponent, TruncatePipe, FileSizePipe, VarDirective + ], + providers: [ { provide: FileService, useValue: getMockFileService() }, { provide: HALEndpointService, useValue: new HALEndpointServiceStub('workspaceitems') }, { provide: ObjectCacheService, useValue: {} }, @@ -108,9 +108,9 @@ describe('ItemDetailPreviewComponent', () => { { provide: DSOChangeAnalyzer, useValue: {} }, { provide: DefaultChangeAnalyzer, useValue: {} }, { provide: BitstreamDataService, useValue: mockBitstreamDataService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemDetailPreviewComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemDetailPreviewComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.ts index 2e290bfffa..d2920fca2e 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/item-detail-preview/item-detail-preview.component.ts @@ -13,15 +13,27 @@ import { HALEndpointService } from '../../../../core/shared/hal-endpoint.service import { SearchResult } from '../../../search/models/search-result.model'; import { Context } from '../../../../core/shared/context.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { FileSizePipe } from '../../../utils/file-size-pipe'; +import { ItemSubmitterComponent } from '../../../object-collection/shared/mydspace-item-submitter/item-submitter.component'; +import { ItemDetailPreviewFieldComponent } from './item-detail-preview-field/item-detail-preview-field.component'; +import { VarDirective } from '../../../utils/var.directive'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { MetadataFieldWrapperComponent } from '../../../metadata-field-wrapper/metadata-field-wrapper.component'; +import { ThemedItemPageTitleFieldComponent } from '../../../../item-page/simple/field-components/specific-field/title/themed-item-page-field.component'; +import { ThemedBadgesComponent } from '../../../object-collection/shared/badges/themed-badges.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; /** * This component show metadata for the given item object in the detail view. */ @Component({ - selector: 'ds-item-detail-preview', - styleUrls: ['./item-detail-preview.component.scss'], - templateUrl: './item-detail-preview.component.html', - animations: [fadeInOut] + selector: 'ds-item-detail-preview', + styleUrls: ['./item-detail-preview.component.scss'], + templateUrl: './item-detail-preview.component.html', + animations: [fadeInOut], + standalone: true, + imports: [NgIf, ThemedBadgesComponent, ThemedItemPageTitleFieldComponent, MetadataFieldWrapperComponent, ThemedThumbnailComponent, VarDirective, NgFor, ItemDetailPreviewFieldComponent, ItemSubmitterComponent, AsyncPipe, FileSizePipe, TranslateModule] }) export class ItemDetailPreviewComponent { /** diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.spec.ts index 2c8039c923..c0318c2ee9 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.spec.ts @@ -52,13 +52,12 @@ mockResultObject.indexableObject = Object.assign(new Item(), { describe('ItemSearchResultDetailElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ItemSearchResultDetailElementComponent], - providers: [ + imports: [NoopAnimationsModule, ItemSearchResultDetailElementComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemSearchResultDetailElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemSearchResultDetailElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.ts index 40ed72dcf1..e2a780721c 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/item-search-result/item-search-result-detail-element.component.ts @@ -6,14 +6,18 @@ import { SearchResultDetailElementComponent } from '../search-result-detail-elem import { listableObjectComponent } from '../../../object-collection/shared/listable-object/listable-object.decorator'; import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model'; import { Context } from '../../../../core/shared/context.model'; +import { ItemActionsComponent } from '../../../mydspace-actions/item/item-actions.component'; +import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component'; /** * This component renders item object for the search result in the detail view. */ @Component({ - selector: 'ds-item-search-result-detail-element', - styleUrls: ['../search-result-detail-element.component.scss', './item-search-result-detail-element.component.scss'], - templateUrl: './item-search-result-detail-element.component.html' + selector: 'ds-item-search-result-detail-element', + styleUrls: ['../search-result-detail-element.component.scss', './item-search-result-detail-element.component.scss'], + templateUrl: './item-search-result-detail-element.component.html', + standalone: true, + imports: [ItemDetailPreviewComponent, ItemActionsComponent] }) @listableObjectComponent(ItemSearchResult, ViewMode.DetailedListElement, Context.Workspace) diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts index a10e13f63e..ddc1c4b91e 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.spec.ts @@ -68,17 +68,16 @@ const objectCacheServiceMock = jasmine.createSpyObj('ObjectCacheService', { describe('PoolSearchResultDetailElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [PoolSearchResultDetailElementComponent, VarDirective], - providers: [ + imports: [NoopAnimationsModule, PoolSearchResultDetailElementComponent, VarDirective], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: 'objectElementProvider', useValue: (mockResultObject) }, { provide: 'indexElementProvider', useValue: (compIndex) }, { provide: LinkService, useValue: linkService }, { provide: ObjectCacheService, useValue: objectCacheServiceMock } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PoolSearchResultDetailElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PoolSearchResultDetailElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.ts index 80a81efa81..e799e3156b 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-search-result/pool-search-result-detail-element.component.ts @@ -18,14 +18,19 @@ import { isNotEmpty, hasValue } from '../../../empty.util'; import { ObjectCacheService } from '../../../../core/cache/object-cache.service'; import { Context } from 'src/app/core/shared/context.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { PoolTaskActionsComponent } from '../../../mydspace-actions/pool-task/pool-task-actions.component'; +import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * This component renders pool task object for the search result in the detail view. */ @Component({ - selector: 'ds-pool-search-result-detail-element', - styleUrls: ['../search-result-detail-element.component.scss'], - templateUrl: './pool-search-result-detail-element.component.html', + selector: 'ds-pool-search-result-detail-element', + styleUrls: ['../search-result-detail-element.component.scss'], + templateUrl: './pool-search-result-detail-element.component.html', + standalone: true, + imports: [NgIf, ItemDetailPreviewComponent, PoolTaskActionsComponent, AsyncPipe] }) @listableObjectComponent(PoolTaskSearchResult, ViewMode.DetailedListElement) diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/search-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/search-result-detail-element.component.ts index 5b0bd2c39b..6a898a2ea7 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/search-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/search-result-detail-element.component.ts @@ -10,8 +10,9 @@ import { SearchResult } from '../../search/models/search-result.model'; * Component representing Search Results with ViewMode.DetailedElement */ @Component({ - selector: 'ds-search-result-detail-element', - template: `` + selector: 'ds-search-result-detail-element', + template: ``, + standalone: true }) export class SearchResultDetailElementComponent, K extends DSpaceObject> extends AbstractListableElementComponent implements OnInit { diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.spec.ts index f4bc6b88fa..69a022cdfa 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.spec.ts @@ -59,16 +59,15 @@ mockResultObject.indexableObject = Object.assign(new WorkflowItem(), { item: obs describe('WorkflowItemSearchResultDetailElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [WorkflowItemSearchResultDetailElementComponent], - providers: [ + imports: [NoopAnimationsModule, WorkflowItemSearchResultDetailElementComponent], + providers: [ { provide: 'objectElementProvider', useValue: (mockResultObject) }, { provide: 'indexElementProvider', useValue: (compIndex) }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(WorkflowItemSearchResultDetailElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(WorkflowItemSearchResultDetailElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.ts index bad0fcee87..19af7db70e 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workflow-item-search-result/workflow-item-search-result-detail-element.component.ts @@ -14,14 +14,18 @@ import { LinkService } from '../../../../core/cache/builders/link.service'; import { followLink } from '../../../utils/follow-link-config.model'; import { Context } from 'src/app/core/shared/context.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { WorkflowitemActionsComponent } from '../../../mydspace-actions/workflowitem/workflowitem-actions.component'; +import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component'; /** * This component renders workflowitem object for the search result in the detail view. */ @Component({ - selector: 'ds-workflow-item-search-result-detail-element', - styleUrls: ['../search-result-detail-element.component.scss'], - templateUrl: './workflow-item-search-result-detail-element.component.html', + selector: 'ds-workflow-item-search-result-detail-element', + styleUrls: ['../search-result-detail-element.component.scss'], + templateUrl: './workflow-item-search-result-detail-element.component.html', + standalone: true, + imports: [ItemDetailPreviewComponent, WorkflowitemActionsComponent] }) @listableObjectComponent(WorkflowItemSearchResult, ViewMode.DetailedListElement) diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.spec.ts index e86bfdb5e6..30672e5b97 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.spec.ts @@ -59,16 +59,15 @@ mockResultObject.indexableObject = Object.assign(new WorkspaceItem(), { item: ob describe('WorkspaceItemSearchResultDetailElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [WorkspaceItemSearchResultDetailElementComponent], - providers: [ + imports: [NoopAnimationsModule, WorkspaceItemSearchResultDetailElementComponent], + providers: [ { provide: 'objectElementProvider', useValue: (mockResultObject) }, { provide: 'indexElementProvider', useValue: (compIndex) }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(WorkspaceItemSearchResultDetailElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(WorkspaceItemSearchResultDetailElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.ts index 03b41e795c..cec2f252e5 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workspace-item-search-result/workspace-item-search-result-detail-element.component.ts @@ -15,14 +15,18 @@ import { followLink } from '../../../utils/follow-link-config.model'; import { LinkService } from '../../../../core/cache/builders/link.service'; import { Context } from '../../../../core/shared/context.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { WorkspaceitemActionsComponent } from '../../../mydspace-actions/workspaceitem/workspaceitem-actions.component'; +import { ItemDetailPreviewComponent } from '../item-detail-preview/item-detail-preview.component'; /** * This component renders workspace item object for the search result in the detail view. */ @Component({ - selector: 'ds-workspace-item-search-result-detail-element', - styleUrls: ['../search-result-detail-element.component.scss', './workspace-item-search-result-detail-element.component.scss'], - templateUrl: './workspace-item-search-result-detail-element.component.html', + selector: 'ds-workspace-item-search-result-detail-element', + styleUrls: ['../search-result-detail-element.component.scss', './workspace-item-search-result-detail-element.component.scss'], + templateUrl: './workspace-item-search-result-detail-element.component.html', + standalone: true, + imports: [ItemDetailPreviewComponent, WorkspaceitemActionsComponent] }) @listableObjectComponent(WorkspaceItemSearchResult, ViewMode.DetailedListElement) diff --git a/src/app/shared/object-detail/object-detail.component.spec.ts b/src/app/shared/object-detail/object-detail.component.spec.ts index d0fcbed4eb..30103a8d52 100644 --- a/src/app/shared/object-detail/object-detail.component.spec.ts +++ b/src/app/shared/object-detail/object-detail.component.spec.ts @@ -37,18 +37,18 @@ describe('ObjectDetailComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [ObjectDetailComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ObjectDetailComponent, { + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + ObjectDetailComponent + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ObjectDetailComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-detail/object-detail.component.ts b/src/app/shared/object-detail/object-detail.component.ts index 1a32be74b8..b5335fdcf4 100644 --- a/src/app/shared/object-detail/object-detail.component.ts +++ b/src/app/shared/object-detail/object-detail.component.ts @@ -11,17 +11,25 @@ import { PaginationComponentOptions } from '../pagination/pagination-component-o import { ViewMode } from '../../core/shared/view-mode.model'; import { Context } from '../../core/shared/context.model'; import { CollectionElementLinkType } from '../object-collection/collection-element-link.type'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../loading/themed-loading.component'; +import { ErrorComponent } from '../error/error.component'; +import { ListableObjectComponentLoaderComponent } from '../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { NgIf, NgFor } from '@angular/common'; +import { PaginationComponent } from '../pagination/pagination.component'; /** * This component renders a paginated set of results in the detail view. */ @Component({ - changeDetection: ChangeDetectionStrategy.Default, - encapsulation: ViewEncapsulation.Emulated, - selector: 'ds-object-detail', - styleUrls: [ './object-detail.component.scss' ], - templateUrl: './object-detail.component.html', - animations: [fadeIn] + changeDetection: ChangeDetectionStrategy.Default, + encapsulation: ViewEncapsulation.Emulated, + selector: 'ds-object-detail', + styleUrls: ['./object-detail.component.scss'], + templateUrl: './object-detail.component.html', + animations: [fadeIn], + standalone: true, + imports: [PaginationComponent, NgIf, NgFor, ListableObjectComponentLoaderComponent, ErrorComponent, ThemedLoadingComponent, TranslateModule] }) export class ObjectDetailComponent { /** diff --git a/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.spec.ts b/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.spec.ts index e5420f7d4f..0a3823253a 100644 --- a/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.spec.ts +++ b/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.spec.ts @@ -38,17 +38,16 @@ const linkService = jasmine.createSpyObj('linkService', { describe('CollectionGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [CollectionGridElementComponent], - providers: [ + imports: [ + TranslateModule.forRoot(), + CollectionGridElementComponent + ], + providers: [ { provide: 'objectElementProvider', useValue: (mockCollectionWithAbstract) }, { provide: LinkService, useValue: linkService } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CollectionGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CollectionGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.ts b/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.ts index e2ecf7b1ae..99997be970 100644 --- a/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.ts +++ b/src/app/shared/object-grid/collection-grid-element/collection-grid-element.component.ts @@ -7,14 +7,20 @@ import { hasNoValue, hasValue } from '../../empty.util'; import { followLink } from '../../utils/follow-link-config.model'; import { LinkService } from '../../../core/cache/builders/link.service'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedThumbnailComponent } from '../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * Component representing a grid element for collection */ @Component({ - selector: 'ds-collection-grid-element', - styleUrls: ['./collection-grid-element.component.scss'], - templateUrl: './collection-grid-element.component.html', + selector: 'ds-collection-grid-element', + styleUrls: ['./collection-grid-element.component.scss'], + templateUrl: './collection-grid-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThemedThumbnailComponent, AsyncPipe, TranslateModule] }) @listableObjectComponent(Collection, ViewMode.GridElement) export class CollectionGridElementComponent extends AbstractListableElementComponent< diff --git a/src/app/shared/object-grid/community-grid-element/community-grid-element.component.spec.ts b/src/app/shared/object-grid/community-grid-element/community-grid-element.component.spec.ts index 2bf682350e..7d3b7fabd7 100644 --- a/src/app/shared/object-grid/community-grid-element/community-grid-element.component.spec.ts +++ b/src/app/shared/object-grid/community-grid-element/community-grid-element.component.spec.ts @@ -38,17 +38,16 @@ const linkService = jasmine.createSpyObj('linkService', { describe('CommunityGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [CommunityGridElementComponent], - providers: [ + imports: [ + TranslateModule.forRoot(), + CommunityGridElementComponent + ], + providers: [ { provide: 'objectElementProvider', useValue: (mockCommunityWithAbstract) }, { provide: LinkService, useValue: linkService } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CommunityGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CommunityGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-grid/community-grid-element/community-grid-element.component.ts b/src/app/shared/object-grid/community-grid-element/community-grid-element.component.ts index 59ac0693eb..101c544b50 100644 --- a/src/app/shared/object-grid/community-grid-element/community-grid-element.component.ts +++ b/src/app/shared/object-grid/community-grid-element/community-grid-element.component.ts @@ -7,14 +7,20 @@ import { followLink } from '../../utils/follow-link-config.model'; import { LinkService } from '../../../core/cache/builders/link.service'; import { hasNoValue, hasValue } from '../../empty.util'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedThumbnailComponent } from '../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * Component representing a grid element for a community */ @Component({ - selector: 'ds-community-grid-element', - styleUrls: ['./community-grid-element.component.scss'], - templateUrl: './community-grid-element.component.html' + selector: 'ds-community-grid-element', + styleUrls: ['./community-grid-element.component.scss'], + templateUrl: './community-grid-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThemedThumbnailComponent, AsyncPipe, TranslateModule] }) @listableObjectComponent(Community, ViewMode.GridElement) diff --git a/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts b/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts index b137c2e708..70127c333c 100644 --- a/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts +++ b/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts @@ -53,14 +53,13 @@ describe('ItemGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ItemGridElementComponent, TruncatePipe], - providers: [ + imports: [NoopAnimationsModule, ItemGridElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.ts b/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.ts index c8a58c5a89..71b4f2ab32 100644 --- a/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.ts +++ b/src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.ts @@ -4,14 +4,17 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../../core/shared/item.model'; +import { ItemSearchResultGridElementComponent } from '../../../search-result-grid-element/item-search-result/item/item-search-result-grid-element.component'; @listableObjectComponent('Publication', ViewMode.GridElement) @listableObjectComponent(Item, ViewMode.GridElement) @Component({ - selector: 'ds-item-grid-element', - styleUrls: ['./item-grid-element.component.scss'], - templateUrl: './item-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-item-grid-element', + styleUrls: ['./item-grid-element.component.scss'], + templateUrl: './item-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [ItemSearchResultGridElementComponent] }) /** * The component for displaying a grid element for an item of the type Publication diff --git a/src/app/shared/object-grid/object-grid.component.ts b/src/app/shared/object-grid/object-grid.component.ts index 91630ca007..d696c853ae 100644 --- a/src/app/shared/object-grid/object-grid.component.ts +++ b/src/app/shared/object-grid/object-grid.component.ts @@ -24,14 +24,23 @@ import { PaginationComponentOptions } from '../pagination/pagination-component-o import { ViewMode } from '../../core/shared/view-mode.model'; import { Context } from '../../core/shared/context.model'; import { CollectionElementLinkType } from '../object-collection/collection-element-link.type'; +import { BrowserOnlyPipe } from '../utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../loading/themed-loading.component'; +import { ErrorComponent } from '../error/error.component'; +import { ListableObjectComponentLoaderComponent } from '../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; +import { PaginationComponent } from '../pagination/pagination.component'; @Component({ - changeDetection: ChangeDetectionStrategy.Default, - encapsulation: ViewEncapsulation.Emulated, - selector: 'ds-object-grid', - styleUrls: ['./object-grid.component.scss'], - templateUrl: './object-grid.component.html', - animations: [fadeIn] + changeDetection: ChangeDetectionStrategy.Default, + encapsulation: ViewEncapsulation.Emulated, + selector: 'ds-object-grid', + styleUrls: ['./object-grid.component.scss'], + templateUrl: './object-grid.component.html', + animations: [fadeIn], + standalone: true, + imports: [PaginationComponent, NgIf, NgFor, ListableObjectComponentLoaderComponent, ErrorComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule, BrowserOnlyPipe] }) export class ObjectGridComponent implements OnInit { diff --git a/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.spec.ts b/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.spec.ts index 15548d6608..280998d7ca 100644 --- a/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.spec.ts +++ b/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.spec.ts @@ -61,11 +61,11 @@ const linkService = jasmine.createSpyObj('linkService', { describe('CollectionSearchResultGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [CollectionSearchResultGridElementComponent, TruncatePipe], - providers: [ + imports: [ + TranslateModule.forRoot(), + CollectionSearchResultGridElementComponent, TruncatePipe + ], + providers: [ { provide: TruncatableService, useValue: truncatableServiceStub }, { provide: 'objectElementProvider', useValue: (mockCollectionWithAbstract) }, { provide: ObjectCacheService, useValue: {} }, @@ -81,10 +81,9 @@ describe('CollectionSearchResultGridElementComponent', () => { { provide: DefaultChangeAnalyzer, useValue: {} }, { provide: BitstreamFormatDataService, useValue: {} }, { provide: LinkService, useValue: linkService } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CollectionSearchResultGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CollectionSearchResultGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.ts b/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.ts index e4ea2e48f5..ce5be1978b 100644 --- a/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.ts +++ b/src/app/shared/object-grid/search-result-grid-element/collection-search-result/collection-search-result-grid-element.component.ts @@ -10,11 +10,18 @@ import { LinkService } from '../../../../core/cache/builders/link.service'; import { TruncatableService } from '../../../truncatable/truncatable.service'; import { BitstreamDataService } from '../../../../core/data/bitstream-data.service'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedBadgesComponent } from '../../../object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-collection-search-result-grid-element', - styleUrls: ['../search-result-grid-element.component.scss', 'collection-search-result-grid-element.component.scss'], - templateUrl: 'collection-search-result-grid-element.component.html' + selector: 'ds-collection-search-result-grid-element', + styleUrls: ['../search-result-grid-element.component.scss', 'collection-search-result-grid-element.component.scss'], + templateUrl: 'collection-search-result-grid-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, AsyncPipe, TranslateModule] }) /** * Component representing a grid element for a collection search result diff --git a/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.spec.ts b/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.spec.ts index 710fbf3f67..9029b2e618 100644 --- a/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.spec.ts +++ b/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.spec.ts @@ -61,11 +61,11 @@ const linkService = jasmine.createSpyObj('linkService', { describe('CommunitySearchResultGridElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [CommunitySearchResultGridElementComponent, TruncatePipe], - providers: [ + imports: [ + TranslateModule.forRoot(), + CommunitySearchResultGridElementComponent, TruncatePipe + ], + providers: [ { provide: TruncatableService, useValue: truncatableServiceStub }, { provide: 'objectElementProvider', useValue: (mockCommunityWithAbstract) }, { provide: ObjectCacheService, useValue: {} }, @@ -81,10 +81,9 @@ describe('CommunitySearchResultGridElementComponent', () => { { provide: DefaultChangeAnalyzer, useValue: {} }, { provide: BitstreamFormatDataService, useValue: {} }, { provide: LinkService, useValue: linkService } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CommunitySearchResultGridElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CommunitySearchResultGridElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.ts b/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.ts index 039b01c567..c2d546a803 100644 --- a/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.ts +++ b/src/app/shared/object-grid/search-result-grid-element/community-search-result/community-search-result-grid-element.component.ts @@ -10,14 +10,21 @@ import { BitstreamDataService } from '../../../../core/data/bitstream-data.servi import { hasNoValue, hasValue } from '../../../empty.util'; import { followLink } from '../../../utils/follow-link-config.model'; import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedBadgesComponent } from '../../../object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-community-search-result-grid-element', - styleUrls: [ - '../search-result-grid-element.component.scss', - 'community-search-result-grid-element.component.scss', - ], - templateUrl: 'community-search-result-grid-element.component.html', + selector: 'ds-community-search-result-grid-element', + styleUrls: [ + '../search-result-grid-element.component.scss', + 'community-search-result-grid-element.component.scss', + ], + templateUrl: 'community-search-result-grid-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, AsyncPipe, TranslateModule] }) /** * Component representing a grid element for a community search result diff --git a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.spec.ts b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.spec.ts index dc42b033d8..f22d604d15 100644 --- a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.spec.ts +++ b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.spec.ts @@ -214,27 +214,27 @@ export function getEntityGridElementTestComponent(component, searchResultWithMet beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - NoopAnimationsModule, - TranslateModule.forRoot() - ], - declarations: [component, TruncatePipe], - providers: [ - { provide: TruncatableService, useValue: truncatableServiceStub }, - { provide: ObjectCacheService, useValue: {} }, - { provide: UUIDService, useValue: {} }, - { provide: Store, useValue: {} }, - { provide: RemoteDataBuildService, useValue: {} }, - { provide: CommunityDataService, useValue: {} }, - { provide: HALEndpointService, useValue: {} }, - { provide: HttpClient, useValue: {} }, - { provide: DSOChangeAnalyzer, useValue: {} }, - { provide: NotificationsService, useValue: {} }, - { provide: DefaultChangeAnalyzer, useValue: {} }, - { provide: BitstreamDataService, useValue: mockBitstreamDataService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(component, { + imports: [ + NoopAnimationsModule, + TranslateModule.forRoot(), + component, TruncatePipe + ], + providers: [ + { provide: TruncatableService, useValue: truncatableServiceStub }, + { provide: ObjectCacheService, useValue: {} }, + { provide: UUIDService, useValue: {} }, + { provide: Store, useValue: {} }, + { provide: RemoteDataBuildService, useValue: {} }, + { provide: CommunityDataService, useValue: {} }, + { provide: HALEndpointService, useValue: {} }, + { provide: HttpClient, useValue: {} }, + { provide: DSOChangeAnalyzer, useValue: {} }, + { provide: NotificationsService, useValue: {} }, + { provide: DefaultChangeAnalyzer, useValue: {} }, + { provide: BitstreamDataService, useValue: mockBitstreamDataService }, + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(component, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.ts b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.ts index 7d237e3f79..52ba5a00ff 100644 --- a/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.ts +++ b/src/app/shared/object-grid/search-result-grid-element/item-search-result/item/item-search-result-grid-element.component.ts @@ -11,14 +11,23 @@ import { getItemPageRoute } from '../../../../../item-page/item-page-routing-pat import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { TruncatableService } from '../../../../truncatable/truncatable.service'; import { BitstreamDataService } from '../../../../../core/data/bitstream-data.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { TruncatablePartComponent } from '../../../../truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../../truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../../object-collection/shared/badges/themed-badges.component'; +import { ThemedThumbnailComponent } from '../../../../../thumbnail/themed-thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; @listableObjectComponent('PublicationSearchResult', ViewMode.GridElement) @listableObjectComponent(ItemSearchResult, ViewMode.GridElement) @Component({ - selector: 'ds-item-search-result-grid-element', - styleUrls: ['./item-search-result-grid-element.component.scss'], - templateUrl: './item-search-result-grid-element.component.html', - animations: [focusShadow] + selector: 'ds-item-search-result-grid-element', + styleUrls: ['./item-search-result-grid-element.component.scss'], + templateUrl: './item-search-result-grid-element.component.html', + animations: [focusShadow], + standalone: true, + imports: [NgIf, RouterLink, ThemedThumbnailComponent, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, NgFor, AsyncPipe, TranslateModule] }) /** * The component for displaying a grid element for an item search result of the type Publication diff --git a/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts b/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts index 4c3431bb55..a5092c42f4 100644 --- a/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts +++ b/src/app/shared/object-grid/search-result-grid-element/search-result-grid-element.component.ts @@ -11,8 +11,9 @@ import { TruncatableService } from '../../truncatable/truncatable.service'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; @Component({ - selector: 'ds-search-result-grid-element', - template: `` + selector: 'ds-search-result-grid-element', + template: ``, + standalone: true }) export class SearchResultGridElementComponent, K extends DSpaceObject> extends AbstractListableElementComponent implements OnInit { /** diff --git a/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts b/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts index 906add6578..f6f81c9d53 100644 --- a/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts +++ b/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.spec.ts @@ -14,10 +14,9 @@ describe('BitstreamListItemComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [ BitstreamListItemComponent ], - imports: [ CommonModule, SharedModule, TranslateModule, RouterTestingModule ], - providers: [{ provide: DSONameService, useValue: new DSONameServiceMock() }] - }) + imports: [CommonModule, SharedModule, TranslateModule, RouterTestingModule, BitstreamListItemComponent], + providers: [{ provide: DSONameService, useValue: new DSONameServiceMock() }] +}) .compileComponents(); }); diff --git a/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.ts b/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.ts index f281c0bd77..bd1625c0c7 100644 --- a/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.ts +++ b/src/app/shared/object-list/bitstream-list-item/bitstream-list-item.component.ts @@ -10,8 +10,9 @@ import { Context } from '../../../core/shared/context.model'; @listableObjectComponent(Bitstream, ViewMode.ListElement, Context.Bitstream) @Component({ - selector: 'ds-bitstream-list-item', - template: ` {{object.name}} `, - styleUrls: ['./bitstream-list-item.component.scss'] + selector: 'ds-bitstream-list-item', + template: ` {{object.name}} `, + styleUrls: ['./bitstream-list-item.component.scss'], + standalone: true }) export class BitstreamListItemComponent extends AbstractListableElementComponent{} diff --git a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts index 15d1d9df39..481dda00aa 100644 --- a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts +++ b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.spec.ts @@ -34,16 +34,15 @@ describe('BrowseEntryListElementComponent', () => { beforeEach(waitForAsync(() => { init(); TestBed.configureTestingModule({ - declarations: [BrowseEntryListElementComponent, TruncatePipe], - providers: [ + imports: [BrowseEntryListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: 'objectElementProvider', useValue: { mockValue } }, - {provide: PaginationService, useValue: paginationService}, - {provide: RouteService, useValue: routeService}, - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(BrowseEntryListElementComponent, { + { provide: PaginationService, useValue: paginationService }, + { provide: RouteService, useValue: routeService }, + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(BrowseEntryListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts index e67dd4489e..5a8b921e56 100644 --- a/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts +++ b/src/app/shared/object-list/browse-entry-list-element/browse-entry-list-element.component.ts @@ -5,17 +5,20 @@ import { BrowseEntry } from '../../../core/shared/browse-entry.model'; import { ViewMode } from '../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../object-collection/shared/listable-object/listable-object.decorator'; import { PaginationService } from '../../../core/pagination/pagination.service'; -import { Params } from '@angular/router'; +import { Params, RouterLink } from '@angular/router'; import { BBM_PAGINATION_ID } from '../../../browse-by/browse-by-metadata-page/browse-by-metadata-page.component'; import { RouteService } from 'src/app/core/services/route.service'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-browse-entry-list-element', - styleUrls: ['./browse-entry-list-element.component.scss'], - templateUrl: './browse-entry-list-element.component.html' + selector: 'ds-browse-entry-list-element', + styleUrls: ['./browse-entry-list-element.component.scss'], + templateUrl: './browse-entry-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, AsyncPipe] }) /** diff --git a/src/app/shared/object-list/bundle-list-element/bundle-list-element.component.ts b/src/app/shared/object-list/bundle-list-element/bundle-list-element.component.ts index 55eb5b116e..4c89584d50 100644 --- a/src/app/shared/object-list/bundle-list-element/bundle-list-element.component.ts +++ b/src/app/shared/object-list/bundle-list-element/bundle-list-element.component.ts @@ -5,8 +5,9 @@ import { listableObjectComponent } from '../../object-collection/shared/listable import { ViewMode } from '../../../core/shared/view-mode.model'; @Component({ - selector: 'ds-bundle-list-element', - templateUrl: './bundle-list-element.component.html' + selector: 'ds-bundle-list-element', + templateUrl: './bundle-list-element.component.html', + standalone: true }) /** * This component is automatically used to create a list view for Bundle objects diff --git a/src/app/shared/object-list/collection-list-element/collection-list-element.component.spec.ts b/src/app/shared/object-list/collection-list-element/collection-list-element.component.spec.ts index 97f9eb88c2..f4b8faae8c 100644 --- a/src/app/shared/object-list/collection-list-element/collection-list-element.component.spec.ts +++ b/src/app/shared/object-list/collection-list-element/collection-list-element.component.spec.ts @@ -57,14 +57,13 @@ const mockCollectionWithoutAbstract: Collection = Object.assign(new Collection() describe('CollectionListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [CollectionListElementComponent], - providers: [ + imports: [CollectionListElementComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: 'objectElementProvider', useValue: (mockCollectionWithAbstract) } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CollectionListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CollectionListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/collection-list-element/collection-list-element.component.ts b/src/app/shared/object-list/collection-list-element/collection-list-element.component.ts index c36034ba34..9e988d1109 100644 --- a/src/app/shared/object-list/collection-list-element/collection-list-element.component.ts +++ b/src/app/shared/object-list/collection-list-element/collection-list-element.component.ts @@ -4,11 +4,15 @@ import { Collection } from '../../../core/shared/collection.model'; import { AbstractListableElementComponent } from '../../object-collection/shared/object-collection-element/abstract-listable-element.component'; import { ViewMode } from '../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../object-collection/shared/listable-object/listable-object.decorator'; +import { RouterLink } from '@angular/router'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-collection-list-element', - styleUrls: ['./collection-list-element.component.scss'], - templateUrl: './collection-list-element.component.html' + selector: 'ds-collection-list-element', + styleUrls: ['./collection-list-element.component.scss'], + templateUrl: './collection-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink] }) /** * Component representing list element for a collection diff --git a/src/app/shared/object-list/community-list-element/community-list-element.component.spec.ts b/src/app/shared/object-list/community-list-element/community-list-element.component.spec.ts index 8f7350d860..d3411bb0b4 100644 --- a/src/app/shared/object-list/community-list-element/community-list-element.component.spec.ts +++ b/src/app/shared/object-list/community-list-element/community-list-element.component.spec.ts @@ -34,14 +34,13 @@ const mockCommunityWithoutAbstract: Community = Object.assign(new Community(), { describe('CommunityListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [CommunityListElementComponent], - providers: [ + imports: [CommunityListElementComponent], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: 'objectElementProvider', useValue: (mockCommunityWithAbstract) } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CommunityListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CommunityListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/community-list-element/community-list-element.component.ts b/src/app/shared/object-list/community-list-element/community-list-element.component.ts index 4a83fd2834..e92e237314 100644 --- a/src/app/shared/object-list/community-list-element/community-list-element.component.ts +++ b/src/app/shared/object-list/community-list-element/community-list-element.component.ts @@ -5,11 +5,15 @@ import { AbstractListableElementComponent } from '../../object-collection/shared import { ViewMode } from '../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../object-collection/shared/listable-object/listable-object.decorator'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { RouterLink } from '@angular/router'; +import { NgIf } from '@angular/common'; @Component({ - selector: 'ds-community-list-element', - styleUrls: ['./community-list-element.component.scss'], - templateUrl: './community-list-element.component.html' + selector: 'ds-community-list-element', + styleUrls: ['./community-list-element.component.scss'], + templateUrl: './community-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink] }) /** * Component representing a list element for a community diff --git a/src/app/shared/object-list/identifier-data/identifier-data.component.html b/src/app/shared/object-list/identifier-data/identifier-data.component.html index 91470628c4..ec1ac6d644 100644 --- a/src/app/shared/object-list/identifier-data/identifier-data.component.html +++ b/src/app/shared/object-list/identifier-data/identifier-data.component.html @@ -1,5 +1,3 @@ - -
- {{ identifiers[0].value | translate }} -
-
+
+ {{ identifiers[0].value | translate }} +
diff --git a/src/app/shared/object-list/identifier-data/identifier-data.component.ts b/src/app/shared/object-list/identifier-data/identifier-data.component.ts index cb6d1d97e5..908ac0bc66 100644 --- a/src/app/shared/object-list/identifier-data/identifier-data.component.ts +++ b/src/app/shared/object-list/identifier-data/identifier-data.component.ts @@ -5,10 +5,18 @@ import { hasValue } from '../../empty.util'; import { Item } from 'src/app/core/shared/item.model'; import { IdentifierData } from './identifier-data.model'; import { IdentifierDataService } from '../../../core/data/identifier-data.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgIf } from '@angular/common'; @Component({ selector: 'ds-identifier-data', - templateUrl: './identifier-data.component.html' + templateUrl: './identifier-data.component.html', + imports: [ + TranslateModule, + AsyncPipe, + NgIf + ], + standalone: true }) /** * Component rendering an identifier, eg. DOI or handle diff --git a/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.spec.ts b/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.spec.ts index d75576e8eb..e545d8192e 100644 --- a/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.spec.ts +++ b/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.spec.ts @@ -55,13 +55,13 @@ describe('ItemListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ItemListElementComponent, TruncatePipe], - providers: [ + imports: [ItemListElementComponent, TruncatePipe], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.ts b/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.ts index a3bd2a1ce0..76e715665c 100644 --- a/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.ts +++ b/src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.ts @@ -3,13 +3,16 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../../object-collection/shared/listable-object/listable-object.decorator'; import { AbstractListableElementComponent } from '../../../../object-collection/shared/object-collection-element/abstract-listable-element.component'; import { Item } from '../../../../../core/shared/item.model'; +import { ItemSearchResultListElementComponent } from '../../../search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component'; @listableObjectComponent('Publication', ViewMode.ListElement) @listableObjectComponent(Item, ViewMode.ListElement) @Component({ - selector: 'ds-item-list-element', - styleUrls: ['./item-list-element.component.scss'], - templateUrl: './item-list-element.component.html' + selector: 'ds-item-list-element', + styleUrls: ['./item-list-element.component.scss'], + templateUrl: './item-list-element.component.html', + standalone: true, + imports: [ItemSearchResultListElementComponent] }) /** * The component for displaying a list element for an item of the type Publication diff --git a/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.spec.ts b/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.spec.ts index 3cf05f7fec..6a30552385 100644 --- a/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.spec.ts +++ b/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.spec.ts @@ -11,13 +11,11 @@ describe('ListableNotificationObjectComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - ], - declarations: [ - ListableNotificationObjectComponent, - ], - }).compileComponents(); + ListableNotificationObjectComponent + ] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.ts b/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.ts index ca23ee76a2..1c5b160590 100644 --- a/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.ts +++ b/src/app/shared/object-list/listable-notification-object/listable-notification-object.component.ts @@ -6,6 +6,7 @@ import { ListableNotificationObject } from './listable-notification-object.model import { listableObjectComponent } from '../../object-collection/shared/listable-object/listable-object.decorator'; import { ViewMode } from '../../../core/shared/view-mode.model'; import { LISTABLE_NOTIFICATION_OBJECT } from './listable-notification-object.resource-type'; +import { TranslateModule } from '@ngx-translate/core'; /** * The component for displaying a notifications inside an object list @@ -13,9 +14,11 @@ import { LISTABLE_NOTIFICATION_OBJECT } from './listable-notification-object.res @listableObjectComponent(ListableNotificationObject, ViewMode.ListElement) @listableObjectComponent(LISTABLE_NOTIFICATION_OBJECT.value, ViewMode.ListElement) @Component({ - selector: 'ds-listable-notification-object', - templateUrl: './listable-notification-object.component.html', - styleUrls: ['./listable-notification-object.component.scss'], + selector: 'ds-listable-notification-object', + templateUrl: './listable-notification-object.component.html', + styleUrls: ['./listable-notification-object.component.scss'], + standalone: true, + imports: [TranslateModule] }) export class ListableNotificationObjectComponent extends AbstractListableElementComponent { } diff --git a/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.spec.ts b/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.spec.ts index 3527b9fddd..d6733c0afa 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.spec.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.spec.ts @@ -19,10 +19,9 @@ describe('BrowseLinkMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [], - declarations: [BrowseLinkMetadataListElementComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(BrowseLinkMetadataListElementComponent, { + imports: [BrowseLinkMetadataListElementComponent], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(BrowseLinkMetadataListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts b/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts index 8015583767..582a17523e 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/browse-link/browse-link-metadata-list-element.component.ts @@ -3,13 +3,17 @@ import { Component } from '@angular/core'; import { MetadataRepresentationListElementComponent } from '../metadata-representation-list-element.component'; import { metadataRepresentationComponent } from '../../../metadata-representation/metadata-representation.decorator'; import { VALUE_LIST_BROWSE_DEFINITION } from '../../../../core/shared/value-list-browse-definition.resource-type'; +import { RouterLink } from '@angular/router'; +import { NgIf } from '@angular/common'; //@metadataRepresentationComponent('Publication', MetadataRepresentationType.PlainText) // For now, authority controlled fields are rendered the same way as plain text fields //@metadataRepresentationComponent('Publication', MetadataRepresentationType.AuthorityControlled) @metadataRepresentationComponent('Publication', MetadataRepresentationType.BrowseLink) @Component({ - selector: 'ds-browse-link-metadata-list-element', - templateUrl: './browse-link-metadata-list-element.component.html' + selector: 'ds-browse-link-metadata-list-element', + templateUrl: './browse-link-metadata-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink] }) /** * A component for displaying MetadataRepresentation objects in the form of plain text diff --git a/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.spec.ts b/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.spec.ts index 99052b6b14..8463552517 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.spec.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.spec.ts @@ -12,10 +12,9 @@ describe('ItemMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [], - declarations: [ItemMetadataListElementComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemMetadataListElementComponent, { + imports: [ItemMetadataListElementComponent], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemMetadataListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.ts b/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.ts index d0bbdf1ded..d8e54c6b29 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-list-element.component.ts @@ -3,11 +3,14 @@ import { Component } from '@angular/core'; import { MetadataRepresentationListElementComponent } from '../metadata-representation-list-element.component'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { metadataRepresentationComponent } from '../../../metadata-representation/metadata-representation.decorator'; +import { ListableObjectComponentLoaderComponent } from '../../../object-collection/shared/listable-object/listable-object-component-loader.component'; @metadataRepresentationComponent('Publication', MetadataRepresentationType.Item) @Component({ - selector: 'ds-item-metadata-list-element', - templateUrl: './item-metadata-list-element.component.html' + selector: 'ds-item-metadata-list-element', + templateUrl: './item-metadata-list-element.component.html', + standalone: true, + imports: [ListableObjectComponentLoaderComponent] }) /** * A component for displaying MetadataRepresentation objects in the form of items diff --git a/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component.ts b/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component.ts index c4a6903129..2d30fc7d6d 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/item/item-metadata-representation-list-element.component.ts @@ -4,8 +4,9 @@ import { ItemMetadataRepresentation } from '../../../../core/shared/metadata-rep import { getItemPageRoute } from '../../../../item-page/item-page-routing-paths'; @Component({ - selector: 'ds-item-metadata-representation-list-element', - template: '' + selector: 'ds-item-metadata-representation-list-element', + template: '', + standalone: true }) /** * An abstract class for displaying a single ItemMetadataRepresentation diff --git a/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.spec.ts b/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.spec.ts index dc8febe84a..540dba33e5 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.spec.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.spec.ts @@ -20,10 +20,9 @@ describe('MetadataRepresentationListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [], - declarations: [MetadataRepresentationListElementComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(MetadataRepresentationListElementComponent, { + imports: [MetadataRepresentationListElementComponent], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(MetadataRepresentationListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.ts b/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.ts index d8f8621ca6..5a0c0058a0 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/metadata-representation-list-element.component.ts @@ -3,8 +3,9 @@ import { MetadataRepresentation } from '../../../core/shared/metadata-representa import { Context } from '../../../core/shared/context.model'; @Component({ - selector: 'ds-metadata-representation-list-element', - template: '' + selector: 'ds-metadata-representation-list-element', + template: '', + standalone: true }) /** * An abstract class for displaying a single MetadataRepresentation diff --git a/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.spec.ts b/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.spec.ts index 91d7db3562..dc1d7cfb4b 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.spec.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.spec.ts @@ -18,10 +18,9 @@ describe('PlainTextMetadataListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [], - declarations: [PlainTextMetadataListElementComponent], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PlainTextMetadataListElementComponent, { + imports: [PlainTextMetadataListElementComponent], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PlainTextMetadataListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts b/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts index 8a3e1d51a6..f3240dfe5f 100644 --- a/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts +++ b/src/app/shared/object-list/metadata-representation-list-element/plain-text/plain-text-metadata-list-element.component.ts @@ -3,13 +3,17 @@ import { Component } from '@angular/core'; import { MetadataRepresentationListElementComponent } from '../metadata-representation-list-element.component'; import { metadataRepresentationComponent } from '../../../metadata-representation/metadata-representation.decorator'; import { VALUE_LIST_BROWSE_DEFINITION } from '../../../../core/shared/value-list-browse-definition.resource-type'; +import { RouterLink } from '@angular/router'; +import { NgIf } from '@angular/common'; @metadataRepresentationComponent('Publication', MetadataRepresentationType.PlainText) // For now, authority controlled fields are rendered the same way as plain text fields @metadataRepresentationComponent('Publication', MetadataRepresentationType.AuthorityControlled) @Component({ - selector: 'ds-plain-text-metadata-list-element', - templateUrl: './plain-text-metadata-list-element.component.html' + selector: 'ds-plain-text-metadata-list-element', + templateUrl: './plain-text-metadata-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink] }) /** * A component for displaying MetadataRepresentation objects in the form of plain text diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.spec.ts index 777a0258b0..b9b39c1315 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.spec.ts @@ -65,19 +65,19 @@ const linkService = getMockLinkService(); describe('ClaimedApprovedSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), NoopAnimationsModule, - ], - declarations: [ClaimedApprovedSearchResultListElementComponent, VarDirective], - providers: [ + ClaimedApprovedSearchResultListElementComponent, VarDirective + ], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedApprovedSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedApprovedSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.ts index 10e29bbab9..d974a852ec 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-approved-search-result/claimed-approved-search-result-list-element.component.ts @@ -14,14 +14,20 @@ import { ClaimedTask } from '../../../../../core/tasks/models/claimed-task-objec import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface'; import { Context } from 'src/app/core/shared/context.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedItemListPreviewComponent } from '../../item-list-preview/themed-item-list-preview.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../../../utils/var.directive'; /** * This component renders claimed task approved object for the search result in the list view. */ @Component({ - selector: 'ds-claimed-approved-search-result-list-element', - styleUrls: ['../../../search-result-list-element/search-result-list-element.component.scss'], - templateUrl: './claimed-approved-search-result-list-element.component.html' + selector: 'ds-claimed-approved-search-result-list-element', + styleUrls: ['../../../search-result-list-element/search-result-list-element.component.scss'], + templateUrl: './claimed-approved-search-result-list-element.component.html', + standalone: true, + imports: [VarDirective, NgIf, ThemedItemListPreviewComponent, AsyncPipe, TranslateModule] }) @listableObjectComponent(ClaimedApprovedTaskSearchResult, ViewMode.ListElement) export class ClaimedApprovedSearchResultListElementComponent extends SearchResultListElementComponent { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.spec.ts index ccd742f854..1143403eb4 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.spec.ts @@ -65,19 +65,19 @@ const linkService = getMockLinkService(); describe('ClaimedDeclinedSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), NoopAnimationsModule, - ], - declarations: [ClaimedDeclinedSearchResultListElementComponent, VarDirective], - providers: [ + ClaimedDeclinedSearchResultListElementComponent, VarDirective + ], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedDeclinedSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedDeclinedSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.ts index 0d24ac9968..4b2cf3a826 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-search-result/claimed-declined-search-result-list-element.component.ts @@ -15,14 +15,20 @@ import { ClaimedTask } from '../../../../../core/tasks/models/claimed-task-objec import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface'; import { Context } from '../../../../../core/shared/context.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedItemListPreviewComponent } from '../../item-list-preview/themed-item-list-preview.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../../../utils/var.directive'; /** * This component renders claimed task declined object for the search result in the list view. */ @Component({ - selector: 'ds-claimed-declined-search-result-list-element', - styleUrls: ['../../../search-result-list-element/search-result-list-element.component.scss'], - templateUrl: './claimed-declined-search-result-list-element.component.html' + selector: 'ds-claimed-declined-search-result-list-element', + styleUrls: ['../../../search-result-list-element/search-result-list-element.component.scss'], + templateUrl: './claimed-declined-search-result-list-element.component.html', + standalone: true, + imports: [VarDirective, NgIf, ThemedItemListPreviewComponent, AsyncPipe, TranslateModule] }) @listableObjectComponent(ClaimedDeclinedTaskSearchResult, ViewMode.ListElement) export class ClaimedDeclinedSearchResultListElementComponent extends SearchResultListElementComponent { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.spec.ts index 5e082ef4cf..e1264f7c58 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.spec.ts @@ -62,19 +62,19 @@ const linkService = getMockLinkService(); describe('ClaimedDeclinedTaskSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, TranslateModule.forRoot(), - ], - declarations: [ClaimedDeclinedTaskSearchResultListElementComponent, VarDirective], - providers: [ + ClaimedDeclinedTaskSearchResultListElementComponent, VarDirective + ], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedDeclinedTaskSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedDeclinedTaskSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.ts index fb374ff52d..51cc24e01f 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-declined-task-search-result/claimed-declined-task-search-result-list-element.component.ts @@ -14,14 +14,20 @@ import { ClaimedTask } from '../../../../../core/tasks/models/claimed-task-objec import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../../../config/app-config.interface'; import { Context } from '../../../../../core/shared/context.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedItemListPreviewComponent } from '../../item-list-preview/themed-item-list-preview.component'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../../../utils/var.directive'; /** * This component renders claimed task declined task object for the search result in the list view. */ @Component({ - selector: 'ds-claimed-declined-task-search-result-list-element', - styleUrls: ['../../../search-result-list-element/search-result-list-element.component.scss'], - templateUrl: './claimed-declined-task-search-result-list-element.component.html' + selector: 'ds-claimed-declined-task-search-result-list-element', + styleUrls: ['../../../search-result-list-element/search-result-list-element.component.scss'], + templateUrl: './claimed-declined-task-search-result-list-element.component.html', + standalone: true, + imports: [VarDirective, NgIf, ThemedItemListPreviewComponent, AsyncPipe, TranslateModule] }) @listableObjectComponent(ClaimedDeclinedTaskTaskSearchResult, ViewMode.ListElement) export class ClaimedDeclinedTaskSearchResultListElementComponent extends SearchResultListElementComponent implements OnInit { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts index c1778c1792..b224537920 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.spec.ts @@ -76,17 +76,16 @@ const objectCacheServiceMock = jasmine.createSpyObj('ObjectCacheService', { describe('ClaimedSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ClaimedSearchResultListElementComponent, VarDirective], - providers: [ + imports: [NoopAnimationsModule, ClaimedSearchResultListElementComponent, VarDirective], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment }, { provide: ObjectCacheService, useValue: objectCacheServiceMock } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ClaimedSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ClaimedSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts index 18148b6a8c..d458eb0849 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-search-result/claimed-search-result-list-element.component.ts @@ -21,11 +21,16 @@ import { Item } from '../../../../core/shared/item.model'; import { mergeMap, tap } from 'rxjs/operators'; import { isNotEmpty, hasValue } from '../../../empty.util'; import { Context } from '../../../../core/shared/context.model'; +import { ClaimedTaskActionsComponent } from '../../../mydspace-actions/claimed-task/claimed-task-actions.component'; +import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component'; +import { NgIf, NgClass, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-claimed-search-result-list-element', - styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss'], - templateUrl: './claimed-search-result-list-element.component.html' + selector: 'ds-claimed-search-result-list-element', + styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss'], + templateUrl: './claimed-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, ThemedItemListPreviewComponent, NgClass, ClaimedTaskActionsComponent, AsyncPipe] }) @listableObjectComponent(ClaimedTaskSearchResult, ViewMode.ListElement) export class ClaimedSearchResultListElementComponent extends SearchResultListElementComponent implements OnInit, OnDestroy { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts index aa618add35..bc26dc79d8 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.spec.ts @@ -82,23 +82,22 @@ const enviromentNoThumbs = { describe('ItemListPreviewComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - NoopAnimationsModule - ], - declarations: [ItemListPreviewComponent, TruncatePipe], - providers: [ - { provide: 'objectElementProvider', useValue: { mockItemWithAuthorAndDate }}, + NoopAnimationsModule, + ItemListPreviewComponent, TruncatePipe + ], + providers: [ + { provide: 'objectElementProvider', useValue: { mockItemWithAuthorAndDate } }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemListPreviewComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemListPreviewComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -188,23 +187,22 @@ describe('ItemListPreviewComponent', () => { describe('ItemListPreviewComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - NoopAnimationsModule - ], - declarations: [ItemListPreviewComponent, TruncatePipe], - providers: [ - {provide: 'objectElementProvider', useValue: {mockItemWithAuthorAndDate}}, - {provide: APP_CONFIG, useValue: enviromentNoThumbs} - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemListPreviewComponent, { + NoopAnimationsModule, + ItemListPreviewComponent, TruncatePipe + ], + providers: [ + { provide: 'objectElementProvider', useValue: { mockItemWithAuthorAndDate } }, + { provide: APP_CONFIG, useValue: enviromentNoThumbs } + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemListPreviewComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.ts index be94eb85aa..533841f9af 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/item-list-preview.component.ts @@ -7,15 +7,25 @@ import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interfac import { DSONameService } from '../../../../core/breadcrumbs/dso-name.service'; import { Context } from 'src/app/core/shared/context.model'; import { WorkflowItem } from 'src/app/core/submission/models/workflowitem.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { ItemCollectionComponent } from '../../../object-collection/shared/mydspace-item-collection/item-collection.component'; +import { ItemSubmitterComponent } from '../../../object-collection/shared/mydspace-item-submitter/item-submitter.component'; +import { TruncatablePartComponent } from '../../../truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../object-collection/shared/badges/themed-badges.component'; +import { ThumbnailComponent } from '../../../../thumbnail/thumbnail.component'; +import { NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; /** * This component show metadata for the given item object in the list view. */ @Component({ - selector: 'ds-item-list-preview', - styleUrls: ['item-list-preview.component.scss'], - templateUrl: 'item-list-preview.component.html', - animations: [fadeInOut] + selector: 'ds-item-list-preview', + styleUrls: ['item-list-preview.component.scss'], + templateUrl: 'item-list-preview.component.html', + animations: [fadeInOut], + standalone: true, + imports: [NgIf, ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, NgFor, ItemSubmitterComponent, ItemCollectionComponent, AsyncPipe, TranslateModule] }) export class ItemListPreviewComponent implements OnInit { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/themed-item-list-preview.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/themed-item-list-preview.component.ts index fc50b49d51..4d22bfe28c 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/themed-item-list-preview.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/item-list-preview/themed-item-list-preview.component.ts @@ -10,9 +10,10 @@ import { WorkflowItem } from 'src/app/core/submission/models/workflowitem.model' * Themed wrapper for ItemListPreviewComponent */ @Component({ - selector: 'ds-themed-item-list-preview', - styleUrls: [], - templateUrl: '../../../theme-support/themed.component.html' + selector: 'ds-themed-item-list-preview', + styleUrls: [], + templateUrl: '../../../theme-support/themed.component.html', + standalone: true }) export class ThemedItemListPreviewComponent extends ThemedComponent { protected inAndOutputNames: (keyof ItemListPreviewComponent & keyof this)[] = ['item', 'object', 'badgeContext', 'showSubmitter', 'workflowItem']; diff --git a/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts index a26fbaaf57..3dac33cc89 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.spec.ts @@ -54,15 +54,14 @@ mockResultObject.indexableObject = Object.assign(new Item(), { describe('ItemMyDSpaceResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [ItemSearchResultListElementSubmissionComponent], - providers: [ + imports: [NoopAnimationsModule, ItemSearchResultListElementSubmissionComponent], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environment } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemSearchResultListElementSubmissionComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemSearchResultListElementSubmissionComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.ts index 91c2576dee..69b476e15f 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/item-search-result/item-search-result-list-element-submission.component.ts @@ -6,14 +6,19 @@ import { listableObjectComponent } from '../../../object-collection/shared/lista import { Context } from '../../../../core/shared/context.model'; import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model'; import { SearchResultListElementComponent } from '../../search-result-list-element/search-result-list-element.component'; +import { ItemActionsComponent } from '../../../mydspace-actions/item/item-actions.component'; +import { NgClass } from '@angular/common'; +import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component'; /** * This component renders item object for the search result in the list view for submission. */ @Component({ - selector: 'ds-item-search-result-list-element-submission', - styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss', './item-search-result-list-element-submission.component.scss'], - templateUrl: './item-search-result-list-element-submission.component.html' + selector: 'ds-item-search-result-list-element-submission', + styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss', './item-search-result-list-element-submission.component.scss'], + templateUrl: './item-search-result-list-element-submission.component.html', + standalone: true, + imports: [ThemedItemListPreviewComponent, NgClass, ItemActionsComponent] }) @listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.Workspace) diff --git a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts index d63ee4ba13..d290de3f7c 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.spec.ts @@ -82,17 +82,16 @@ const objectCacheServiceMock = jasmine.createSpyObj('ObjectCacheService', { describe('PoolSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [PoolSearchResultListElementComponent, VarDirective], - providers: [ + imports: [NoopAnimationsModule, PoolSearchResultListElementComponent, VarDirective], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs }, { provide: ObjectCacheService, useValue: objectCacheServiceMock } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(PoolSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(PoolSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts index 19723a7e49..cfecd523a4 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/pool-search-result/pool-search-result-list-element.component.ts @@ -22,14 +22,19 @@ import { getFirstCompletedRemoteData } from '../../../../core/shared/operators'; import { Item } from '../../../../core/shared/item.model'; import { isNotEmpty, hasValue } from '../../../empty.util'; import { Context } from '../../../../core/shared/context.model'; +import { PoolTaskActionsComponent } from '../../../mydspace-actions/pool-task/pool-task-actions.component'; +import { ThemedItemListPreviewComponent } from '../item-list-preview/themed-item-list-preview.component'; +import { NgIf, NgClass, AsyncPipe } from '@angular/common'; /** * This component renders pool task object for the search result in the list view. */ @Component({ - selector: 'ds-pool-search-result-list-element', - styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss'], - templateUrl: './pool-search-result-list-element.component.html', + selector: 'ds-pool-search-result-list-element', + styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss'], + templateUrl: './pool-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, ThemedItemListPreviewComponent, NgClass, PoolTaskActionsComponent, AsyncPipe] }) @listableObjectComponent(PoolTaskSearchResult, ViewMode.ListElement) diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts index 52a13a69e1..5ab1a38e96 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.spec.ts @@ -71,17 +71,16 @@ describe('WorkflowItemSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { linkService = getMockLinkService(); TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [WorkflowItemSearchResultListElementComponent], - providers: [ + imports: [NoopAnimationsModule, WorkflowItemSearchResultListElementComponent], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: ItemDataService, useValue: {} }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(WorkflowItemSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(WorkflowItemSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.ts index 6218f69490..e4960d2d10 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workflow-item-search-result/workflow-item-search-result-list-element.component.ts @@ -18,14 +18,20 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../core/shared/oper import { ItemSearchResult } from '../../../object-collection/shared/item-search-result.model'; import { CollectionElementLinkType } from '../../../object-collection/collection-element-link.type'; import { Context } from '../../../../core/shared/context.model'; +import { ThemedLoadingComponent } from '../../../loading/themed-loading.component'; +import { WorkflowitemActionsComponent } from '../../../mydspace-actions/workflowitem/workflowitem-actions.component'; +import { ListableObjectComponentLoaderComponent } from '../../../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { NgIf, NgClass, AsyncPipe } from '@angular/common'; /** * This component renders workflowitem object for the search result in the list view. */ @Component({ - selector: 'ds-workflow-item-my-dspace-result-list-element', - styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss'], - templateUrl: './workflow-item-search-result-list-element.component.html', + selector: 'ds-workflow-item-my-dspace-result-list-element', + styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss'], + templateUrl: './workflow-item-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, ListableObjectComponentLoaderComponent, NgClass, WorkflowitemActionsComponent, ThemedLoadingComponent, AsyncPipe] }) @listableObjectComponent(WorkflowItemSearchResult, ViewMode.ListElement) diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts index 54344bb879..1f77ea863c 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.spec.ts @@ -70,17 +70,16 @@ describe('WorkspaceItemSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { linkService = getMockLinkService(); TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [WorkspaceItemSearchResultListElementComponent], - providers: [ + imports: [NoopAnimationsModule, WorkspaceItemSearchResultListElementComponent], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: ItemDataService, useValue: {} }, { provide: LinkService, useValue: linkService }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(WorkspaceItemSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(WorkspaceItemSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.ts index 7ff9a2ef3d..46a2847acc 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workspace-item-search-result/workspace-item-search-result-list-element.component.ts @@ -18,14 +18,20 @@ import { getFirstSucceededRemoteDataPayload } from '../../../../core/shared/oper import { CollectionElementLinkType } from '../../../object-collection/collection-element-link.type'; import { followLink } from '../../../utils/follow-link-config.model'; import { Context } from '../../../../core/shared/context.model'; +import { ThemedLoadingComponent } from '../../../loading/themed-loading.component'; +import { WorkspaceitemActionsComponent } from '../../../mydspace-actions/workspaceitem/workspaceitem-actions.component'; +import { ListableObjectComponentLoaderComponent } from '../../../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { NgIf, NgClass, AsyncPipe } from '@angular/common'; /** * This component renders workspaceitem object for the search result in the list view. */ @Component({ - selector: 'ds-workspace-item-search-result-list-element', - styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss', './workspace-item-search-result-list-element.component.scss'], - templateUrl: './workspace-item-search-result-list-element.component.html', + selector: 'ds-workspace-item-search-result-list-element', + styleUrls: ['../../search-result-list-element/search-result-list-element.component.scss', './workspace-item-search-result-list-element.component.scss'], + templateUrl: './workspace-item-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, ListableObjectComponentLoaderComponent, NgClass, WorkspaceitemActionsComponent, ThemedLoadingComponent, AsyncPipe] }) @listableObjectComponent(WorkspaceItemSearchResult, ViewMode.ListElement) diff --git a/src/app/shared/object-list/object-list.component.html b/src/app/shared/object-list/object-list.component.html index b8712b85c5..5ee41a1640 100644 --- a/src/app/shared/object-list/object-list.component.html +++ b/src/app/shared/object-list/object-list.component.html @@ -1,6 +1,6 @@ { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [], - declarations: [ObjectListComponent], - providers: [{ provide: SelectableListService, useValue: {} }], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ObjectListComponent, { + imports: [ObjectListComponent], + providers: [{ provide: SelectableListService, useValue: {} }], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ObjectListComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/object-list.component.ts b/src/app/shared/object-list/object-list.component.ts index 5161b75459..1e847d621a 100644 --- a/src/app/shared/object-list/object-list.component.ts +++ b/src/app/shared/object-list/object-list.component.ts @@ -9,14 +9,22 @@ import { SelectableListService } from './selectable-list/selectable-list.service import { ViewMode } from '../../core/shared/view-mode.model'; import { Context } from '../../core/shared/context.model'; import { CollectionElementLinkType } from '../object-collection/collection-element-link.type'; +import { BrowserOnlyPipe } from '../utils/browser-only.pipe'; +import { ListableObjectComponentLoaderComponent } from '../object-collection/shared/listable-object/listable-object-component-loader.component'; +import { ImportableListItemControlComponent } from '../object-collection/shared/importable-list-item-control/importable-list-item-control.component'; +import { SelectableListItemControlComponent } from '../object-collection/shared/selectable-list-item-control/selectable-list-item-control.component'; +import { NgIf, NgClass, NgFor } from '@angular/common'; +import { PaginationComponent } from '../pagination/pagination.component'; @Component({ - changeDetection: ChangeDetectionStrategy.Default, - encapsulation: ViewEncapsulation.Emulated, - selector: 'ds-object-list', - styleUrls: ['./object-list.component.scss'], - templateUrl: './object-list.component.html', - animations: [fadeIn] + changeDetection: ChangeDetectionStrategy.Default, + encapsulation: ViewEncapsulation.Emulated, + selector: 'ds-object-list', + styleUrls: ['./object-list.component.scss'], + templateUrl: './object-list.component.html', + animations: [fadeIn], + standalone: true, + imports: [PaginationComponent, NgIf, NgClass, NgFor, SelectableListItemControlComponent, ImportableListItemControlComponent, ListableObjectComponentLoaderComponent, BrowserOnlyPipe] }) export class ObjectListComponent { /** diff --git a/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.spec.ts b/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.spec.ts index e5ea60b35d..f234949729 100644 --- a/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.spec.ts @@ -53,14 +53,14 @@ const environmentUseThumbs = { describe('CollectionSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [CollectionSearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [CollectionSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: truncatableServiceStub }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CollectionSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CollectionSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.ts b/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.ts index 23e9e5ee57..db70b3d3dd 100644 --- a/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.ts +++ b/src/app/shared/object-list/search-result-list-element/collection-search-result/collection-search-result-list-element.component.ts @@ -4,11 +4,16 @@ import { Collection } from '../../../../core/shared/collection.model'; import { CollectionSearchResult } from '../../../object-collection/shared/collection-search-result.model'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../object-collection/shared/listable-object/listable-object.decorator'; +import { RouterLink } from '@angular/router'; +import { ThemedBadgesComponent } from '../../../object-collection/shared/badges/themed-badges.component'; +import { NgIf, NgClass } from '@angular/common'; @Component({ - selector: 'ds-collection-search-result-list-element', - styleUrls: ['../search-result-list-element.component.scss', 'collection-search-result-list-element.component.scss'], - templateUrl: 'collection-search-result-list-element.component.html' + selector: 'ds-collection-search-result-list-element', + styleUrls: ['../search-result-list-element.component.scss', 'collection-search-result-list-element.component.scss'], + templateUrl: 'collection-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, NgClass, ThemedBadgesComponent, RouterLink] }) /** * Component representing a collection search result in list view diff --git a/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.spec.ts b/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.spec.ts index ce12f5f7da..0c50c67ab1 100644 --- a/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.spec.ts @@ -53,15 +53,14 @@ const environmentUseThumbs = { describe('CommunitySearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [CommunitySearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [CommunitySearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: truncatableServiceStub }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(CommunitySearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(CommunitySearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.ts b/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.ts index f31e36ce82..ede49aea6f 100644 --- a/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.ts +++ b/src/app/shared/object-list/search-result-list-element/community-search-result/community-search-result-list-element.component.ts @@ -4,11 +4,16 @@ import { Community } from '../../../../core/shared/community.model'; import { CommunitySearchResult } from '../../../object-collection/shared/community-search-result.model'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { listableObjectComponent } from '../../../object-collection/shared/listable-object/listable-object.decorator'; +import { RouterLink } from '@angular/router'; +import { ThemedBadgesComponent } from '../../../object-collection/shared/badges/themed-badges.component'; +import { NgIf, NgClass } from '@angular/common'; @Component({ - selector: 'ds-community-search-result-list-element', - styleUrls: ['../search-result-list-element.component.scss', 'community-search-result-list-element.component.scss'], - templateUrl: 'community-search-result-list-element.component.html' + selector: 'ds-community-search-result-list-element', + styleUrls: ['../search-result-list-element.component.scss', 'community-search-result-list-element.component.scss'], + templateUrl: 'community-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, NgClass, ThemedBadgesComponent, RouterLink] }) /** * Component representing a community search result in list view diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts index 7665b7d64e..6e7f2f57f8 100644 --- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.spec.ts @@ -187,15 +187,14 @@ const enviromentNoThumbs = { describe('ItemSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ItemSearchResultListElementComponent, TruncatePipe], - providers: [ + imports: [ItemSearchResultListElementComponent, TruncatePipe], + providers: [ { provide: TruncatableService, useValue: {} }, { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: environmentUseThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemSearchResultListElementComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -370,15 +369,14 @@ describe('ItemSearchResultListElementComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ItemSearchResultListElementComponent, TruncatePipe], - providers: [ - {provide: TruncatableService, useValue: {}}, - {provide: DSONameService, useClass: DSONameServiceMock}, + imports: [ItemSearchResultListElementComponent, TruncatePipe], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: DSONameService, useClass: DSONameServiceMock }, { provide: APP_CONFIG, useValue: enviromentNoThumbs } - ], - - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(ItemSearchResultListElementComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(ItemSearchResultListElementComponent, { set: {changeDetection: ChangeDetectionStrategy.Default} }).compileComponents(); })); diff --git a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts index 99251d3c24..6cafe8d26c 100644 --- a/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts +++ b/src/app/shared/object-list/search-result-list-element/item-search-result/item-types/item/item-search-result-list-element.component.ts @@ -5,13 +5,21 @@ import { ItemSearchResult } from '../../../../../object-collection/shared/item-s import { SearchResultListElementComponent } from '../../../search-result-list-element.component'; import { Item } from '../../../../../../core/shared/item.model'; import { getItemPageRoute } from '../../../../../../item-page/item-page-routing-paths'; +import { TruncatablePartComponent } from '../../../../../truncatable/truncatable-part/truncatable-part.component'; +import { TruncatableComponent } from '../../../../../truncatable/truncatable.component'; +import { ThemedBadgesComponent } from '../../../../../object-collection/shared/badges/themed-badges.component'; +import { ThumbnailComponent } from '../../../../../../thumbnail/thumbnail.component'; +import { RouterLink } from '@angular/router'; +import { NgIf, NgClass, NgFor, AsyncPipe } from '@angular/common'; @listableObjectComponent('PublicationSearchResult', ViewMode.ListElement) @listableObjectComponent(ItemSearchResult, ViewMode.ListElement) @Component({ - selector: 'ds-item-search-result-list-element', - styleUrls: ['./item-search-result-list-element.component.scss'], - templateUrl: './item-search-result-list-element.component.html' + selector: 'ds-item-search-result-list-element', + styleUrls: ['./item-search-result-list-element.component.scss'], + templateUrl: './item-search-result-list-element.component.html', + standalone: true, + imports: [NgIf, RouterLink, ThumbnailComponent, NgClass, ThemedBadgesComponent, TruncatableComponent, TruncatablePartComponent, NgFor, AsyncPipe] }) /** * The component for displaying a list element for an item search result of the type Publication diff --git a/src/app/shared/object-list/search-result-list-element/search-result-list-element.component.ts b/src/app/shared/object-list/search-result-list-element/search-result-list-element.component.ts index e13be91e63..98acea6904 100644 --- a/src/app/shared/object-list/search-result-list-element/search-result-list-element.component.ts +++ b/src/app/shared/object-list/search-result-list-element/search-result-list-element.component.ts @@ -11,8 +11,9 @@ import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { APP_CONFIG, AppConfig } from '../../../../config/app-config.interface'; @Component({ - selector: 'ds-search-result-list-element', - template: `` + selector: 'ds-search-result-list-element', + template: ``, + standalone: true }) export class SearchResultListElementComponent, K extends DSpaceObject> extends AbstractListableElementComponent implements OnInit { /** diff --git a/src/app/shared/object-list/sidebar-search-list-element/collection/collection-sidebar-search-list-element.component.ts b/src/app/shared/object-list/sidebar-search-list-element/collection/collection-sidebar-search-list-element.component.ts index 13703240f4..c3e7cb478e 100644 --- a/src/app/shared/object-list/sidebar-search-list-element/collection/collection-sidebar-search-list-element.component.ts +++ b/src/app/shared/object-list/sidebar-search-list-element/collection/collection-sidebar-search-list-element.component.ts @@ -5,12 +5,17 @@ import { listableObjectComponent } from '../../../object-collection/shared/lista import { Context } from '../../../../core/shared/context.model'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { SidebarSearchListElementComponent } from '../sidebar-search-list-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent(CollectionSearchResult, ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent(CollectionSearchResult, ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-collection-sidebar-search-list-element', - templateUrl: '../sidebar-search-list-element.component.html' + selector: 'ds-collection-sidebar-search-list-element', + templateUrl: '../sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link CollectionSearchResult} within the context of a sidebar search modal diff --git a/src/app/shared/object-list/sidebar-search-list-element/community/community-sidebar-search-list-element.component.ts b/src/app/shared/object-list/sidebar-search-list-element/community/community-sidebar-search-list-element.component.ts index 14c8ec09cd..ffe7a1e89e 100644 --- a/src/app/shared/object-list/sidebar-search-list-element/community/community-sidebar-search-list-element.component.ts +++ b/src/app/shared/object-list/sidebar-search-list-element/community/community-sidebar-search-list-element.component.ts @@ -5,12 +5,17 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { SidebarSearchListElementComponent } from '../sidebar-search-list-element.component'; import { CommunitySearchResult } from '../../../object-collection/shared/community-search-result.model'; import { Community } from '../../../../core/shared/community.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent(CommunitySearchResult, ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent(CommunitySearchResult, ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-collection-sidebar-search-list-element', - templateUrl: '../sidebar-search-list-element.component.html' + selector: 'ds-collection-sidebar-search-list-element', + templateUrl: '../sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link CommunitySearchResult} within the context of a sidebar search modal diff --git a/src/app/shared/object-list/sidebar-search-list-element/item-types/publication/publication-sidebar-search-list-element.component.ts b/src/app/shared/object-list/sidebar-search-list-element/item-types/publication/publication-sidebar-search-list-element.component.ts index 0822accc50..a473331a51 100644 --- a/src/app/shared/object-list/sidebar-search-list-element/item-types/publication/publication-sidebar-search-list-element.component.ts +++ b/src/app/shared/object-list/sidebar-search-list-element/item-types/publication/publication-sidebar-search-list-element.component.ts @@ -5,14 +5,19 @@ import { Context } from '../../../../../core/shared/context.model'; import { ItemSearchResult } from '../../../../object-collection/shared/item-search-result.model'; import { Item } from '../../../../../core/shared/item.model'; import { SidebarSearchListElementComponent } from '../../sidebar-search-list-element.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../../../truncatable/truncatable-part/truncatable-part.component'; @listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent('PublicationSearchResult', ViewMode.ListElement, Context.SideBarSearchModalCurrent) @listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.SideBarSearchModal) @listableObjectComponent(ItemSearchResult, ViewMode.ListElement, Context.SideBarSearchModalCurrent) @Component({ - selector: 'ds-publication-sidebar-search-list-element', - templateUrl: '../../sidebar-search-list-element.component.html' + selector: 'ds-publication-sidebar-search-list-element', + templateUrl: '../../sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link ItemSearchResult} of type "Publication" within the context of diff --git a/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts b/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts index 226c1be33e..ac365bdb8b 100644 --- a/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts +++ b/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.spec.ts @@ -34,16 +34,15 @@ export function createSidebarSearchListElementTests( }) }); TestBed.configureTestingModule({ - declarations: [componentClass, VarDirective], - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - providers: [ - { provide: TruncatableService, useValue: {} }, - { provide: LinkService, useValue: linkService }, - DSONameService, - ...extraProviders - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), componentClass, VarDirective], + providers: [ + { provide: TruncatableService, useValue: {} }, + { provide: LinkService, useValue: linkService }, + DSONameService, + ...extraProviders + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts b/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts index 0ffe2d58b4..b4106db080 100644 --- a/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts +++ b/src/app/shared/object-list/sidebar-search-list-element/sidebar-search-list-element.component.ts @@ -12,10 +12,15 @@ import { followLink } from '../../utils/follow-link-config.model'; import { RemoteData } from '../../../core/data/remote-data'; import { Context } from '../../../core/shared/context.model'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgClass, NgIf, AsyncPipe } from '@angular/common'; +import { TruncatablePartComponent } from '../../truncatable/truncatable-part/truncatable-part.component'; @Component({ - selector: 'ds-sidebar-search-list-element', - templateUrl: './sidebar-search-list-element.component.html' + selector: 'ds-sidebar-search-list-element', + templateUrl: './sidebar-search-list-element.component.html', + standalone: true, + imports: [TruncatablePartComponent, NgClass, NgIf, AsyncPipe, TranslateModule] }) /** * Component displaying a list element for a {@link SearchResult} in the sidebar search modal diff --git a/src/app/shared/object-list/themed-object-list.component.ts b/src/app/shared/object-list/themed-object-list.component.ts index 14ddf474ad..1eab8dad08 100644 --- a/src/app/shared/object-list/themed-object-list.component.ts +++ b/src/app/shared/object-list/themed-object-list.component.ts @@ -13,9 +13,10 @@ import { ListableObject } from '../object-collection/shared/listable-object.mode * Themed wrapper for ObjectListComponent */ @Component({ - selector: 'ds-themed-object-list', - styleUrls: [], - templateUrl: '../theme-support/themed.component.html', + selector: 'ds-themed-object-list', + styleUrls: [], + templateUrl: '../theme-support/themed.component.html', + standalone: true }) export class ThemedObjectListComponent extends ThemedComponent { diff --git a/src/app/shared/object-select/collection-select/collection-select.component.spec.ts b/src/app/shared/object-select/collection-select/collection-select.component.spec.ts index 0b1ae83ca7..c2ac0a12fa 100644 --- a/src/app/shared/object-select/collection-select/collection-select.component.spec.ts +++ b/src/app/shared/object-select/collection-select/collection-select.component.spec.ts @@ -72,9 +72,8 @@ describe('CollectionSelectComponent', () => { const paginationService = new PaginationServiceStub(); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([])], - declarations: [], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([])], + providers: [ { provide: ObjectSelectService, useValue: new ObjectSelectServiceStub([mockCollectionList[1].id]) }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: PaginationService, useValue: paginationService }, @@ -83,9 +82,9 @@ describe('CollectionSelectComponent', () => { { provide: LinkHeadService, useValue: linkHeadService }, { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/object-select/collection-select/collection-select.component.ts b/src/app/shared/object-select/collection-select/collection-select.component.ts index 2d36f80274..39823e0c14 100644 --- a/src/app/shared/object-select/collection-select/collection-select.component.ts +++ b/src/app/shared/object-select/collection-select/collection-select.component.ts @@ -5,11 +5,21 @@ import { isNotEmpty } from '../../empty.util'; import { ObjectSelectService } from '../object-select.service'; import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../loading/themed-loading.component'; +import { ErrorComponent } from '../../error/error.component'; +import { RouterLink } from '@angular/router'; +import { FormsModule } from '@angular/forms'; +import { PaginationComponent } from '../../pagination/pagination.component'; +import { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../utils/var.directive'; @Component({ - selector: 'ds-collection-select', - templateUrl: './collection-select.component.html', - styleUrls: ['./collection-select.component.scss'], + selector: 'ds-collection-select', + templateUrl: './collection-select.component.html', + styleUrls: ['./collection-select.component.scss'], + standalone: true, + imports: [VarDirective, NgIf, PaginationComponent, NgFor, FormsModule, RouterLink, ErrorComponent, ThemedLoadingComponent, NgClass, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/object-select/item-select/item-select.component.spec.ts b/src/app/shared/object-select/item-select/item-select.component.spec.ts index 5131060cb2..05c703c61a 100644 --- a/src/app/shared/object-select/item-select/item-select.component.spec.ts +++ b/src/app/shared/object-select/item-select/item-select.component.spec.ts @@ -97,9 +97,8 @@ describe('ItemSelectComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([])], - declarations: [], - providers: [ + imports: [TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([])], + providers: [ { provide: ObjectSelectService, useValue: new ObjectSelectServiceStub([mockItemList[1].id]) }, { provide: HostWindowService, useValue: new HostWindowServiceStub(0) }, { provide: PaginationService, useValue: paginationService }, @@ -108,9 +107,9 @@ describe('ItemSelectComponent', () => { { provide: LinkHeadService, useValue: linkHeadService }, { provide: ConfigurationDataService, useValue: configurationDataService }, { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/object-select/item-select/item-select.component.ts b/src/app/shared/object-select/item-select/item-select.component.ts index dd0266ff83..32294dacdc 100644 --- a/src/app/shared/object-select/item-select/item-select.component.ts +++ b/src/app/shared/object-select/item-select/item-select.component.ts @@ -9,10 +9,20 @@ import { map } from 'rxjs/operators'; import { getItemPageRoute } from '../../../item-page/item-page-routing-paths'; import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedLoadingComponent } from '../../loading/themed-loading.component'; +import { ErrorComponent } from '../../error/error.component'; +import { RouterLink } from '@angular/router'; +import { FormsModule } from '@angular/forms'; +import { PaginationComponent } from '../../pagination/pagination.component'; +import { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common'; +import { VarDirective } from '../../utils/var.directive'; @Component({ - selector: 'ds-item-select', - templateUrl: './item-select.component.html' + selector: 'ds-item-select', + templateUrl: './item-select.component.html', + standalone: true, + imports: [VarDirective, NgIf, PaginationComponent, NgFor, FormsModule, RouterLink, ErrorComponent, ThemedLoadingComponent, NgClass, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/page-size-selector/page-size-selector.component.spec.ts b/src/app/shared/page-size-selector/page-size-selector.component.spec.ts index 6b0e9d265b..0ef8b0e088 100644 --- a/src/app/shared/page-size-selector/page-size-selector.component.spec.ts +++ b/src/app/shared/page-size-selector/page-size-selector.component.spec.ts @@ -46,20 +46,19 @@ describe('PageSizeSelectorComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - declarations: [PageSizeSelectorComponent, EnumKeysPipe, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), PageSizeSelectorComponent, EnumKeysPipe, VarDirective], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: PaginationService, useValue: paginationService }, { - provide: SEARCH_CONFIG_SERVICE, - useValue: { - paginatedSearchOptions: observableOf(paginatedSearchOptions), - } + provide: SEARCH_CONFIG_SERVICE, + useValue: { + paginatedSearchOptions: observableOf(paginatedSearchOptions), + } }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/page-size-selector/page-size-selector.component.ts b/src/app/shared/page-size-selector/page-size-selector.component.ts index 0dce32a4ba..44c731ead9 100644 --- a/src/app/shared/page-size-selector/page-size-selector.component.ts +++ b/src/app/shared/page-size-selector/page-size-selector.component.ts @@ -7,11 +7,16 @@ import { SearchConfigurationService } from '../../core/shared/search/search-conf import { PaginatedSearchOptions } from '../search/models/paginated-search-options.model'; import { map, take } from 'rxjs/operators'; import { PaginationService } from '../../core/pagination/pagination.service'; +import { FormsModule } from '@angular/forms'; +import { NgFor, AsyncPipe } from '@angular/common'; +import { SidebarDropdownComponent } from '../sidebar/sidebar-dropdown.component'; @Component({ - selector: 'ds-page-size-selector', - styleUrls: ['./page-size-selector.component.scss'], - templateUrl: './page-size-selector.component.html' + selector: 'ds-page-size-selector', + styleUrls: ['./page-size-selector.component.scss'], + templateUrl: './page-size-selector.component.html', + standalone: true, + imports: [SidebarDropdownComponent, NgFor, FormsModule, AsyncPipe] }) /** diff --git a/src/app/shared/pagination/pagination.component.spec.ts b/src/app/shared/pagination/pagination.component.spec.ts index 30ace4b2b9..753e421cc8 100644 --- a/src/app/shared/pagination/pagination.component.spec.ts +++ b/src/app/shared/pagination/pagination.component.spec.ts @@ -144,35 +144,34 @@ describe('Pagination component', () => { }); TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, StoreModule.forRoot({}, storeModuleConfig), TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), NgxPaginationModule, NgbModule, RouterTestingModule.withRoutes([ - { path: 'home', component: TestComponent } - ])], - declarations: [ + { path: 'home', component: TestComponent } + ]), PaginationComponent, TestComponent, EnumKeysPipe - ], // declare the test component - providers: [ + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Router, useValue: routerStub }, { provide: HostWindowService, useValue: hostWindowServiceStub }, { provide: PaginationService, useValue: paginationService }, ChangeDetectorRef, PaginationComponent - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -379,7 +378,13 @@ describe('Pagination component', () => { }); // declare a test component -@Component({ selector: 'ds-test-cmp', template: '' }) +@Component({ + selector: 'ds-test-cmp', template: '', + standalone: true, + imports: [CommonModule, + NgxPaginationModule, + NgbModule] +}) class TestComponent { collection: string[] = []; diff --git a/src/app/shared/pagination/pagination.component.ts b/src/app/shared/pagination/pagination.component.ts index 6da813cbc7..9e18f63f85 100644 --- a/src/app/shared/pagination/pagination.component.ts +++ b/src/app/shared/pagination/pagination.component.ts @@ -24,17 +24,24 @@ import { RemoteData } from '../../core/data/remote-data'; import { PaginatedList } from '../../core/data/paginated-list.model'; import { ListableObject } from '../object-collection/shared/listable-object.model'; import { ViewMode } from '../../core/shared/view-mode.model'; +import { EnumKeysPipe } from '../utils/enum-keys-pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { RSSComponent } from '../rss-feed/rss.component'; +import { NgbDropdownModule, NgbPaginationModule, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, NgFor, NgClass, AsyncPipe } from '@angular/common'; /** * The default pagination controls component. */ @Component({ - exportAs: 'paginationComponent', - selector: 'ds-pagination', - styleUrls: ['pagination.component.scss'], - templateUrl: 'pagination.component.html', - changeDetection: ChangeDetectionStrategy.Default, - encapsulation: ViewEncapsulation.Emulated + exportAs: 'paginationComponent', + selector: 'ds-pagination', + styleUrls: ['pagination.component.scss'], + templateUrl: 'pagination.component.html', + changeDetection: ChangeDetectionStrategy.Default, + encapsulation: ViewEncapsulation.Emulated, + standalone: true, + imports: [NgIf, NgbDropdownModule, NgFor, NgClass, RSSComponent, NgbPaginationModule, NgbTooltipModule, AsyncPipe, TranslateModule, EnumKeysPipe] }) export class PaginationComponent implements OnDestroy, OnInit { /** diff --git a/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts b/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts index b60e7f64c0..be775cf57d 100644 --- a/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts +++ b/src/app/shared/resource-policies/create/resource-policy-create.component.spec.ts @@ -89,14 +89,12 @@ describe('ResourcePolicyCreateComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [ + imports: [ + TranslateModule.forRoot(), ResourcePolicyCreateComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: LinkService, useValue: linkService }, { provide: ActivatedRoute, useValue: routeStub }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -105,11 +103,11 @@ describe('ResourcePolicyCreateComponent test suite', () => { ResourcePolicyCreateComponent, ChangeDetectorRef, Injector - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -261,8 +259,9 @@ describe('ResourcePolicyCreateComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { diff --git a/src/app/shared/resource-policies/create/resource-policy-create.component.ts b/src/app/shared/resource-policies/create/resource-policy-create.component.ts index 236351571f..9ccfb10f2c 100644 --- a/src/app/shared/resource-policies/create/resource-policy-create.component.ts +++ b/src/app/shared/resource-policies/create/resource-policy-create.component.ts @@ -3,21 +3,26 @@ import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject, Observable } from 'rxjs'; import { map, take } from 'rxjs/operators'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { ResourcePolicyDataService } from '../../../core/resource-policy/resource-policy-data.service'; import { NotificationsService } from '../../notifications/notifications.service'; import { RemoteData } from '../../../core/data/remote-data'; import { ResourcePolicy } from '../../../core/resource-policy/models/resource-policy.model'; -import { ResourcePolicyEvent } from '../form/resource-policy-form.component'; +import { ResourcePolicyEvent, ResourcePolicyFormComponent } from '../form/resource-policy-form.component'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../item-page/edit-item-page/edit-item-page.routing-paths'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; @Component({ selector: 'ds-resource-policy-create', - templateUrl: './resource-policy-create.component.html' + templateUrl: './resource-policy-create.component.html', + imports: [ + ResourcePolicyFormComponent, + TranslateModule + ], + standalone: true }) export class ResourcePolicyCreateComponent implements OnInit { diff --git a/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts b/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts index ff473d5c49..9c7694e33a 100644 --- a/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts +++ b/src/app/shared/resource-policies/edit/resource-policy-edit.component.spec.ts @@ -71,14 +71,12 @@ describe('ResourcePolicyEditComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ - TranslateModule.forRoot() - ], - declarations: [ + imports: [ + TranslateModule.forRoot(), ResourcePolicyEditComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: LinkService, useValue: linkService }, { provide: ActivatedRoute, useValue: routeStub }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, @@ -87,11 +85,11 @@ describe('ResourcePolicyEditComponent test suite', () => { ResourcePolicyEditComponent, ChangeDetectorRef, Injector - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -213,8 +211,9 @@ describe('ResourcePolicyEditComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true }) class TestComponent { diff --git a/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts b/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts index a16f409bcb..936e2b12ea 100644 --- a/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts +++ b/src/app/shared/resource-policies/edit/resource-policy-edit.component.ts @@ -3,20 +3,25 @@ import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject, Observable, of, combineLatest as observableCombineLatest, } from 'rxjs'; import { map, take } from 'rxjs/operators'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { ResourcePolicyDataService } from '../../../core/resource-policy/resource-policy-data.service'; import { NotificationsService } from '../../notifications/notifications.service'; import { RemoteData } from '../../../core/data/remote-data'; import { ResourcePolicy } from '../../../core/resource-policy/models/resource-policy.model'; -import { ResourcePolicyEvent } from '../form/resource-policy-form.component'; +import { ResourcePolicyEvent, ResourcePolicyFormComponent } from '../form/resource-policy-form.component'; import { RESOURCE_POLICY } from '../../../core/resource-policy/models/resource-policy.resource-type'; import { ITEM_EDIT_AUTHORIZATIONS_PATH } from '../../../item-page/edit-item-page/edit-item-page.routing-paths'; import { getFirstCompletedRemoteData } from '../../../core/shared/operators'; @Component({ selector: 'ds-resource-policy-edit', - templateUrl: './resource-policy-edit.component.html' + templateUrl: './resource-policy-edit.component.html', + imports: [ + ResourcePolicyFormComponent, + TranslateModule + ], + standalone: true }) export class ResourcePolicyEditComponent implements OnInit { diff --git a/src/app/shared/resource-policies/entry/resource-policy-entry.component.spec.ts b/src/app/shared/resource-policies/entry/resource-policy-entry.component.spec.ts index b5232459f5..9239b7dc17 100644 --- a/src/app/shared/resource-policies/entry/resource-policy-entry.component.spec.ts +++ b/src/app/shared/resource-policies/entry/resource-policy-entry.component.spec.ts @@ -115,23 +115,18 @@ describe('ResourcePolicyEntryComponent', () => { TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, - TranslateModule.forRoot() - ], - declarations: [ - ResourcePolicyEntryComponent, - ], - providers: [ + TranslateModule.forRoot(), + ResourcePolicyEntryComponent + ], + providers: [ { provide: ActivatedRoute, useValue: routeStub }, { provide: Router, useValue: routerStub }, { provide: GroupDataService, useValue: groupService }, { provide: DSONameService, useValue: dsoNameService } - ], - // schemas: [ - // NO_ERRORS_SCHEMA - // ] - }).compileComponents(); + ] +}).compileComponents(); }); beforeEach(() => { diff --git a/src/app/shared/resource-policies/entry/resource-policy-entry.component.ts b/src/app/shared/resource-policies/entry/resource-policy-entry.component.ts index 904a79cbe6..5f7653470d 100644 --- a/src/app/shared/resource-policies/entry/resource-policy-entry.component.ts +++ b/src/app/shared/resource-policies/entry/resource-policy-entry.component.ts @@ -20,6 +20,9 @@ import { Group } from '../../../core/eperson/models/group.model'; import { ACCESS_CONTROL_MODULE_PATH } from '../../../app-routing-paths'; import { GROUP_EDIT_PATH } from '../../../access-control/access-control-routing-paths'; import { GroupDataService } from '../../../core/eperson/group-data.service'; +import { AsyncPipe, NgIf } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; export interface ResourcePolicyCheckboxEntry { id: string; @@ -31,6 +34,13 @@ export interface ResourcePolicyCheckboxEntry { /* eslint-disable @angular-eslint/component-selector */ selector: 'tr[ds-resource-policy-entry]', templateUrl: './resource-policy-entry.component.html', + imports: [ + AsyncPipe, + TranslateModule, + FormsModule, + NgIf + ], + standalone: true }) export class ResourcePolicyEntryComponent implements OnInit { @Input() diff --git a/src/app/shared/resource-policies/form/resource-policy-form.component.spec.ts b/src/app/shared/resource-policies/form/resource-policy-form.component.spec.ts index 1cc908cc6d..65b6dd7adc 100644 --- a/src/app/shared/resource-policies/form/resource-policy-form.component.spec.ts +++ b/src/app/shared/resource-policies/form/resource-policy-form.component.spec.ts @@ -176,22 +176,20 @@ describe('ResourcePolicyFormComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ BrowserModule, CommonModule, FormsModule, NgbModule, NoopAnimationsModule, ReactiveFormsModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), FormComponent, EpersonGroupListComponent, ResourcePolicyFormComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: Router, useValue: new RouterMock() }, { provide: Store, useValue: StoreMock }, @@ -203,11 +201,11 @@ describe('ResourcePolicyFormComponent test suite', () => { FormBuilderService, ChangeDetectorRef, ResourcePolicyFormComponent - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -451,8 +449,14 @@ describe('ResourcePolicyFormComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [BrowserModule, + CommonModule, + FormsModule, + NgbModule, + ReactiveFormsModule] }) class TestComponent { diff --git a/src/app/shared/resource-policies/form/resource-policy-form.component.ts b/src/app/shared/resource-policies/form/resource-policy-form.component.ts index 223e610908..d462331e5a 100644 --- a/src/app/shared/resource-policies/form/resource-policy-form.component.ts +++ b/src/app/shared/resource-policies/form/resource-policy-form.component.ts @@ -41,7 +41,11 @@ import { EPersonDataService } from '../../../core/eperson/eperson-data.service'; import { GroupDataService } from '../../../core/eperson/group-data.service'; import { getFirstSucceededRemoteData } from '../../../core/shared/operators'; import { RequestService } from '../../../core/data/request.service'; -import { NgbModal, NgbNavChangeEvent } from '@ng-bootstrap/ng-bootstrap'; +import { NgbModal, NgbNavChangeEvent, NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; +import { FormComponent } from '../../form/form.component'; +import { EpersonGroupListComponent } from '../../eperson-group-list/eperson-group-list.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe, NgIf } from '@angular/common'; export interface ResourcePolicyEvent { object: ResourcePolicy; @@ -55,6 +59,15 @@ export interface ResourcePolicyEvent { @Component({ selector: 'ds-resource-policy-form', templateUrl: './resource-policy-form.component.html', + imports: [ + FormComponent, + NgbNavModule, + EpersonGroupListComponent, + TranslateModule, + AsyncPipe, + NgIf + ], + standalone: true }) /** * Component that show form for adding/editing a resource policy diff --git a/src/app/shared/resource-policies/resource-policies.component.spec.ts b/src/app/shared/resource-policies/resource-policies.component.spec.ts index 77eaffd413..910aba1dd4 100644 --- a/src/app/shared/resource-policies/resource-policies.component.spec.ts +++ b/src/app/shared/resource-policies/resource-policies.component.spec.ts @@ -196,18 +196,16 @@ describe('ResourcePoliciesComponent test suite', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, FormsModule, ReactiveFormsModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), ResourcePoliciesComponent, ResourcePolicyEntryComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: LinkService, useValue: linkService }, { provide: ActivatedRoute, useValue: routeStub }, { provide: EPersonDataService, useValue: epersonService }, @@ -219,10 +217,10 @@ describe('ResourcePoliciesComponent test suite', () => { { provide: DSONameService, useValue: dsoNameService }, ChangeDetectorRef, ResourcePoliciesComponent - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); describe('', () => { @@ -420,8 +418,12 @@ describe('ResourcePoliciesComponent test suite', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [CommonModule, + FormsModule, + ReactiveFormsModule] }) class TestComponent { diff --git a/src/app/shared/resource-policies/resource-policies.component.ts b/src/app/shared/resource-policies/resource-policies.component.ts index afe23b13d1..8dbb9dc946 100644 --- a/src/app/shared/resource-policies/resource-policies.component.ts +++ b/src/app/shared/resource-policies/resource-policies.component.ts @@ -3,7 +3,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject, from as observableFrom, Observable, Subscription } from 'rxjs'; import { concatMap, distinctUntilChanged, filter, map, reduce, scan, take } from 'rxjs/operators'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { getAllSucceededRemoteData } from '../../core/shared/operators'; import { ResourcePolicyDataService } from '../../core/resource-policy/resource-policy-data.service'; @@ -15,12 +15,21 @@ import { EPersonDataService } from '../../core/eperson/eperson-data.service'; import { RequestService } from '../../core/data/request.service'; import { NotificationsService } from '../notifications/notifications.service'; import { followLink } from '../utils/follow-link-config.model'; -import { ResourcePolicyCheckboxEntry } from './entry/resource-policy-entry.component'; +import { ResourcePolicyCheckboxEntry, ResourcePolicyEntryComponent } from './entry/resource-policy-entry.component'; +import { AsyncPipe, NgForOf, NgIf } from '@angular/common'; @Component({ selector: 'ds-resource-policies', styleUrls: ['./resource-policies.component.scss'], templateUrl: './resource-policies.component.html', + imports: [ + ResourcePolicyEntryComponent, + TranslateModule, + NgIf, + AsyncPipe, + NgForOf + ], + standalone: true }) /** * Component that shows the policies for given resource diff --git a/src/app/shared/resource-policies/resource-policies.module.ts b/src/app/shared/resource-policies/resource-policies.module.ts index 8a7f6dca79..c58d570820 100644 --- a/src/app/shared/resource-policies/resource-policies.module.ts +++ b/src/app/shared/resource-policies/resource-policies.module.ts @@ -28,21 +28,19 @@ const PROVIDERS = [ ]; @NgModule({ - declarations: [ - ...COMPONENTS - ], - imports: [ - NgbModule, - CommonModule, - FormModule, - TranslateModule, - SharedModule - ], - providers: [ - ...PROVIDERS - ], - exports: [ - ...COMPONENTS - ] + imports: [ + NgbModule, + CommonModule, + FormModule, + TranslateModule, + SharedModule, + ...COMPONENTS + ], + providers: [ + ...PROVIDERS + ], + exports: [ + ...COMPONENTS + ] }) export class ResourcePoliciesModule { } diff --git a/src/app/shared/results-back-button/results-back-button.component.spec.ts b/src/app/shared/results-back-button/results-back-button.component.spec.ts index 11928a03c4..4fcb0ed8e8 100644 --- a/src/app/shared/results-back-button/results-back-button.component.spec.ts +++ b/src/app/shared/results-back-button/results-back-button.component.spec.ts @@ -19,15 +19,13 @@ describe('ResultsBackButtonComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - declarations: [ResultsBackButtonComponent], - imports: [TranslateModule.forRoot(), - RouterTestingModule.withRoutes([]) - ], - providers: [ - { provide: TranslateService, useValue: translate } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), + RouterTestingModule.withRoutes([]), ResultsBackButtonComponent], + providers: [ + { provide: TranslateService, useValue: translate } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); describe('from a metadata browse list', () => { diff --git a/src/app/shared/results-back-button/results-back-button.component.ts b/src/app/shared/results-back-button/results-back-button.component.ts index cf29cf2f4a..fe6059abab 100644 --- a/src/app/shared/results-back-button/results-back-button.component.ts +++ b/src/app/shared/results-back-button/results-back-button.component.ts @@ -1,12 +1,15 @@ import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import { TranslateService } from '@ngx-translate/core'; +import { AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-results-back-button', - styleUrls: ['./results-back-button.component.scss'], - templateUrl: './results-back-button.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, + selector: 'ds-results-back-button', + styleUrls: ['./results-back-button.component.scss'], + templateUrl: './results-back-button.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, + standalone: true, + imports: [AsyncPipe] }) /** * Component for creating a back to result list button. diff --git a/src/app/shared/results-back-button/results-back-button.module.ts b/src/app/shared/results-back-button/results-back-button.module.ts index 91f387c56e..9b497fbc56 100644 --- a/src/app/shared/results-back-button/results-back-button.module.ts +++ b/src/app/shared/results-back-button/results-back-button.module.ts @@ -5,17 +5,15 @@ import { ResultsBackButtonComponent } from './results-back-button.component'; import { ThemedResultsBackButtonComponent } from './themed-results-back-button.component'; @NgModule({ - declarations: [ - ResultsBackButtonComponent, - ThemedResultsBackButtonComponent - ], - imports: [ - CommonModule, - TranslateModule - ], - exports: [ - ThemedResultsBackButtonComponent - ] + imports: [ + CommonModule, + TranslateModule, + ResultsBackButtonComponent, + ThemedResultsBackButtonComponent + ], + exports: [ + ThemedResultsBackButtonComponent + ] }) export class ResultsBackButtonModule { diff --git a/src/app/shared/results-back-button/themed-results-back-button.component.ts b/src/app/shared/results-back-button/themed-results-back-button.component.ts index fa9fac8e70..51b2f0a62b 100644 --- a/src/app/shared/results-back-button/themed-results-back-button.component.ts +++ b/src/app/shared/results-back-button/themed-results-back-button.component.ts @@ -4,9 +4,10 @@ import { ResultsBackButtonComponent } from './results-back-button.component'; import { Observable } from 'rxjs'; @Component({ - selector: 'ds-themed-results-back-button', - styleUrls: [], - templateUrl: '../theme-support/themed.component.html', + selector: 'ds-themed-results-back-button', + styleUrls: [], + templateUrl: '../theme-support/themed.component.html', + standalone: true }) export class ThemedResultsBackButtonComponent extends ThemedComponent { diff --git a/src/app/shared/roles/role.directive.ts b/src/app/shared/roles/role.directive.ts index 3ee99959d1..fd48279fb1 100644 --- a/src/app/shared/roles/role.directive.ts +++ b/src/app/shared/roles/role.directive.ts @@ -17,7 +17,8 @@ import { RoleService } from '../../core/roles/role.service'; import { RoleType } from '../../core/roles/role-types'; @Directive({ - selector: '[dsShowOnlyForRole],[dsShowExceptForRole]' + selector: '[dsShowOnlyForRole],[dsShowExceptForRole]', + standalone: true }) /** * Structural Directive for showing or hiding a template based on current user role diff --git a/src/app/shared/rss-feed/rss.component.spec.ts b/src/app/shared/rss-feed/rss.component.spec.ts index 61b54a1125..15dbc283fa 100644 --- a/src/app/shared/rss-feed/rss.component.spec.ts +++ b/src/app/shared/rss-feed/rss.component.spec.ts @@ -72,16 +72,16 @@ describe('RssComponent', () => { paginatedSearchOptions: mockSearchOptions }; TestBed.configureTestingModule({ - providers: [ - { provide: GroupDataService, useValue: groupDataService }, - { provide: LinkHeadService, useValue: linkHeadService }, - { provide: ConfigurationDataService, useValue: configurationDataService }, - { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, - { provide: PaginationService, useValue: paginationService }, - { provide: Router, useValue: new RouterMock() } - ], - declarations: [RSSComponent] - }).compileComponents(); + imports: [RSSComponent], + providers: [ + { provide: GroupDataService, useValue: groupDataService }, + { provide: LinkHeadService, useValue: linkHeadService }, + { provide: ConfigurationDataService, useValue: configurationDataService }, + { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, + { provide: PaginationService, useValue: paginationService }, + { provide: Router, useValue: new RouterMock() } + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/rss-feed/rss.component.ts b/src/app/shared/rss-feed/rss.component.ts index 7f27a32b9f..058e60e6ba 100644 --- a/src/app/shared/rss-feed/rss.component.ts +++ b/src/app/shared/rss-feed/rss.component.ts @@ -17,18 +17,22 @@ import { Router } from '@angular/router'; import { map, switchMap } from 'rxjs/operators'; import { PaginatedSearchOptions } from '../search/models/paginated-search-options.model'; import { RemoteData } from '../../core/data/remote-data'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; /** * The Rss feed button componenet. */ @Component({ - exportAs: 'rssComponent', - selector: 'ds-rss', - styleUrls: ['rss.component.scss'], - templateUrl: 'rss.component.html', - changeDetection: ChangeDetectionStrategy.Default, - encapsulation: ViewEncapsulation.Emulated + exportAs: 'rssComponent', + selector: 'ds-rss', + styleUrls: ['rss.component.scss'], + templateUrl: 'rss.component.html', + changeDetection: ChangeDetectionStrategy.Default, + encapsulation: ViewEncapsulation.Emulated, + standalone: true, + imports: [NgIf, AsyncPipe, TranslateModule] }) export class RSSComponent implements OnInit, OnDestroy { diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.spec.ts b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.spec.ts index 42d00aaa08..3d86413259 100644 --- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.spec.ts +++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.spec.ts @@ -28,28 +28,27 @@ describe('ScopeSelectorModalComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [ScopeSelectorModalComponent], - providers: [ + imports: [TranslateModule.forRoot(), ScopeSelectorModalComponent], + providers: [ { provide: NgbActiveModal, useValue: modalStub }, { - provide: ActivatedRoute, - useValue: { - root: { - snapshot: { - data: { - dso: communityRD, - }, - }, - } - }, + provide: ActivatedRoute, + useValue: { + root: { + snapshot: { + data: { + dso: communityRD, + }, + }, + } + }, }, { - provide: Router, useValue: router + provide: Router, useValue: router } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); diff --git a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts index 3301435956..2b42b54bf8 100644 --- a/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts +++ b/src/app/shared/search-form/scope-selector-modal/scope-selector-modal.component.ts @@ -6,6 +6,8 @@ import { DSOSelectorModalWrapperComponent, SelectorActionType } from '../../dso- import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { SortDirection, SortOptions } from '../../../core/cache/models/sort-options.model'; import { environment } from '../../../../environments/environment'; +import { TranslateModule } from '@ngx-translate/core'; +import { DSOSelectorComponent } from '../../dso-selector/dso-selector/dso-selector.component'; /** * Component to wrap a button - to select the entire repository - @@ -14,9 +16,11 @@ import { environment } from '../../../../environments/environment'; * Used to select a scope */ @Component({ - selector: 'ds-scope-selector-modal', - styleUrls: ['./scope-selector-modal.component.scss'], - templateUrl: './scope-selector-modal.component.html', + selector: 'ds-scope-selector-modal', + styleUrls: ['./scope-selector-modal.component.scss'], + templateUrl: './scope-selector-modal.component.html', + standalone: true, + imports: [DSOSelectorComponent, TranslateModule] }) export class ScopeSelectorModalComponent extends DSOSelectorModalWrapperComponent implements OnInit { objectType = DSpaceObjectType.COMMUNITY; diff --git a/src/app/shared/search-form/search-form.component.spec.ts b/src/app/shared/search-form/search-form.component.spec.ts index 1fe1ea8316..e231863778 100644 --- a/src/app/shared/search-form/search-form.component.spec.ts +++ b/src/app/shared/search-form/search-form.component.spec.ts @@ -35,19 +35,16 @@ describe('SearchFormComponent', () => { beforeEach(waitForAsync(() => { return TestBed.configureTestingModule({ - imports: [FormsModule, RouterTestingModule, TranslateModule.forRoot()], - providers: [ + imports: [FormsModule, RouterTestingModule, TranslateModule.forRoot(), SearchFormComponent], + providers: [ { provide: Router, useValue: router }, { provide: SearchService, useValue: searchService }, { provide: PaginationService, useValue: paginationService }, { provide: SearchConfigurationService, useValue: searchConfigService }, { provide: DSpaceObjectDataService, useValue: dspaceObjectService }, - ], - declarations: [ - SearchFormComponent, - BrowserOnlyMockPipe, - ] - }).compileComponents(); + ], + declarations: [BrowserOnlyMockPipe] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/search-form/search-form.component.ts b/src/app/shared/search-form/search-form.component.ts index 95a063bdd6..6e3f0a2f37 100644 --- a/src/app/shared/search-form/search-form.component.ts +++ b/src/app/shared/search-form/search-form.component.ts @@ -6,18 +6,24 @@ import { SearchService } from '../../core/shared/search/search.service'; import { currentPath } from '../utils/route.utils'; import { PaginationService } from '../../core/pagination/pagination.service'; import { SearchConfigurationService } from '../../core/shared/search/search-configuration.service'; -import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; +import { NgbModal, NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; import { ScopeSelectorModalComponent } from './scope-selector-modal/scope-selector-modal.component'; import { take } from 'rxjs/operators'; import { BehaviorSubject } from 'rxjs'; import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service'; import { getFirstSucceededRemoteDataPayload } from '../../core/shared/operators'; import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; +import { BrowserOnlyPipe } from '../utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; +import { FormsModule } from '@angular/forms'; @Component({ - selector: 'ds-search-form', - styleUrls: ['./search-form.component.scss'], - templateUrl: './search-form.component.html' + selector: 'ds-search-form', + styleUrls: ['./search-form.component.scss'], + templateUrl: './search-form.component.html', + standalone: true, + imports: [FormsModule, NgIf, NgbTooltipModule, AsyncPipe, TranslateModule, BrowserOnlyPipe] }) /** * Component that represents the search form diff --git a/src/app/shared/search-form/themed-search-form.component.ts b/src/app/shared/search-form/themed-search-form.component.ts index 50b3751b06..636bbc8f9b 100644 --- a/src/app/shared/search-form/themed-search-form.component.ts +++ b/src/app/shared/search-form/themed-search-form.component.ts @@ -6,9 +6,10 @@ import { SearchFormComponent } from './search-form.component'; * Themed wrapper for {@link SearchFormComponent} */ @Component({ - selector: 'ds-themed-search-form', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-search-form', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedSearchFormComponent extends ThemedComponent { diff --git a/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts b/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts index 82c15feeac..d0cf688d7c 100644 --- a/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts +++ b/src/app/shared/search/search-export-csv/search-export-csv.component.spec.ts @@ -52,15 +52,14 @@ describe('SearchExportCsvComponent', () => { router = jasmine.createSpyObj('authorizationService', ['navigateByUrl']); TestBed.configureTestingModule({ - declarations: [SearchExportCsvComponent], - imports: [TranslateModule.forRoot(), NgbModule], - providers: [ - {provide: ScriptDataService, useValue: scriptDataService}, - {provide: AuthorizationDataService, useValue: authorizationDataService}, - {provide: NotificationsService, useValue: notificationsService}, - {provide: Router, useValue: router}, - ] - }).compileComponents(); + imports: [TranslateModule.forRoot(), NgbModule, SearchExportCsvComponent], + providers: [ + { provide: ScriptDataService, useValue: scriptDataService }, + { provide: AuthorizationDataService, useValue: authorizationDataService }, + { provide: NotificationsService, useValue: notificationsService }, + { provide: Router, useValue: router }, + ] +}).compileComponents(); } function initBeforeEach() { diff --git a/src/app/shared/search/search-export-csv/search-export-csv.component.ts b/src/app/shared/search/search-export-csv/search-export-csv.component.ts index 1997a663a1..15181d479e 100644 --- a/src/app/shared/search/search-export-csv/search-export-csv.component.ts +++ b/src/app/shared/search/search-export-csv/search-export-csv.component.ts @@ -10,14 +10,18 @@ import { RemoteData } from '../../../core/data/remote-data'; import { Process } from '../../../process-page/processes/process.model'; import { getProcessDetailRoute } from '../../../process-page/process-page-routing.paths'; import { NotificationsService } from '../../notifications/notifications.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { Router } from '@angular/router'; import { PaginatedSearchOptions } from '../models/paginated-search-options.model'; +import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search-export-csv', - styleUrls: ['./search-export-csv.component.scss'], - templateUrl: './search-export-csv.component.html', + selector: 'ds-search-export-csv', + styleUrls: ['./search-export-csv.component.scss'], + templateUrl: './search-export-csv.component.html', + standalone: true, + imports: [NgIf, NgbTooltipModule, AsyncPipe, TranslateModule] }) /** * Display a button to export the current search results as csv diff --git a/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts index 6dcb47ce9f..9a99d947ec 100644 --- a/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts @@ -2,12 +2,20 @@ import { Component, OnInit } from '@angular/core'; import { FilterType } from '../../../models/filter-type.model'; import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component'; import { renderFacetFor } from '../search-filter-type-decorator'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; +import { FilterInputSuggestionsComponent } from '../../../../input-suggestions/filter-suggestions/filter-input-suggestions.component'; +import { SearchFacetOptionComponent } from '../search-facet-filter-options/search-facet-option/search-facet-option.component'; +import { SearchFacetSelectedOptionComponent } from '../search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search-authority-filter', - styleUrls: ['./search-authority-filter.component.scss'], - templateUrl: './search-authority-filter.component.html', - animations: [facetLoad] + selector: 'ds-search-authority-filter', + styleUrls: ['./search-authority-filter.component.scss'], + templateUrl: './search-authority-filter.component.html', + animations: [facetLoad], + standalone: true, + imports: [NgFor, SearchFacetSelectedOptionComponent, SearchFacetOptionComponent, NgIf, FilterInputSuggestionsComponent, FormsModule, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-boolean-filter/search-boolean-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-boolean-filter/search-boolean-filter.component.ts index c9da8500d0..5152158c18 100644 --- a/src/app/shared/search/search-filters/search-filter/search-boolean-filter/search-boolean-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-boolean-filter/search-boolean-filter.component.ts @@ -2,12 +2,18 @@ import { Component, OnInit } from '@angular/core'; import { FilterType } from '../../../models/filter-type.model'; import { renderFacetFor } from '../search-filter-type-decorator'; import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { SearchFacetOptionComponent } from '../search-facet-filter-options/search-facet-option/search-facet-option.component'; +import { SearchFacetSelectedOptionComponent } from '../search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search-boolean-filter', - styleUrls: ['./search-boolean-filter.component.scss'], - templateUrl: './search-boolean-filter.component.html', - animations: [facetLoad] + selector: 'ds-search-boolean-filter', + styleUrls: ['./search-boolean-filter.component.scss'], + templateUrl: './search-boolean-filter.component.html', + animations: [facetLoad], + standalone: true, + imports: [NgFor, SearchFacetSelectedOptionComponent, SearchFacetOptionComponent, NgIf, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.spec.ts index 53acb1d911..0dac98546a 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.spec.ts @@ -89,34 +89,33 @@ describe('SearchFacetOptionComponent', () => { const paginationService = new PaginationServiceStub(pagination); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], - declarations: [SearchFacetOptionComponent, ShortNumberPipe], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, SearchFacetOptionComponent, ShortNumberPipe], + providers: [ { provide: SearchService, useValue: new SearchServiceStub(searchLink) }, { provide: Router, useValue: new RouterStub() }, { provide: PaginationService, useValue: paginationService }, { - provide: SearchConfigurationService, useValue: { - paginationID: 'page-id', - searchOptions: observableOf({}) - } + provide: SearchConfigurationService, useValue: { + paginationID: 'page-id', + searchOptions: observableOf({}) + } }, { - provide: SearchFilterService, useValue: { - getSelectedValuesForFilter: () => selectedValues, - isFilterActiveWithValue: (paramName: string, filterValue: string) => observableOf(true), - getPage: (paramName: string) => page, - /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ - incrementPage: (filterName: string) => { - }, - resetPage: (filterName: string) => { + provide: SearchFilterService, useValue: { + getSelectedValuesForFilter: () => selectedValues, + isFilterActiveWithValue: (paramName: string, filterValue: string) => observableOf(true), + getPage: (paramName: string) => page, + /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ + incrementPage: (filterName: string) => { + }, + resetPage: (filterName: string) => { + } + /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ } - /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchFacetOptionComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchFacetOptionComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts index cdbab61a30..648014f61f 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts @@ -1,7 +1,7 @@ import { combineLatest as observableCombineLatest, Observable, Subscription } from 'rxjs'; import { map } from 'rxjs/operators'; import { Component, Input, OnDestroy, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { FacetValue } from '../../../../models/facet-value.model'; import { SearchFilterConfig } from '../../../../models/search-filter-config.model'; import { SearchService } from '../../../../../../core/shared/search/search.service'; @@ -11,11 +11,16 @@ import { hasValue } from '../../../../../empty.util'; import { currentPath } from '../../../../../utils/route.utils'; import { getFacetValueForType } from '../../../../search.utils'; import { PaginationService } from '../../../../../../core/pagination/pagination.service'; +import { ShortNumberPipe } from '../../../../../utils/short-number.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search-facet-option', - styleUrls: ['./search-facet-option.component.scss'], - templateUrl: './search-facet-option.component.html', + selector: 'ds-search-facet-option', + styleUrls: ['./search-facet-option.component.scss'], + templateUrl: './search-facet-option.component.html', + standalone: true, + imports: [NgIf, RouterLink, AsyncPipe, TranslateModule, ShortNumberPipe] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.spec.ts index b0acf43c32..a274eceda7 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.spec.ts @@ -63,33 +63,32 @@ describe('SearchFacetRangeOptionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], - declarations: [SearchFacetRangeOptionComponent, ShortNumberPipe], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, SearchFacetRangeOptionComponent, ShortNumberPipe], + providers: [ { provide: SearchService, useValue: new SearchServiceStub(searchLink) }, { provide: Router, useValue: new RouterStub() }, { provide: PaginationService, useValue: paginationService }, { - provide: SearchConfigurationService, useValue: { - searchOptions: observableOf({}), - paginationId: 'page-id' - } + provide: SearchConfigurationService, useValue: { + searchOptions: observableOf({}), + paginationId: 'page-id' + } }, { - provide: SearchFilterService, useValue: { - isFilterActiveWithValue: (paramName: string, filterValue: string) => observableOf(true), - getPage: (paramName: string) => page, - /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ - incrementPage: (filterName: string) => { - }, - resetPage: (filterName: string) => { + provide: SearchFilterService, useValue: { + isFilterActiveWithValue: (paramName: string, filterValue: string) => observableOf(true), + getPage: (paramName: string) => page, + /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ + incrementPage: (filterName: string) => { + }, + resetPage: (filterName: string) => { + } + /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ } - /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchFacetRangeOptionComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchFacetRangeOptionComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.ts index b08a54e42b..9764c106c1 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component.ts @@ -1,7 +1,7 @@ import { Observable, Subscription } from 'rxjs'; import { map } from 'rxjs/operators'; import { Component, Input, OnDestroy, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { FacetValue } from '../../../../models/facet-value.model'; import { SearchFilterConfig } from '../../../../models/search-filter-config.model'; import { SearchService } from '../../../../../../core/shared/search/search.service'; @@ -14,14 +14,18 @@ import { SearchConfigurationService } from '../../../../../../core/shared/search import { hasValue } from '../../../../../empty.util'; import { currentPath } from '../../../../../utils/route.utils'; import { PaginationService } from '../../../../../../core/pagination/pagination.service'; +import { ShortNumberPipe } from '../../../../../utils/short-number.pipe'; +import { NgIf, AsyncPipe } from '@angular/common'; const rangeDelimiter = '-'; @Component({ - selector: 'ds-search-facet-range-option', - styleUrls: ['./search-facet-range-option.component.scss'], - // templateUrl: './search-facet-range-option.component.html', - templateUrl: './search-facet-range-option.component.html', + selector: 'ds-search-facet-range-option', + styleUrls: ['./search-facet-range-option.component.scss'], + // templateUrl: './search-facet-range-option.component.html', + templateUrl: './search-facet-range-option.component.html', + standalone: true, + imports: [NgIf, RouterLink, AsyncPipe, ShortNumberPipe] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.spec.ts index 15e418842f..3467f9e64b 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.spec.ts @@ -114,33 +114,32 @@ describe('SearchFacetSelectedOptionComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], - declarations: [SearchFacetSelectedOptionComponent], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, SearchFacetSelectedOptionComponent], + providers: [ { provide: SearchService, useValue: new SearchServiceStub(searchLink) }, { provide: Router, useValue: new RouterStub() }, { provide: PaginationService, useValue: paginationService }, { - provide: SearchConfigurationService, useValue: { - searchOptions: observableOf({}) - } + provide: SearchConfigurationService, useValue: { + searchOptions: observableOf({}) + } }, { - provide: SearchFilterService, useValue: { - getSelectedValuesForFilter: () => selectedValues, - isFilterActiveWithValue: (paramName: string, filterValue: string) => observableOf(true), - getPage: (paramName: string) => page, - /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ - incrementPage: (filterName: string) => { - }, - resetPage: (filterName: string) => { + provide: SearchFilterService, useValue: { + getSelectedValuesForFilter: () => selectedValues, + isFilterActiveWithValue: (paramName: string, filterValue: string) => observableOf(true), + getPage: (paramName: string) => page, + /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ + incrementPage: (filterName: string) => { + }, + resetPage: (filterName: string) => { + } + /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ } - /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchFacetSelectedOptionComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchFacetSelectedOptionComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts index 4566b882eb..2eea21caae 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts @@ -1,6 +1,6 @@ import { combineLatest as observableCombineLatest, Observable, Subscription } from 'rxjs'; import { Component, Input, OnDestroy, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { SearchFilterConfig } from '../../../../models/search-filter-config.model'; import { SearchService } from '../../../../../../core/shared/search/search.service'; import { SearchFilterService } from '../../../../../../core/shared/search/search-filter.service'; @@ -10,11 +10,14 @@ import { FacetValue } from '../../../../models/facet-value.model'; import { currentPath } from '../../../../../utils/route.utils'; import { getFacetValueForType } from '../../../../search.utils'; import { PaginationService } from '../../../../../../core/pagination/pagination.service'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-search-facet-selected-option', - styleUrls: ['./search-facet-selected-option.component.scss'], - templateUrl: './search-facet-selected-option.component.html', + selector: 'ds-search-facet-selected-option', + styleUrls: ['./search-facet-selected-option.component.scss'], + templateUrl: './search-facet-selected-option.component.html', + standalone: true, + imports: [RouterLink, TranslateModule] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter-wrapper/search-facet-filter-wrapper.component.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter-wrapper/search-facet-filter-wrapper.component.ts index 0aa131d428..502f90deb3 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter-wrapper/search-facet-filter-wrapper.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter-wrapper/search-facet-filter-wrapper.component.ts @@ -10,10 +10,13 @@ import { import { GenericConstructor } from '../../../../../core/shared/generic-constructor'; import { SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component'; import { BehaviorSubject } from 'rxjs'; +import { NgComponentOutlet } from '@angular/common'; @Component({ - selector: 'ds-search-facet-filter-wrapper', - templateUrl: './search-facet-filter-wrapper.component.html' + selector: 'ds-search-facet-filter-wrapper', + templateUrl: './search-facet-filter-wrapper.component.html', + standalone: true, + imports: [NgComponentOutlet] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts index 92d2e5265b..f4d752be9e 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts @@ -89,9 +89,8 @@ describe('SearchFacetFilterComponent', () => { const mockValues = createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), values)); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], - declarations: [SearchFacetFilterComponent], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, SearchFacetFilterComponent], + providers: [ { provide: SearchService, useValue: new SearchServiceStub(searchLink) }, { provide: Router, useValue: new RouterStub() }, { provide: FILTER_CONFIG, useValue: new SearchFilterConfig() }, @@ -100,21 +99,21 @@ describe('SearchFacetFilterComponent', () => { { provide: IN_PLACE_SEARCH, useValue: false }, { provide: REFRESH_FILTER, useValue: new BehaviorSubject(false) }, { - provide: SearchFilterService, useValue: { - getSelectedValuesForFilter: () => observableOf(selectedValues), - isFilterActiveWithValue: (paramName: string, filterValue: string) => true, - getPage: (paramName: string) => page, - /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ - incrementPage: (filterName: string) => { - }, - resetPage: (filterName: string) => { + provide: SearchFilterService, useValue: { + getSelectedValuesForFilter: () => observableOf(selectedValues), + isFilterActiveWithValue: (paramName: string, filterValue: string) => true, + getPage: (paramName: string) => page, + /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ + incrementPage: (filterName: string) => { + }, + resetPage: (filterName: string) => { + } + /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ } - /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchFacetFilterComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchFacetFilterComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts index 2b2eb9b11a..4ff366afdf 100644 --- a/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts @@ -37,8 +37,9 @@ import { createPendingRemoteDataObject } from '../../../../remote-data.utils'; import { FacetValues } from '../../../models/facet-values.model'; @Component({ - selector: 'ds-search-facet-filter', - template: ``, + selector: 'ds-search-facet-filter', + template: ``, + standalone: true }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-filter.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-filter.component.spec.ts index 7abe45ca8c..2448b31a05 100644 --- a/src/app/shared/search/search-filters/search-filter/search-filter.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-filter.component.spec.ts @@ -62,22 +62,19 @@ describe('SearchFilterComponent', () => { sequenceService = jasmine.createSpyObj('sequenceService', { next: 17 }); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule], - declarations: [ - SearchFilterComponent, - BrowserOnlyMockPipe, - ], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, SearchFilterComponent], + declarations: [BrowserOnlyMockPipe], + providers: [ { provide: SearchService, useValue: searchServiceStub }, { - provide: SearchFilterService, - useValue: mockFilterService + provide: SearchFilterService, + useValue: mockFilterService }, { provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }, { provide: SequenceService, useValue: sequenceService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchFilterComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchFilterComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-filters/search-filter/search-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-filter.component.ts index d1d3bd729d..b0b4dff97b 100644 --- a/src/app/shared/search/search-filters/search-filter/search-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-filter.component.ts @@ -11,12 +11,18 @@ import { SearchService } from '../../../../core/shared/search/search.service'; import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service'; import { SEARCH_CONFIG_SERVICE } from '../../../../my-dspace-page/my-dspace-page.component'; import { SequenceService } from '../../../../core/shared/sequence.service'; +import { BrowserOnlyPipe } from '../../../utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { SearchFacetFilterWrapperComponent } from './search-facet-filter-wrapper/search-facet-filter-wrapper.component'; +import { NgIf, NgClass, AsyncPipe, LowerCasePipe } from '@angular/common'; @Component({ - selector: 'ds-search-filter', - styleUrls: ['./search-filter.component.scss'], - templateUrl: './search-filter.component.html', - animations: [slide], + selector: 'ds-search-filter', + styleUrls: ['./search-filter.component.scss'], + templateUrl: './search-filter.component.html', + animations: [slide], + standalone: true, + imports: [NgIf, NgClass, SearchFacetFilterWrapperComponent, AsyncPipe, LowerCasePipe, TranslateModule, BrowserOnlyPipe] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts index e6c74d8047..10987deaaf 100644 --- a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.spec.ts @@ -57,15 +57,13 @@ describe('SearchHierarchyFilterComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, NgbModule, TranslateModule.forRoot(), - ], - declarations: [ - SearchHierarchyFilterComponent, - ], - providers: [ + SearchHierarchyFilterComponent + ], + providers: [ { provide: SearchService, useValue: searchService }, { provide: SearchFilterService, useValue: searchFilterService }, { provide: RemoteDataBuildService, useValue: {} }, @@ -75,10 +73,10 @@ describe('SearchHierarchyFilterComponent', () => { { provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }, { provide: IN_PLACE_SEARCH, useValue: false }, { provide: FILTER_CONFIG, useValue: Object.assign(new SearchFilterConfig(), { name: testSearchFilter }) }, - { provide: REFRESH_FILTER, useValue: new BehaviorSubject(false)} - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + { provide: REFRESH_FILTER, useValue: new BehaviorSubject(false) } + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); }); function init() { diff --git a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts index f9b3f2bff9..c95deef4be 100644 --- a/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-hierarchy-filter/search-hierarchy-filter.component.ts @@ -26,12 +26,20 @@ import { PageInfo } from '../../../../../core/shared/page-info.model'; import { environment } from '../../../../../../environments/environment'; import { addOperatorToFilterValue } from '../../../search.utils'; import { VocabularyTreeviewModalComponent } from '../../../../form/vocabulary-treeview-modal/vocabulary-treeview-modal.component'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; +import { FilterInputSuggestionsComponent } from '../../../../input-suggestions/filter-suggestions/filter-input-suggestions.component'; +import { SearchFacetOptionComponent } from '../search-facet-filter-options/search-facet-option/search-facet-option.component'; +import { SearchFacetSelectedOptionComponent } from '../search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component'; +import { NgFor, NgIf, AsyncPipe, LowerCasePipe } from '@angular/common'; @Component({ - selector: 'ds-search-hierarchy-filter', - styleUrls: ['./search-hierarchy-filter.component.scss'], - templateUrl: './search-hierarchy-filter.component.html', - animations: [facetLoad] + selector: 'ds-search-hierarchy-filter', + styleUrls: ['./search-hierarchy-filter.component.scss'], + templateUrl: './search-hierarchy-filter.component.html', + animations: [facetLoad], + standalone: true, + imports: [NgFor, SearchFacetSelectedOptionComponent, SearchFacetOptionComponent, NgIf, FilterInputSuggestionsComponent, FormsModule, AsyncPipe, LowerCasePipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts index 3a146f5059..0e6356465f 100644 --- a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts @@ -94,9 +94,8 @@ describe('SearchRangeFilterComponent', () => { const mockValues = createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), values)); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], - declarations: [SearchRangeFilterComponent], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, SearchRangeFilterComponent], + providers: [ { provide: SearchService, useValue: new SearchServiceStub(searchLink) }, { provide: Router, useValue: new RouterStub() }, { provide: FILTER_CONFIG, useValue: mockFilterConfig }, @@ -106,21 +105,21 @@ describe('SearchRangeFilterComponent', () => { { provide: IN_PLACE_SEARCH, useValue: false }, { provide: REFRESH_FILTER, useValue: new BehaviorSubject(false) }, { - provide: SearchFilterService, useValue: { - getSelectedValuesForFilter: () => selectedValues, - isFilterActiveWithValue: (paramName: string, filterValue: string) => true, - getPage: (paramName: string) => page, - /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ - incrementPage: (filterName: string) => { - }, - resetPage: (filterName: string) => { + provide: SearchFilterService, useValue: { + getSelectedValuesForFilter: () => selectedValues, + isFilterActiveWithValue: (paramName: string, filterValue: string) => true, + getPage: (paramName: string) => page, + /* eslint-disable no-empty,@typescript-eslint/no-empty-function */ + incrementPage: (filterName: string) => { + }, + resetPage: (filterName: string) => { + } + /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ } - /* eslint-enable no-empty, @typescript-eslint/no-empty-function */ - } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchRangeFilterComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchRangeFilterComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts index ed20e63c52..b9683585dd 100644 --- a/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-range-filter/search-range-filter.component.ts @@ -1,8 +1,8 @@ import { BehaviorSubject, combineLatest as observableCombineLatest, Subscription } from 'rxjs'; import { map, startWith } from 'rxjs/operators'; -import { isPlatformBrowser } from '@angular/common'; +import { isPlatformBrowser, NgIf, NgFor, AsyncPipe } from '@angular/common'; import { Component, Inject, OnDestroy, OnInit, PLATFORM_ID } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { RemoteDataBuildService } from '../../../../../core/cache/builders/remote-data-build.service'; import { FilterType } from '../../../models/filter-type.model'; import { renderFacetFor } from '../search-filter-type-decorator'; @@ -21,6 +21,10 @@ import { SearchConfigurationService } from '../../../../../core/shared/search/se import { RouteService } from '../../../../../core/services/route.service'; import { hasValue } from '../../../../empty.util'; import { yearFromString } from 'src/app/shared/date.util'; +import { SearchFacetRangeOptionComponent } from '../search-facet-filter-options/search-facet-range-option/search-facet-range-option.component'; +import { DebounceDirective } from '../../../../utils/debounce.directive'; +import { NouisliderComponent } from 'ng2-nouislider'; +import { FormsModule } from '@angular/forms'; /** * The suffix for a range filters' minimum in the frontend URL @@ -38,10 +42,12 @@ export const RANGE_FILTER_MAX_SUFFIX = '.max'; * All fields of the item that should be displayed, are defined in its template. */ @Component({ - selector: 'ds-search-range-filter', - styleUrls: ['./search-range-filter.component.scss'], - templateUrl: './search-range-filter.component.html', - animations: [facetLoad] + selector: 'ds-search-range-filter', + styleUrls: ['./search-range-filter.component.scss'], + templateUrl: './search-range-filter.component.html', + animations: [facetLoad], + standalone: true, + imports: [FormsModule, NgIf, NouisliderComponent, DebounceDirective, NgFor, SearchFacetRangeOptionComponent, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.ts b/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.ts index cfd81c3750..eefdd52920 100644 --- a/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.ts +++ b/src/app/shared/search/search-filters/search-filter/search-text-filter/search-text-filter.component.ts @@ -3,6 +3,12 @@ import { FilterType } from '../../../models/filter-type.model'; import { facetLoad, SearchFacetFilterComponent } from '../search-facet-filter/search-facet-filter.component'; import { renderFacetFor } from '../search-filter-type-decorator'; import { addOperatorToFilterValue, } from '../../../search.utils'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; +import { FilterInputSuggestionsComponent } from '../../../../input-suggestions/filter-suggestions/filter-input-suggestions.component'; +import { SearchFacetOptionComponent } from '../search-facet-filter-options/search-facet-option/search-facet-option.component'; +import { SearchFacetSelectedOptionComponent } from '../search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component'; +import { NgFor, NgIf, AsyncPipe } from '@angular/common'; /** * This component renders a simple item page. @@ -11,10 +17,12 @@ import { addOperatorToFilterValue, } from '../../../search.utils'; */ @Component({ - selector: 'ds-search-text-filter', - styleUrls: ['./search-text-filter.component.scss'], - templateUrl: './search-text-filter.component.html', - animations: [facetLoad] + selector: 'ds-search-text-filter', + styleUrls: ['./search-text-filter.component.scss'], + templateUrl: './search-text-filter.component.html', + animations: [facetLoad], + standalone: true, + imports: [NgFor, SearchFacetSelectedOptionComponent, SearchFacetOptionComponent, NgIf, FilterInputSuggestionsComponent, FormsModule, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search-filters/search-filters.component.spec.ts b/src/app/shared/search/search-filters/search-filters.component.spec.ts index 522459b603..fa344997c1 100644 --- a/src/app/shared/search/search-filters/search-filters.component.spec.ts +++ b/src/app/shared/search/search-filters/search-filters.component.spec.ts @@ -31,16 +31,14 @@ describe('SearchFiltersComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule], - declarations: [SearchFiltersComponent], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, SearchFiltersComponent], + providers: [ { provide: SearchService, useValue: searchServiceStub }, { provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }, { provide: SearchFilterService, useValue: searchFiltersStub }, - - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchFiltersComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchFiltersComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-filters/search-filters.component.ts b/src/app/shared/search/search-filters/search-filters.component.ts index 766939226d..00edd4c31c 100644 --- a/src/app/shared/search/search-filters/search-filters.component.ts +++ b/src/app/shared/search/search-filters/search-filters.component.ts @@ -1,5 +1,5 @@ import { Component, Inject, Input, OnDestroy, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; +import { Router, RouterLink } from '@angular/router'; import { BehaviorSubject, Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @@ -12,12 +12,16 @@ import { SearchFilterService } from '../../../core/shared/search/search-filter.s import { SEARCH_CONFIG_SERVICE } from '../../../my-dspace-page/my-dspace-page.component'; import { currentPath } from '../../utils/route.utils'; import { hasValue } from '../../empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { SearchFilterComponent } from './search-filter/search-filter.component'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search-filters', - styleUrls: ['./search-filters.component.scss'], - templateUrl: './search-filters.component.html', - + selector: 'ds-search-filters', + styleUrls: ['./search-filters.component.scss'], + templateUrl: './search-filters.component.html', + standalone: true, + imports: [NgIf, NgFor, SearchFilterComponent, RouterLink, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search-filters/themed-search-filters.component.ts b/src/app/shared/search/search-filters/themed-search-filters.component.ts index a9a9c10e51..4d81092965 100644 --- a/src/app/shared/search/search-filters/themed-search-filters.component.ts +++ b/src/app/shared/search/search-filters/themed-search-filters.component.ts @@ -9,9 +9,10 @@ import { SearchFilterConfig } from '../models/search-filter-config.model'; * Themed wrapper for SearchFiltersComponent */ @Component({ - selector: 'ds-themed-search-filters', - styleUrls: [], - templateUrl: '../../theme-support/themed.component.html', + selector: 'ds-themed-search-filters', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', + standalone: true }) export class ThemedSearchFiltersComponent extends ThemedComponent { diff --git a/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts b/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts index b2be2ae53f..482912537b 100644 --- a/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts +++ b/src/app/shared/search/search-labels/search-label/search-label.component.spec.ts @@ -42,18 +42,17 @@ describe('SearchLabelComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], - declarations: [SearchLabelComponent, ObjectKeysPipe], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, SearchLabelComponent, ObjectKeysPipe], + providers: [ { provide: SearchService, useValue: new SearchServiceStub(searchLink) }, { provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }, { provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() }, { provide: PaginationService, useValue: paginationService }, { provide: Router, useValue: {} } // { provide: SearchConfigurationService, useValue: {getCurrentFrontendFilters : () => observableOf({})} } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchLabelComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchLabelComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); 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 ab4c57d9f5..8e1c1a9c18 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 @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; -import { Params, Router } from '@angular/router'; +import { Params, Router, RouterLink } from '@angular/router'; import { map } from 'rxjs/operators'; import { hasValue, isNotEmpty } from '../../../empty.util'; import { SearchService } from '../../../../core/shared/search/search.service'; @@ -8,10 +8,14 @@ import { currentPath } from '../../../utils/route.utils'; import { PaginationService } from '../../../../core/pagination/pagination.service'; import { SearchConfigurationService } from '../../../../core/shared/search/search-configuration.service'; import { stripOperatorFromFilterValue } from '../../search.utils'; +import { TranslateModule } from '@ngx-translate/core'; +import { AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search-label', - templateUrl: './search-label.component.html', + selector: 'ds-search-label', + templateUrl: './search-label.component.html', + standalone: true, + imports: [RouterLink, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search-labels/search-labels.component.spec.ts b/src/app/shared/search/search-labels/search-labels.component.spec.ts index e00c56aabc..98a4401bbd 100644 --- a/src/app/shared/search/search-labels/search-labels.component.spec.ts +++ b/src/app/shared/search/search-labels/search-labels.component.spec.ts @@ -31,14 +31,13 @@ describe('SearchLabelsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, RouterTestingModule], - declarations: [SearchLabelsComponent, ObjectKeysPipe], - providers: [ + imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule, RouterTestingModule, SearchLabelsComponent, ObjectKeysPipe], + providers: [ { provide: SearchService, useValue: new SearchServiceStub(searchLink) }, { provide: SEARCH_CONFIG_SERVICE, useValue: { getCurrentFrontendFilters: () => observableOf(mockFilters) } } - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(SearchLabelsComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(SearchLabelsComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/search/search-labels/search-labels.component.ts b/src/app/shared/search/search-labels/search-labels.component.ts index 2cc1919f50..96365b078c 100644 --- a/src/app/shared/search/search-labels/search-labels.component.ts +++ b/src/app/shared/search/search-labels/search-labels.component.ts @@ -4,11 +4,16 @@ import { Observable } from 'rxjs'; import { Params, Router } from '@angular/router'; import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service'; import { map } from 'rxjs/operators'; +import { ObjectKeysPipe } from '../../utils/object-keys-pipe'; +import { SearchLabelComponent } from './search-label/search-label.component'; +import { NgFor, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search-labels', - styleUrls: ['./search-labels.component.scss'], - templateUrl: './search-labels.component.html', + selector: 'ds-search-labels', + styleUrls: ['./search-labels.component.scss'], + templateUrl: './search-labels.component.html', + standalone: true, + imports: [NgFor, SearchLabelComponent, AsyncPipe, ObjectKeysPipe] }) /** diff --git a/src/app/shared/search/search-results/search-results.component.spec.ts b/src/app/shared/search/search-results/search-results.component.spec.ts index 4cc4f84f65..2a8e22da52 100644 --- a/src/app/shared/search/search-results/search-results.component.spec.ts +++ b/src/app/shared/search/search-results/search-results.component.spec.ts @@ -16,12 +16,10 @@ describe('SearchResultsComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NoopAnimationsModule], - declarations: [ - SearchResultsComponent, - QueryParamsDirectiveStub], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + imports: [TranslateModule.forRoot(), NoopAnimationsModule, SearchResultsComponent], + declarations: [QueryParamsDirectiveStub], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/search/search-results/search-results.component.ts b/src/app/shared/search/search-results/search-results.component.ts index 15d2cc0f00..628ed8b0d7 100644 --- a/src/app/shared/search/search-results/search-results.component.ts +++ b/src/app/shared/search/search-results/search-results.component.ts @@ -11,6 +11,13 @@ import { CollectionElementLinkType } from '../../object-collection/collection-el import { ViewMode } from '../../../core/shared/view-mode.model'; import { Context } from '../../../core/shared/context.model'; import { PaginatedSearchOptions } from '../models/paginated-search-options.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { ErrorComponent } from '../../error/error.component'; +import { ThemedLoadingComponent } from '../../loading/themed-loading.component'; +import { ObjectCollectionComponent } from '../../object-collection/object-collection.component'; +import { SearchExportCsvComponent } from '../search-export-csv/search-export-csv.component'; +import { NgIf } from '@angular/common'; export interface SelectionConfig { repeatable: boolean; @@ -18,12 +25,14 @@ export interface SelectionConfig { } @Component({ - selector: 'ds-search-results', - templateUrl: './search-results.component.html', - animations: [ - fadeIn, - fadeInOut - ] + selector: 'ds-search-results', + templateUrl: './search-results.component.html', + animations: [ + fadeIn, + fadeInOut + ], + standalone: true, + imports: [NgIf, SearchExportCsvComponent, ObjectCollectionComponent, ThemedLoadingComponent, ErrorComponent, RouterLink, TranslateModule] }) /** diff --git a/src/app/shared/search/search-results/themed-search-results.component.ts b/src/app/shared/search/search-results/themed-search-results.component.ts index 01ee5761f3..d06cde0c90 100644 --- a/src/app/shared/search/search-results/themed-search-results.component.ts +++ b/src/app/shared/search/search-results/themed-search-results.component.ts @@ -16,9 +16,10 @@ import { ListableObject } from '../../object-collection/shared/listable-object.m * Themed wrapper for SearchResultsComponent */ @Component({ - selector: 'ds-themed-search-results', - styleUrls: [], - templateUrl: '../../theme-support/themed.component.html', + selector: 'ds-themed-search-results', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', + standalone: true }) export class ThemedSearchResultsComponent extends ThemedComponent { protected inAndOutputNames: (keyof SearchResultsComponent & keyof this)[] = ['linkType', 'searchResults', 'searchConfig', 'showCsvExport', 'showThumbnails', 'sortConfig', 'viewMode', 'configuration', 'disableHeader', 'selectable', 'context', 'hidePaginationDetail', 'selectionConfig', 'contentChange', 'deselectObject', 'selectObject']; diff --git a/src/app/shared/search/search-settings/search-settings.component.spec.ts b/src/app/shared/search/search-settings/search-settings.component.spec.ts index d0b51f04b1..8b8e3596c9 100644 --- a/src/app/shared/search/search-settings/search-settings.component.spec.ts +++ b/src/app/shared/search/search-settings/search-settings.component.spec.ts @@ -68,34 +68,32 @@ describe('SearchSettingsComponent', () => { paginationService = new PaginationServiceStub(pagination, sort); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])], - declarations: [SearchSettingsComponent, EnumKeysPipe, VarDirective], - providers: [ + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), SearchSettingsComponent, EnumKeysPipe, VarDirective], + providers: [ { provide: SearchService, useValue: searchServiceStub }, - { provide: ActivatedRoute, useValue: activatedRouteStub }, { - provide: SidebarService, - useValue: SidebarServiceStub, + provide: SidebarService, + useValue: SidebarServiceStub, }, { - provide: SearchFilterService, - useValue: {}, + provide: SearchFilterService, + useValue: {}, }, { - provide: PaginationService, - useValue: paginationService, + provide: PaginationService, + useValue: paginationService, }, { - provide: SEARCH_CONFIG_SERVICE, - useValue: { - paginatedSearchOptions: observableOf(paginatedSearchOptions), - getCurrentScope: observableOf('test-id'), - } + provide: SEARCH_CONFIG_SERVICE, + useValue: { + paginatedSearchOptions: observableOf(paginatedSearchOptions), + getCurrentScope: observableOf('test-id'), + } }, - ], - schemas: [NO_ERRORS_SCHEMA], - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/search/search-settings/search-settings.component.ts b/src/app/shared/search/search-settings/search-settings.component.ts index 0efd38b5b2..f9b58d794a 100644 --- a/src/app/shared/search/search-settings/search-settings.component.ts +++ b/src/app/shared/search/search-settings/search-settings.component.ts @@ -5,11 +5,18 @@ import { ActivatedRoute, Router } from '@angular/router'; import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service'; import { SEARCH_CONFIG_SERVICE } from '../../../my-dspace-page/my-dspace-page.component'; import { PaginationService } from '../../../core/pagination/pagination.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { PageSizeSelectorComponent } from '../../page-size-selector/page-size-selector.component'; +import { FormsModule } from '@angular/forms'; +import { SidebarDropdownComponent } from '../../sidebar/sidebar-dropdown.component'; +import { NgIf, NgFor } from '@angular/common'; @Component({ - selector: 'ds-search-settings', - styleUrls: ['./search-settings.component.scss'], - templateUrl: './search-settings.component.html' + selector: 'ds-search-settings', + styleUrls: ['./search-settings.component.scss'], + templateUrl: './search-settings.component.html', + standalone: true, + imports: [NgIf, SidebarDropdownComponent, NgFor, FormsModule, PageSizeSelectorComponent, TranslateModule] }) /** diff --git a/src/app/shared/search/search-settings/themed-search-settings.component.ts b/src/app/shared/search/search-settings/themed-search-settings.component.ts index b1f1d08264..50629813f6 100644 --- a/src/app/shared/search/search-settings/themed-search-settings.component.ts +++ b/src/app/shared/search/search-settings/themed-search-settings.component.ts @@ -7,9 +7,10 @@ import { SortOptions } from '../../../core/cache/models/sort-options.model'; * Themed wrapper for SearchSettingsComponent */ @Component({ - selector: 'ds-themed-search-settings', - styleUrls: [], - templateUrl: '../../theme-support/themed.component.html', + selector: 'ds-themed-search-settings', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', + standalone: true }) export class ThemedSearchSettingsComponent extends ThemedComponent { @Input() currentSortOption: SortOptions; diff --git a/src/app/shared/search/search-sidebar/search-sidebar.component.spec.ts b/src/app/shared/search/search-sidebar/search-sidebar.component.spec.ts index a16387cf51..5b56f583d4 100644 --- a/src/app/shared/search/search-sidebar/search-sidebar.component.spec.ts +++ b/src/app/shared/search/search-sidebar/search-sidebar.component.spec.ts @@ -11,10 +11,9 @@ describe('SearchSidebarComponent', () => { // waitForAsync beforeEach beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), NgbCollapseModule], - declarations: [SearchSidebarComponent], - schemas: [NO_ERRORS_SCHEMA], - }) + imports: [TranslateModule.forRoot(), NgbCollapseModule, SearchSidebarComponent], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); // compile template and css })); diff --git a/src/app/shared/search/search-sidebar/search-sidebar.component.ts b/src/app/shared/search/search-sidebar/search-sidebar.component.ts index 929f819ca3..cabc08d286 100644 --- a/src/app/shared/search/search-sidebar/search-sidebar.component.ts +++ b/src/app/shared/search/search-sidebar/search-sidebar.component.ts @@ -7,6 +7,12 @@ import { SortOptions } from '../../../core/cache/models/sort-options.model'; import { ViewMode } from '../../../core/shared/view-mode.model'; import { RemoteData } from '../../../core/data/remote-data'; import { SearchFilterConfig } from '../models/search-filter-config.model'; +import { TranslateModule } from '@ngx-translate/core'; +import { ThemedSearchSettingsComponent } from '../search-settings/themed-search-settings.component'; +import { ThemedSearchFiltersComponent } from '../search-filters/themed-search-filters.component'; +import { SearchSwitchConfigurationComponent } from '../search-switch-configuration/search-switch-configuration.component'; +import { ViewModeSwitchComponent } from '../../view-mode-switch/view-mode-switch.component'; +import { NgIf } from '@angular/common'; /** * This component renders a simple item page. @@ -15,9 +21,11 @@ import { SearchFilterConfig } from '../models/search-filter-config.model'; */ @Component({ - selector: 'ds-search-sidebar', - styleUrls: ['./search-sidebar.component.scss'], - templateUrl: './search-sidebar.component.html', + selector: 'ds-search-sidebar', + styleUrls: ['./search-sidebar.component.scss'], + templateUrl: './search-sidebar.component.html', + standalone: true, + imports: [NgIf, ViewModeSwitchComponent, SearchSwitchConfigurationComponent, ThemedSearchFiltersComponent, ThemedSearchSettingsComponent, TranslateModule] }) /** diff --git a/src/app/shared/search/search-sidebar/themed-search-sidebar.component.ts b/src/app/shared/search/search-sidebar/themed-search-sidebar.component.ts index 935f797532..860435204b 100644 --- a/src/app/shared/search/search-sidebar/themed-search-sidebar.component.ts +++ b/src/app/shared/search/search-sidebar/themed-search-sidebar.component.ts @@ -13,9 +13,10 @@ import { SearchFilterConfig } from '../models/search-filter-config.model'; * Themed wrapper for SearchSidebarComponent */ @Component({ - selector: 'ds-themed-search-sidebar', - styleUrls: [], - templateUrl: '../../theme-support/themed.component.html', + selector: 'ds-themed-search-sidebar', + styleUrls: [], + templateUrl: '../../theme-support/themed.component.html', + standalone: true }) export class ThemedSearchSidebarComponent extends ThemedComponent { diff --git a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts index 8fc178c67a..b40fa55473 100644 --- a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts +++ b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.spec.ts @@ -40,22 +40,22 @@ describe('SearchSwitchConfigurationComponent', () => { ]; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }) - ], - declarations: [SearchSwitchConfigurationComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), + SearchSwitchConfigurationComponent + ], + providers: [ { provide: Router, useValue: new RouterStub() }, { provide: SearchService, useValue: searchServiceStub }, { provide: SEARCH_CONFIG_SERVICE, useValue: new SearchConfigurationServiceStub() }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts index 0e1b4f221b..d9744a1708 100644 --- a/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts +++ b/src/app/shared/search/search-switch-configuration/search-switch-configuration.component.ts @@ -11,11 +11,16 @@ import { SearchConfigurationOption } from './search-configuration-option.model'; import { SearchService } from '../../../core/shared/search/search.service'; import { currentPath } from '../../utils/route.utils'; import findIndex from 'lodash/findIndex'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule } from '@angular/forms'; +import { NgIf, NgFor } from '@angular/common'; @Component({ - selector: 'ds-search-switch-configuration', - styleUrls: ['./search-switch-configuration.component.scss'], - templateUrl: './search-switch-configuration.component.html', + selector: 'ds-search-switch-configuration', + styleUrls: ['./search-switch-configuration.component.scss'], + templateUrl: './search-switch-configuration.component.html', + standalone: true, + imports: [NgIf, FormsModule, NgFor, TranslateModule] }) /** * Represents a select that allow to switch over available search configurations diff --git a/src/app/shared/search/search.component.spec.ts b/src/app/shared/search/search.component.spec.ts index d0d9bdda86..51c297e168 100644 --- a/src/app/shared/search/search.component.spec.ts +++ b/src/app/shared/search/search.component.spec.ts @@ -193,42 +193,40 @@ export function configureSearchComponentTestingModule(compType, additionalDeclar searchConfigurationServiceStub.paginatedSearchOptions = new BehaviorSubject(new PaginatedSearchOptions({pagination: {id: 'default'} as any})); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule], - declarations: [compType, ...additionalDeclarations], + imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule, compType, ...additionalDeclarations], providers: [ - { provide: SearchService, useValue: searchServiceStub }, - { - provide: CommunityDataService, - useValue: jasmine.createSpyObj('communityService', ['findById', 'findAll']) - }, - { provide: ActivatedRoute, useValue: activatedRouteStub }, - { provide: RouteService, useValue: routeServiceStub }, - { - provide: Store, useValue: store - }, - { - provide: HostWindowService, useValue: jasmine.createSpyObj('hostWindowService', - { - isXs: observableOf(true), - isSm: observableOf(false), - isXsOrSm: observableOf(true) - }) - }, - { - provide: SidebarService, - useValue: SidebarServiceStub - }, - { - provide: SearchFilterService, - useValue: {} - }, - { - provide: SEARCH_CONFIG_SERVICE, - useValue: searchConfigurationServiceStub - } + { provide: SearchService, useValue: searchServiceStub }, + { + provide: CommunityDataService, + useValue: jasmine.createSpyObj('communityService', ['findById', 'findAll']) + }, + { provide: ActivatedRoute, useValue: activatedRouteStub }, + { provide: RouteService, useValue: routeServiceStub }, + { + provide: Store, useValue: store + }, + { + provide: HostWindowService, useValue: jasmine.createSpyObj('hostWindowService', { + isXs: observableOf(true), + isSm: observableOf(false), + isXsOrSm: observableOf(true) + }) + }, + { + provide: SidebarService, + useValue: SidebarServiceStub + }, + { + provide: SearchFilterService, + useValue: {} + }, + { + provide: SEARCH_CONFIG_SERVICE, + useValue: searchConfigurationServiceStub + } ], schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(compType, { +}).overrideComponent(compType, { set: { changeDetection: ChangeDetectionStrategy.Default, providers: [{ diff --git a/src/app/shared/search/search.component.ts b/src/app/shared/search/search.component.ts index 61f3a119c8..c40c557966 100644 --- a/src/app/shared/search/search.component.ts +++ b/src/app/shared/search/search.component.ts @@ -38,13 +38,23 @@ import { WorkspaceItem } from '../..//core/submission/models/workspaceitem.model import { ITEM_MODULE_PATH } from '../../item-page/item-page-routing-paths'; import { COLLECTION_MODULE_PATH } from '../../collection-page/collection-page-routing-paths'; import { COMMUNITY_MODULE_PATH } from '../../community-page/community-page-routing-paths'; +import { TranslateModule } from '@ngx-translate/core'; +import { SearchLabelsComponent } from './search-labels/search-labels.component'; +import { ThemedSearchFormComponent } from '../search-form/themed-search-form.component'; +import { ThemedSearchSidebarComponent } from './search-sidebar/themed-search-sidebar.component'; +import { ThemedSearchResultsComponent } from './search-results/themed-search-results.component'; +import { ViewModeSwitchComponent } from '../view-mode-switch/view-mode-switch.component'; +import { PageWithSidebarComponent } from '../sidebar/page-with-sidebar.component'; +import { NgIf, NgTemplateOutlet, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-search', - styleUrls: ['./search.component.scss'], - templateUrl: './search.component.html', - changeDetection: ChangeDetectionStrategy.OnPush, - animations: [pushInOut], + selector: 'ds-search', + styleUrls: ['./search.component.scss'], + templateUrl: './search.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, + animations: [pushInOut], + standalone: true, + imports: [NgIf, NgTemplateOutlet, PageWithSidebarComponent, ViewModeSwitchComponent, ThemedSearchResultsComponent, ThemedSearchSidebarComponent, ThemedSearchFormComponent, SearchLabelsComponent, AsyncPipe, TranslateModule] }) /** diff --git a/src/app/shared/search/search.module.ts b/src/app/shared/search/search.module.ts index 69500999a8..4b41f71829 100644 --- a/src/app/shared/search/search.module.ts +++ b/src/app/shared/search/search.module.ts @@ -87,21 +87,19 @@ export const MODELS = [ ]; @NgModule({ - declarations: [ - ...COMPONENTS - ], - imports: [ - CommonModule, - TranslateModule.forChild({ - missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper }, - useDefaultLang: true - }), - SharedModule.withEntryComponents(), - NouisliderModule, - ], - exports: [ - ...COMPONENTS - ] + imports: [ + CommonModule, + TranslateModule.forChild({ + missingTranslationHandler: { provide: MissingTranslationHandler, useClass: MissingTranslationHelper }, + useDefaultLang: true + }), + SharedModule.withEntryComponents(), + NouisliderModule, + ...COMPONENTS + ], + exports: [ + ...COMPONENTS + ] }) export class SearchModule { /** diff --git a/src/app/shared/search/themed-search.component.ts b/src/app/shared/search/themed-search.component.ts index fe531e4f0f..c7d1a16a46 100644 --- a/src/app/shared/search/themed-search.component.ts +++ b/src/app/shared/search/themed-search.component.ts @@ -14,9 +14,10 @@ import { ListableObject } from '../object-collection/shared/listable-object.mode * Themed wrapper for {@link SearchComponent} */ @Component({ - selector: 'ds-themed-search', - styleUrls: [], - templateUrl: '../theme-support/themed.component.html', + selector: 'ds-themed-search', + styleUrls: [], + templateUrl: '../theme-support/themed.component.html', + standalone: true }) export class ThemedSearchComponent extends ThemedComponent { protected inAndOutputNames: (keyof SearchComponent & keyof this)[] = ['configurationList', 'context', 'configuration', 'fixedFilterQuery', 'useCachedVersionIfAvailable', 'inPlaceSearch', 'linkType', 'paginationId', 'searchEnabled', 'sideBarWidth', 'searchFormPlaceholder', 'selectable', 'selectionConfig', 'showCsvExport', 'showSidebar', 'showThumbnails', 'showViewModes', 'useUniquePageId', 'viewModeList', 'showScopeSelector', 'resultFound', 'deselectObject', 'selectObject', 'trackStatistics', 'query']; diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 0f7871f7f9..3672538331 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -494,27 +494,25 @@ const DIRECTIVES = [ ]; @NgModule({ - imports: [ - ...MODULES, - ...ROOT_MODULES - ], - declarations: [ - ...PIPES, - ...COMPONENTS, - ...ENTRY_COMPONENTS, - ...DIRECTIVES, - ], - providers: [ - ...PROVIDERS - ], - exports: [ - ...MODULES, - ...PIPES, - ...COMPONENTS, - ...ENTRY_COMPONENTS, - ...DIRECTIVES, - TranslateModule, - ] + imports: [ + ...MODULES, + ...ROOT_MODULES, + ...PIPES, + ...COMPONENTS, + ...ENTRY_COMPONENTS, + ...DIRECTIVES + ], + providers: [ + ...PROVIDERS + ], + exports: [ + ...MODULES, + ...PIPES, + ...COMPONENTS, + ...ENTRY_COMPONENTS, + ...DIRECTIVES, + TranslateModule, + ] }) /** diff --git a/src/app/shared/sidebar/page-with-sidebar.component.spec.ts b/src/app/shared/sidebar/page-with-sidebar.component.spec.ts index f04632488c..c058caa9fb 100644 --- a/src/app/shared/sidebar/page-with-sidebar.component.spec.ts +++ b/src/app/shared/sidebar/page-with-sidebar.component.spec.ts @@ -15,23 +15,21 @@ describe('PageWithSidebarComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - providers: [ + imports: [NoopAnimationsModule, PageWithSidebarComponent], + providers: [ { - provide: SidebarService, - useClass: SidebarServiceStub + provide: SidebarService, + useClass: SidebarServiceStub }, { - provide: HostWindowService, useValue: jasmine.createSpyObj('hostWindowService', - { - isXs: observableOf(true), - isSm: observableOf(false), - isXsOrSm: observableOf(true) + provide: HostWindowService, useValue: jasmine.createSpyObj('hostWindowService', { + isXs: observableOf(true), + isSm: observableOf(false), + isXsOrSm: observableOf(true) }) }, - ], - declarations: [PageWithSidebarComponent] - }).compileComponents().then(() => { + ] +}).compileComponents().then(() => { fixture = TestBed.createComponent(PageWithSidebarComponent); comp = fixture.componentInstance; comp.id = 'mock-id'; diff --git a/src/app/shared/sidebar/page-with-sidebar.component.ts b/src/app/shared/sidebar/page-with-sidebar.component.ts index 63b4a6195c..ee31cbeeb3 100644 --- a/src/app/shared/sidebar/page-with-sidebar.component.ts +++ b/src/app/shared/sidebar/page-with-sidebar.component.ts @@ -4,12 +4,15 @@ import { HostWindowService } from '../host-window.service'; import { Observable } from 'rxjs'; import { pushInOut } from '../animations/push'; import { map } from 'rxjs/operators'; +import { NgTemplateOutlet, AsyncPipe } from '@angular/common'; @Component({ - selector: 'ds-page-with-sidebar', - styleUrls: ['./page-with-sidebar.component.scss'], - templateUrl: './page-with-sidebar.component.html', - animations: [pushInOut], + selector: 'ds-page-with-sidebar', + styleUrls: ['./page-with-sidebar.component.scss'], + templateUrl: './page-with-sidebar.component.html', + animations: [pushInOut], + standalone: true, + imports: [NgTemplateOutlet, AsyncPipe] }) /** * This component takes care of displaying the sidebar properly on all viewports. It does not diff --git a/src/app/shared/sidebar/sidebar-dropdown.component.ts b/src/app/shared/sidebar/sidebar-dropdown.component.ts index 471d357e25..a5f770b14f 100644 --- a/src/app/shared/sidebar/sidebar-dropdown.component.ts +++ b/src/app/shared/sidebar/sidebar-dropdown.component.ts @@ -1,9 +1,12 @@ import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { TranslateModule } from '@ngx-translate/core'; @Component({ - selector: 'ds-sidebar-dropdown', - styleUrls: ['./sidebar-dropdown.component.scss'], - templateUrl: './sidebar-dropdown.component.html', + selector: 'ds-sidebar-dropdown', + styleUrls: ['./sidebar-dropdown.component.scss'], + templateUrl: './sidebar-dropdown.component.html', + standalone: true, + imports: [TranslateModule] }) /** * This components renders a sidebar dropdown including the label. diff --git a/src/app/shared/starts-with/date/starts-with-date.component.spec.ts b/src/app/shared/starts-with/date/starts-with-date.component.spec.ts index 2407f21fdf..fa27f7e8de 100644 --- a/src/app/shared/starts-with/date/starts-with-date.component.spec.ts +++ b/src/app/shared/starts-with/date/starts-with-date.component.spec.ts @@ -32,17 +32,16 @@ describe('StartsWithDateComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [StartsWithDateComponent, EnumKeysPipe], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, StartsWithDateComponent, EnumKeysPipe], + providers: [ { provide: 'startsWithOptions', useValue: options }, { provide: 'paginationId', useValue: 'page-id' }, { provide: ActivatedRoute, useValue: activatedRouteStub }, { provide: PaginationService, useValue: paginationService }, { provide: Router, useValue: new RouterStub() } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/starts-with/date/starts-with-date.component.ts b/src/app/shared/starts-with/date/starts-with-date.component.ts index 89d9361b6a..84225c8661 100644 --- a/src/app/shared/starts-with/date/starts-with-date.component.ts +++ b/src/app/shared/starts-with/date/starts-with-date.component.ts @@ -5,15 +5,20 @@ import { renderStartsWithFor, StartsWithType } from '../starts-with-decorator'; import { StartsWithAbstractComponent } from '../starts-with-abstract.component'; import { hasValue } from '../../empty.util'; import { PaginationService } from '../../../core/pagination/pagination.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgFor } from '@angular/common'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; /** * A switchable component rendering StartsWith options for the type "Date". * The options are rendered in a dropdown with an input field (of type number) next to it. */ @Component({ - selector: 'ds-starts-with-date', - styleUrls: ['./starts-with-date.component.scss'], - templateUrl: './starts-with-date.component.html' + selector: 'ds-starts-with-date', + styleUrls: ['./starts-with-date.component.scss'], + templateUrl: './starts-with-date.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, NgFor, TranslateModule] }) @renderStartsWithFor(StartsWithType.date) export class StartsWithDateComponent extends StartsWithAbstractComponent { diff --git a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts index b717c72d76..5ad6fa8cd0 100644 --- a/src/app/shared/starts-with/text/starts-with-text.component.spec.ts +++ b/src/app/shared/starts-with/text/starts-with-text.component.spec.ts @@ -23,15 +23,14 @@ describe('StartsWithTextComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule], - declarations: [StartsWithTextComponent, EnumKeysPipe], - providers: [ + imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule, StartsWithTextComponent, EnumKeysPipe], + providers: [ { provide: 'startsWithOptions', useValue: options }, { provide: 'paginationId', useValue: 'page-id' }, { provide: PaginationService, useValue: paginationService } - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/starts-with/text/starts-with-text.component.ts b/src/app/shared/starts-with/text/starts-with-text.component.ts index 9f44fc4d40..7fa00d8589 100644 --- a/src/app/shared/starts-with/text/starts-with-text.component.ts +++ b/src/app/shared/starts-with/text/starts-with-text.component.ts @@ -2,14 +2,18 @@ import { Component } from '@angular/core'; import { renderStartsWithFor, StartsWithType } from '../starts-with-decorator'; import { StartsWithAbstractComponent } from '../starts-with-abstract.component'; import { hasValue } from '../../empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; /** * A switchable component rendering StartsWith options for the type "Text". */ @Component({ - selector: 'ds-starts-with-text', - styleUrls: ['./starts-with-text.component.scss'], - templateUrl: './starts-with-text.component.html' + selector: 'ds-starts-with-text', + styleUrls: ['./starts-with-text.component.scss'], + templateUrl: './starts-with-text.component.html', + standalone: true, + imports: [FormsModule, ReactiveFormsModule, TranslateModule] }) @renderStartsWithFor(StartsWithType.text) export class StartsWithTextComponent extends StartsWithAbstractComponent { diff --git a/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.spec.ts b/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.spec.ts index 992e0de18d..2c975e7de2 100644 --- a/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.spec.ts +++ b/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.spec.ts @@ -76,28 +76,28 @@ describe('SubscriptionModalComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, NgbModalModule, ReactiveFormsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [SubscriptionModalComponent], - providers: [ + SubscriptionModalComponent + ], + providers: [ NgbActiveModal, { provide: AuthService, useValue: authService }, { provide: NotificationsService, useValue: notificationServiceStub }, { provide: SubscriptionsDataService, useValue: subscriptionServiceStub }, - ], - schemas: [ + ], + schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); diff --git a/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.ts b/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.ts index 2413aad36e..7a16d9a2a3 100644 --- a/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.ts +++ b/src/app/shared/subscriptions/subscription-modal/subscription-modal.component.ts @@ -1,10 +1,10 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; +import { UntypedFormBuilder, UntypedFormGroup, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms'; import { BehaviorSubject, combineLatest, from, shareReplay } from 'rxjs'; import { map, mergeMap, take, tap } from 'rxjs/operators'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { NgbActiveModal, NgbModal } from '@ng-bootstrap/ng-bootstrap'; import findIndex from 'lodash/findIndex'; @@ -18,11 +18,16 @@ import { getFirstCompletedRemoteData, getFirstSucceededRemoteDataPayload } from import { AuthService } from '../../../core/auth/auth.service'; import { isNotEmpty } from '../../empty.util'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { AlertComponent } from '../../alert/alert.component'; +import { ThemedTypeBadgeComponent } from '../../object-collection/shared/badges/type-badge/themed-type-badge.component'; +import { NgIf, NgFor, AsyncPipe, KeyValuePipe } from '@angular/common'; @Component({ - selector: 'ds-subscription-modal', - templateUrl: './subscription-modal.component.html', - styleUrls: ['./subscription-modal.component.scss'] + selector: 'ds-subscription-modal', + templateUrl: './subscription-modal.component.html', + styleUrls: ['./subscription-modal.component.scss'], + standalone: true, + imports: [NgIf, FormsModule, ReactiveFormsModule, ThemedTypeBadgeComponent, NgFor, AlertComponent, AsyncPipe, KeyValuePipe, TranslateModule] }) /** * Modal that allows to manage the subscriptions for the selected item diff --git a/src/app/shared/subscriptions/subscription-view/subscription-view.component.spec.ts b/src/app/shared/subscriptions/subscription-view/subscription-view.component.spec.ts index aefdb5772b..a90a26d300 100644 --- a/src/app/shared/subscriptions/subscription-view/subscription-view.component.spec.ts +++ b/src/app/shared/subscriptions/subscription-view/subscription-view.component.spec.ts @@ -54,27 +54,27 @@ describe('SubscriptionViewComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [ + imports: [ CommonModule, NgbModule, ReactiveFormsModule, BrowserModule, RouterTestingModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [ SubscriptionViewComponent ], - providers: [ + SubscriptionViewComponent + ], + providers: [ { provide: ComponentFixtureAutoDetect, useValue: true }, { provide: NotificationsService, useValue: NotificationsServiceStub }, { provide: SubscriptionsDataService, useValue: subscriptionServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }) + ], + schemas: [NO_ERRORS_SCHEMA] +}) .compileComponents(); }); diff --git a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts index 072b8d7828..b8d27ba5bb 100644 --- a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts +++ b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts @@ -13,12 +13,18 @@ import { getCollectionModuleRoute } from '../../../collection-page/collection-pa import { getItemModuleRoute } from '../../../item-page/item-page-routing-paths'; import { SubscriptionModalComponent } from '../subscription-modal/subscription-modal.component'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { RouterLink } from '@angular/router'; +import { ThemedTypeBadgeComponent } from '../../object-collection/shared/badges/type-badge/themed-type-badge.component'; +import { NgIf, NgFor } from '@angular/common'; @Component({ - // eslint-disable-next-line @angular-eslint/component-selector - selector: '[ds-subscription-view]', - templateUrl: './subscription-view.component.html', - styleUrls: ['./subscription-view.component.scss'] + // eslint-disable-next-line @angular-eslint/component-selector + selector: '[ds-subscription-view]', + templateUrl: './subscription-view.component.html', + styleUrls: ['./subscription-view.component.scss'], + standalone: true, + imports: [NgIf, ThemedTypeBadgeComponent, RouterLink, NgFor, TranslateModule] }) /** * Table row representing a subscription that displays all information and action buttons to manage it diff --git a/src/app/shared/subscriptions/subscriptions.module.ts b/src/app/shared/subscriptions/subscriptions.module.ts index 122bf5ca8d..8dc795e886 100644 --- a/src/app/shared/subscriptions/subscriptions.module.ts +++ b/src/app/shared/subscriptions/subscriptions.module.ts @@ -15,20 +15,18 @@ const COMPONENTS = [ ]; @NgModule({ - declarations: [ - ...COMPONENTS - ], - imports: [ - CommonModule, - NgbModalModule, - ReactiveFormsModule, - TranslateModule, - RouterModule, - SharedModule - ], - exports: [ - ...COMPONENTS - ] + imports: [ + CommonModule, + NgbModalModule, + ReactiveFormsModule, + TranslateModule, + RouterModule, + SharedModule, + ...COMPONENTS + ], + exports: [ + ...COMPONENTS + ] }) export class SubscriptionsModule { } diff --git a/src/app/shared/testing/test-module.ts b/src/app/shared/testing/test-module.ts index 85fa295dc2..29846cb830 100644 --- a/src/app/shared/testing/test-module.ts +++ b/src/app/shared/testing/test-module.ts @@ -27,7 +27,8 @@ import { BrowserOnlyMockPipe } from './browser-only-mock.pipe'; ], exports: [ QueryParamsDirectiveStub, - RouterLinkDirectiveStub + RouterLinkDirectiveStub, + BrowserOnlyMockPipe ], schemas: [ CUSTOM_ELEMENTS_SCHEMA diff --git a/src/app/shared/theme-support/themed.component.spec.ts b/src/app/shared/theme-support/themed.component.spec.ts index 7776e60379..8401723e7f 100644 --- a/src/app/shared/theme-support/themed.component.spec.ts +++ b/src/app/shared/theme-support/themed.component.spec.ts @@ -9,8 +9,9 @@ import { TestComponent } from './test/test.component.spec'; import { ThemeConfig } from '../../../config/theme.model'; @Component({ - selector: 'ds-test-themed-component', - templateUrl: './themed.component.html' + selector: 'ds-test-themed-component', + templateUrl: './themed.component.html', + standalone: true }) class TestThemedComponent extends ThemedComponent { protected inAndOutputNames: (keyof TestComponent & keyof this)[] = ['testInput']; @@ -36,13 +37,12 @@ describe('ThemedComponent', () => { function setupTestingModuleForTheme(theme: string, themes?: ThemeConfig[]) { themeService = getMockThemeService(theme, themes); TestBed.configureTestingModule({ - imports: [], - declarations: [TestThemedComponent, VarDirective], - providers: [ + imports: [TestThemedComponent, VarDirective], + providers: [ { provide: ThemeService, useValue: themeService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); } function initComponent() { diff --git a/src/app/shared/trackable/abstract-trackable.component.spec.ts b/src/app/shared/trackable/abstract-trackable.component.spec.ts index c538f074c5..f067677a2f 100644 --- a/src/app/shared/trackable/abstract-trackable.component.spec.ts +++ b/src/app/shared/trackable/abstract-trackable.component.spec.ts @@ -46,15 +46,14 @@ describe('AbstractTrackableComponent', () => { scheduler = getTestScheduler(); TestBed.configureTestingModule({ - imports: [TranslateModule.forRoot()], - declarations: [AbstractTrackableComponent], - providers: [ + imports: [TranslateModule.forRoot(), AbstractTrackableComponent], + providers: [ { provide: ObjectUpdatesService, useValue: objectUpdatesService }, { provide: NotificationsService, useValue: notificationsService }, - ], schemas: [ + ], schemas: [ NO_ERRORS_SCHEMA - ] - }).compileComponents(); + ] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/shared/trackable/abstract-trackable.component.ts b/src/app/shared/trackable/abstract-trackable.component.ts index e1a99d90b9..5a0b26a49e 100644 --- a/src/app/shared/trackable/abstract-trackable.component.ts +++ b/src/app/shared/trackable/abstract-trackable.component.ts @@ -8,8 +8,9 @@ import { Component } from '@angular/core'; * Abstract Component that is able to track changes made in the inheriting component using the ObjectUpdateService */ @Component({ - selector: 'ds-abstract-trackable', - template: '' + selector: 'ds-abstract-trackable', + template: '', + standalone: true }) export class AbstractTrackableComponent { diff --git a/src/app/shared/truncatable/truncatable-part/truncatable-part.component.spec.ts b/src/app/shared/truncatable/truncatable-part/truncatable-part.component.spec.ts index 08d3e18117..a789cf5142 100644 --- a/src/app/shared/truncatable/truncatable-part/truncatable-part.component.spec.ts +++ b/src/app/shared/truncatable/truncatable-part/truncatable-part.component.spec.ts @@ -31,21 +31,19 @@ describe('TruncatablePartComponent', () => { beforeEach(waitForAsync(() => { translateService = getMockTranslateService(); void TestBed.configureTestingModule({ - imports: [NoopAnimationsModule, + imports: [NoopAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } - }), - ], - declarations: [TruncatablePartComponent], - providers: [ + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } + }), TruncatablePartComponent], + providers: [ { provide: NativeWindowService, useValue: new NativeWindowRef() }, { provide: TruncatableService, useValue: truncatableServiceStub }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(TruncatablePartComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(TruncatablePartComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); @@ -113,22 +111,22 @@ describe('TruncatablePartComponent', () => { beforeEach(waitForAsync(() => { translateService = getMockTranslateService(); void TestBed.configureTestingModule({ - imports: [ + imports: [ NoopAnimationsModule, TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), - ], - declarations: [TruncatablePartComponent], - providers: [ + TruncatablePartComponent + ], + providers: [ { provide: NativeWindowService, useValue: new NativeWindowRef() }, { provide: TruncatableService, useValue: mockTruncatableService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(TruncatablePartComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(TruncatablePartComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts b/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts index 790bd5985d..c16bb92d68 100644 --- a/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts +++ b/src/app/shared/truncatable/truncatable-part/truncatable-part.component.ts @@ -1,11 +1,16 @@ import { AfterViewChecked, Component, ElementRef, Input, OnDestroy, OnInit, ViewChild } from '@angular/core'; import { TruncatableService } from '../truncatable.service'; import { hasValue } from '../../empty.util'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; +import { DragClickDirective } from '../../utils/drag-click.directive'; @Component({ - selector: 'ds-truncatable-part', - templateUrl: './truncatable-part.component.html', - styleUrls: ['./truncatable-part.component.scss'] + selector: 'ds-truncatable-part', + templateUrl: './truncatable-part.component.html', + styleUrls: ['./truncatable-part.component.scss'], + standalone: true, + imports: [DragClickDirective, NgIf, TranslateModule] }) /** diff --git a/src/app/shared/truncatable/truncatable.component.spec.ts b/src/app/shared/truncatable/truncatable.component.spec.ts index 29100e50d2..0ce4ac0f16 100644 --- a/src/app/shared/truncatable/truncatable.component.spec.ts +++ b/src/app/shared/truncatable/truncatable.component.spec.ts @@ -12,13 +12,12 @@ describe('TruncatableComponent', () => { let truncatableService; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NoopAnimationsModule], - declarations: [TruncatableComponent], - providers: [ + imports: [NoopAnimationsModule, TruncatableComponent], + providers: [ { provide: TruncatableService, useValue: mockTruncatableService }, - ], - schemas: [NO_ERRORS_SCHEMA] - }).overrideComponent(TruncatableComponent, { + ], + schemas: [NO_ERRORS_SCHEMA] +}).overrideComponent(TruncatableComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/truncatable/truncatable.component.ts b/src/app/shared/truncatable/truncatable.component.ts index 8fca300cd4..c5d28ae328 100644 --- a/src/app/shared/truncatable/truncatable.component.ts +++ b/src/app/shared/truncatable/truncatable.component.ts @@ -2,10 +2,10 @@ import { AfterViewChecked, Component, ElementRef, Input, OnInit } from '@angular import { TruncatableService } from './truncatable.service'; @Component({ - selector: 'ds-truncatable', - templateUrl: './truncatable.component.html', - styleUrls: ['./truncatable.component.scss'], - + selector: 'ds-truncatable', + templateUrl: './truncatable.component.html', + styleUrls: ['./truncatable.component.scss'], + standalone: true }) /** diff --git a/src/app/shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component.ts b/src/app/shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component.ts index 06636f4256..d964c44617 100644 --- a/src/app/shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component.ts +++ b/src/app/shared/upload/file-dropzone-no-uploader/file-dropzone-no-uploader.component.ts @@ -1,8 +1,12 @@ import { Component, EventEmitter, HostListener, Input, OnInit, Output } from '@angular/core'; import uniqueId from 'lodash/uniqueId'; -import { FileUploader } from 'ng2-file-upload'; +import { FileUploader, FileUploadModule } from 'ng2-file-upload'; import { Observable, of as observableOf } from 'rxjs'; import { UploaderOptions } from '../uploader/uploader-options.model'; +import { CommonModule } from '@angular/common'; +import { FormsModule } from '@angular/forms'; +import { TranslateModule } from '@ngx-translate/core'; +import { FileValidator } from "../../utils/require-file.validator"; /** * Component to have a file dropzone without that dropping/choosing a file in browse automatically triggers @@ -14,7 +18,15 @@ import { UploaderOptions } from '../uploader/uploader-options.model'; @Component({ selector: 'ds-file-dropzone-no-uploader', templateUrl: './file-dropzone-no-uploader.component.html', - styleUrls: ['./file-dropzone-no-uploader.scss'] + styleUrls: ['./file-dropzone-no-uploader.scss'], + imports: [ + CommonModule, + FormsModule, + TranslateModule, + FileUploadModule, + FileValidator + ], + standalone: true }) export class FileDropzoneNoUploaderComponent implements OnInit { diff --git a/src/app/shared/upload/upload.module.ts b/src/app/shared/upload/upload.module.ts index 9f2895d7ac..12b6567e4f 100644 --- a/src/app/shared/upload/upload.module.ts +++ b/src/app/shared/upload/upload.module.ts @@ -18,21 +18,19 @@ const COMPONENTS = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - FileUploadModule, - ], - declarations: [ - ...COMPONENTS, - ], - providers: [ - ...COMPONENTS, - ], - exports: [ - ...COMPONENTS, - FileUploadModule, - ] + imports: [ + CommonModule, + SharedModule, + FileUploadModule, + ...COMPONENTS + ], + providers: [ + ...COMPONENTS, + ], + exports: [ + ...COMPONENTS, + FileUploadModule, + ] }) export class UploadModule { } diff --git a/src/app/shared/upload/uploader/uploader.component.spec.ts b/src/app/shared/upload/uploader/uploader.component.spec.ts index 8ea23c8acb..e9dd4d37ef 100644 --- a/src/app/shared/upload/uploader/uploader.component.spec.ts +++ b/src/app/shared/upload/uploader/uploader.component.spec.ts @@ -25,24 +25,22 @@ describe('Chips component', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FileUploadModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), UploaderComponent, - TestComponent, - ], // declare the test component - providers: [ + TestComponent + ], + providers: [ ChangeDetectorRef, ScrollToService, UploaderComponent, DragService, { provide: HttpXsrfTokenExtractor, useValue: new HttpXsrfTokenExtractorMock('mock-token') }, { provide: CookieService, useValue: new CookieServiceMock() }, - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}); })); @@ -66,8 +64,10 @@ describe('Chips component', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FileUploadModule] }) class TestComponent { public uploadFilesOptions: UploaderOptions = Object.assign(new UploaderOptions(), { diff --git a/src/app/shared/upload/uploader/uploader.component.ts b/src/app/shared/upload/uploader/uploader.component.ts index ef4ce4ee45..c6683950ff 100644 --- a/src/app/shared/upload/uploader/uploader.component.ts +++ b/src/app/shared/upload/uploader/uploader.component.ts @@ -1,7 +1,16 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, HostListener, Input, Output, ViewEncapsulation, } from '@angular/core'; +import { + ChangeDetectionStrategy, + ChangeDetectorRef, + Component, + EventEmitter, + HostListener, + Input, + Output, + ViewEncapsulation, +} from '@angular/core'; import { of as observableOf } from 'rxjs'; -import { FileUploader } from 'ng2-file-upload'; +import { FileUploader, FileUploadModule } from 'ng2-file-upload'; import uniqueId from 'lodash/uniqueId'; import { ScrollToService } from '@nicky-lenaers/ngx-scroll-to'; @@ -12,15 +21,18 @@ import { HttpXsrfTokenExtractor } from '@angular/common/http'; import { XSRF_COOKIE, XSRF_REQUEST_HEADER, XSRF_RESPONSE_HEADER } from '../../../core/xsrf/xsrf.constants'; import { CookieService } from '../../../core/services/cookie.service'; import { DragService } from '../../../core/drag.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { CommonModule } from '@angular/common'; @Component({ selector: 'ds-uploader', templateUrl: 'uploader.component.html', styleUrls: ['uploader.component.scss'], changeDetection: ChangeDetectionStrategy.Default, - encapsulation: ViewEncapsulation.Emulated + encapsulation: ViewEncapsulation.Emulated, + standalone: true, + imports: [TranslateModule, FileUploadModule, CommonModule] }) - export class UploaderComponent { /** diff --git a/src/app/shared/utils/auto-focus.directive.ts b/src/app/shared/utils/auto-focus.directive.ts index a2d860a8e1..a04c85b005 100644 --- a/src/app/shared/utils/auto-focus.directive.ts +++ b/src/app/shared/utils/auto-focus.directive.ts @@ -5,7 +5,8 @@ import { isNotEmpty } from '../empty.util'; * Directive to set focus on an element when it is rendered */ @Directive({ - selector: '[dsAutoFocus]' + selector: '[dsAutoFocus]', + standalone: true }) export class AutoFocusDirective implements AfterViewInit { diff --git a/src/app/shared/utils/browser-only.pipe.ts b/src/app/shared/utils/browser-only.pipe.ts index e3ee3df69d..f7d11e327e 100644 --- a/src/app/shared/utils/browser-only.pipe.ts +++ b/src/app/shared/utils/browser-only.pipe.ts @@ -17,7 +17,8 @@ import { isPlatformBrowser } from '@angular/common'; * until such components are fully interactive before trying to interact with them. */ @Pipe({ - name: 'dsBrowserOnly' + name: 'dsBrowserOnly', + standalone: true }) export class BrowserOnlyPipe implements PipeTransform { constructor( diff --git a/src/app/shared/utils/capitalize.pipe.ts b/src/app/shared/utils/capitalize.pipe.ts index 2842d1dc7e..3a37802200 100644 --- a/src/app/shared/utils/capitalize.pipe.ts +++ b/src/app/shared/utils/capitalize.pipe.ts @@ -1,7 +1,8 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ - name: 'dsCapitalize' + name: 'dsCapitalize', + standalone: true }) /** diff --git a/src/app/shared/utils/click-outside.directive.ts b/src/app/shared/utils/click-outside.directive.ts index b9397c65e5..e0b1105543 100644 --- a/src/app/shared/utils/click-outside.directive.ts +++ b/src/app/shared/utils/click-outside.directive.ts @@ -1,7 +1,8 @@ import { Directive, ElementRef, Output, EventEmitter, HostListener } from '@angular/core'; @Directive({ - selector: '[dsClickOutside]' + selector: '[dsClickOutside]', + standalone: true }) /** * Directive to detect when the users clicks outside of the element the directive was put on diff --git a/src/app/shared/utils/console.pipe.ts b/src/app/shared/utils/console.pipe.ts index fc672a84ae..8963bf57a0 100644 --- a/src/app/shared/utils/console.pipe.ts +++ b/src/app/shared/utils/console.pipe.ts @@ -1,7 +1,8 @@ import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ - name: 'dsConsole' + name: 'dsConsole', + standalone: true }) export class ConsolePipe implements PipeTransform { transform(value: any): string { diff --git a/src/app/shared/utils/debounce.directive.ts b/src/app/shared/utils/debounce.directive.ts index 8830679e2b..5cce67a903 100644 --- a/src/app/shared/utils/debounce.directive.ts +++ b/src/app/shared/utils/debounce.directive.ts @@ -5,7 +5,8 @@ import { NgControl } from '@angular/forms'; import { Subject } from 'rxjs'; @Directive({ - selector: '[ngModel][dsDebounce]', + selector: '[ngModel][dsDebounce]', + standalone: true }) /** * Directive for setting a debounce time on an input field diff --git a/src/app/shared/utils/drag-click.directive.ts b/src/app/shared/utils/drag-click.directive.ts index b7377b4c55..41029c838c 100644 --- a/src/app/shared/utils/drag-click.directive.ts +++ b/src/app/shared/utils/drag-click.directive.ts @@ -1,7 +1,8 @@ import { Directive, EventEmitter, HostListener, Output } from '@angular/core'; @Directive({ - selector: '[dsDragClick]' + selector: '[dsDragClick]', + standalone: true }) /** diff --git a/src/app/shared/utils/emphasize.pipe.ts b/src/app/shared/utils/emphasize.pipe.ts index 613074a308..46893f17b4 100644 --- a/src/app/shared/utils/emphasize.pipe.ts +++ b/src/app/shared/utils/emphasize.pipe.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'dsEmphasize' }) +@Pipe({ + name: 'dsEmphasize', + standalone: true +}) /** * Pipe for emphasizing a part of a string by surrounding it with tags */ diff --git a/src/app/shared/utils/enum-keys-pipe.ts b/src/app/shared/utils/enum-keys-pipe.ts index 0a4a445c02..99ef278bba 100644 --- a/src/app/shared/utils/enum-keys-pipe.ts +++ b/src/app/shared/utils/enum-keys-pipe.ts @@ -1,6 +1,9 @@ import { Pipe, PipeTransform } from '@angular/core'; -@Pipe({ name: 'dsKeys' }) +@Pipe({ + name: 'dsKeys', + standalone: true +}) /** * Pipe for parsing all values of an enumeration to an array of key-value pairs */ diff --git a/src/app/shared/utils/file-size-pipe.ts b/src/app/shared/utils/file-size-pipe.ts index 934f3ee67a..8efa4bba79 100644 --- a/src/app/shared/utils/file-size-pipe.ts +++ b/src/app/shared/utils/file-size-pipe.ts @@ -12,7 +12,10 @@ import * as fileSize from 'filesize'; * formats to: 1 KB */ -@Pipe({ name: 'dsFileSize' }) +@Pipe({ + name: 'dsFileSize', + standalone: true +}) export class FileSizePipe implements PipeTransform { transform(bytes: number = 0, precision: number = 2): string { return fileSize(bytes, { standard: 'jedec', round: precision }); diff --git a/src/app/shared/utils/file-value-accessor.directive.ts b/src/app/shared/utils/file-value-accessor.directive.ts index 82ce2e6ab0..ca292a0055 100644 --- a/src/app/shared/utils/file-value-accessor.directive.ts +++ b/src/app/shared/utils/file-value-accessor.directive.ts @@ -5,13 +5,14 @@ import {NG_VALUE_ACCESSOR, ControlValueAccessor} from '@angular/forms'; // eslint-disable-next-line @angular-eslint/directive-selector selector: 'input[type=file]', // eslint-disable-next-line @angular-eslint/no-host-metadata-property - host : { - '(change)' : 'onChange($event.target.files)', + host: { + '(change)': 'onChange($event.target.files)', '(blur)': 'onTouched()' }, providers: [ { provide: NG_VALUE_ACCESSOR, useExisting: FileValueAccessorDirective, multi: true } - ] + ], + standalone: true }) /** * Value accessor directive for inputs of type 'file' diff --git a/src/app/shared/utils/in-list-validator.directive.ts b/src/app/shared/utils/in-list-validator.directive.ts index fef0c2f962..5b857889fb 100644 --- a/src/app/shared/utils/in-list-validator.directive.ts +++ b/src/app/shared/utils/in-list-validator.directive.ts @@ -6,11 +6,12 @@ import { inListValidator } from './validator.functions'; * Directive for validating if a ngModel value is in a given list */ @Directive({ - selector: '[ngModel][dsInListValidator]', - // We add our directive to the list of existing validators - providers: [ - { provide: NG_VALIDATORS, useExisting: InListValidator, multi: true } - ] + selector: '[ngModel][dsInListValidator]', + // We add our directive to the list of existing validators + providers: [ + { provide: NG_VALIDATORS, useExisting: InListValidator, multi: true } + ], + standalone: true }) export class InListValidator implements Validator { /** diff --git a/src/app/shared/utils/markdown.pipe.ts b/src/app/shared/utils/markdown.pipe.ts index 90b6d25731..bc15cded9e 100644 --- a/src/app/shared/utils/markdown.pipe.ts +++ b/src/app/shared/utils/markdown.pipe.ts @@ -37,7 +37,8 @@ const SANITIZE_HTML = new InjectionToken( * */ @Pipe({ - name: 'dsMarkdown' + name: 'dsMarkdown', + standalone: true }) export class MarkdownPipe implements PipeTransform { diff --git a/src/app/shared/utils/metadatafield-validator.directive.ts b/src/app/shared/utils/metadatafield-validator.directive.ts index 8725246eeb..84e3b7087d 100644 --- a/src/app/shared/utils/metadatafield-validator.directive.ts +++ b/src/app/shared/utils/metadatafield-validator.directive.ts @@ -12,11 +12,12 @@ import { getFirstSucceededRemoteData } from '../../core/shared/operators'; * Directive for validating if a ngModel value is a valid metadata field */ @Directive({ - selector: '[ngModel][dsMetadataFieldValidator]', - // We add our directive to the list of existing validators - providers: [ - { provide: NG_VALIDATORS, useExisting: MetadataFieldValidator, multi: true } - ] + selector: '[ngModel][dsMetadataFieldValidator]', + // We add our directive to the list of existing validators + providers: [ + { provide: NG_VALIDATORS, useExisting: MetadataFieldValidator, multi: true } + ], + standalone: true }) @Injectable({ providedIn: 'root' }) export class MetadataFieldValidator implements AsyncValidator { diff --git a/src/app/shared/utils/object-keys-pipe.ts b/src/app/shared/utils/object-keys-pipe.ts index 0d6a2c8222..ee9f475424 100644 --- a/src/app/shared/utils/object-keys-pipe.ts +++ b/src/app/shared/utils/object-keys-pipe.ts @@ -1,6 +1,9 @@ import { PipeTransform, Pipe } from '@angular/core'; -@Pipe({name: 'dsObjectKeys'}) +@Pipe({ + name: 'dsObjectKeys', + standalone: true +}) /** * Pipe for parsing all keys of an object to an array of key-value pairs */ diff --git a/src/app/shared/utils/object-ngfor.pipe.ts b/src/app/shared/utils/object-ngfor.pipe.ts index 982e3342e0..d3269fb608 100644 --- a/src/app/shared/utils/object-ngfor.pipe.ts +++ b/src/app/shared/utils/object-ngfor.pipe.ts @@ -9,7 +9,8 @@ import { Pipe, PipeTransform } from '@angular/core'; * */ @Pipe({ - name: 'dsObjNgFor' + name: 'dsObjNgFor', + standalone: true }) export class ObjNgFor implements PipeTransform { transform(value: any, args: any[] = null): any { diff --git a/src/app/shared/utils/object-values-pipe.ts b/src/app/shared/utils/object-values-pipe.ts index 5fab8bf841..4207368d8e 100644 --- a/src/app/shared/utils/object-values-pipe.ts +++ b/src/app/shared/utils/object-values-pipe.ts @@ -2,8 +2,9 @@ import { PipeTransform, Pipe } from '@angular/core'; import { isNotEmpty } from '../empty.util'; @Pipe({ - name: 'dsObjectValues', - pure: true + name: 'dsObjectValues', + pure: true, + standalone: true }) /** * Pipe for parsing all values of an object to an array of values diff --git a/src/app/shared/utils/require-file.validator.ts b/src/app/shared/utils/require-file.validator.ts index ef41ad4309..903b50985a 100644 --- a/src/app/shared/utils/require-file.validator.ts +++ b/src/app/shared/utils/require-file.validator.ts @@ -2,11 +2,12 @@ import {Directive} from '@angular/core'; import {NG_VALIDATORS, Validator, UntypedFormControl} from '@angular/forms'; @Directive({ - // eslint-disable-next-line @angular-eslint/directive-selector + // eslint-disable-next-line @angular-eslint/directive-selector selector: '[requireFile]', providers: [ { provide: NG_VALIDATORS, useExisting: FileValidator, multi: true }, - ] + ], + standalone: true }) /** * Validator directive to validate if a file is selected diff --git a/src/app/shared/utils/safe-url-pipe.ts b/src/app/shared/utils/safe-url-pipe.ts index 3f35ed9262..971e481fbf 100644 --- a/src/app/shared/utils/safe-url-pipe.ts +++ b/src/app/shared/utils/safe-url-pipe.ts @@ -6,7 +6,10 @@ import { DomSanitizer } from '@angular/platform-browser'; * only use this when you are sure the URL is indeed safe */ -@Pipe({ name: 'dsSafeUrl' }) +@Pipe({ + name: 'dsSafeUrl', + standalone: true +}) export class SafeUrlPipe implements PipeTransform { constructor(private domSanitizer: DomSanitizer) { } transform(url) { diff --git a/src/app/shared/utils/short-number.pipe.ts b/src/app/shared/utils/short-number.pipe.ts index e4d5cf8356..0b71935696 100644 --- a/src/app/shared/utils/short-number.pipe.ts +++ b/src/app/shared/utils/short-number.pipe.ts @@ -3,7 +3,8 @@ import { isEmpty } from '../empty.util'; @Pipe({ - name: 'dsShortNumber' + name: 'dsShortNumber', + standalone: true }) export class ShortNumberPipe implements PipeTransform { diff --git a/src/app/shared/utils/truncate.pipe.ts b/src/app/shared/utils/truncate.pipe.ts index f841535bb8..b905a686f1 100644 --- a/src/app/shared/utils/truncate.pipe.ts +++ b/src/app/shared/utils/truncate.pipe.ts @@ -6,7 +6,8 @@ import { hasValue } from '../empty.util'; * Default value: 10 */ @Pipe({ - name: 'dsTruncate' + name: 'dsTruncate', + standalone: true }) export class TruncatePipe implements PipeTransform { diff --git a/src/app/shared/utils/var.directive.ts b/src/app/shared/utils/var.directive.ts index 497fc91a8b..906112ff9e 100644 --- a/src/app/shared/utils/var.directive.ts +++ b/src/app/shared/utils/var.directive.ts @@ -2,7 +2,8 @@ import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core'; /* eslint-disable @angular-eslint/directive-selector */ @Directive({ - selector: '[ngVar]', + selector: '[ngVar]', + standalone: true }) export class VarDirective { @Input() diff --git a/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts b/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts index 248a843316..5c090c1d67 100644 --- a/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts +++ b/src/app/shared/view-mode-switch/view-mode-switch.component.spec.ts @@ -11,7 +11,10 @@ import { SearchServiceStub } from '../testing/search-service.stub'; import { ViewMode } from '../../core/shared/view-mode.model'; import { BrowserOnlyMockPipe } from '../testing/browser-only-mock.pipe'; -@Component({ template: '' }) +@Component({ + template: '', + standalone: true +}) class DummyComponent { } @@ -24,26 +27,24 @@ describe('ViewModeSwitchComponent', () => { let detailButton: HTMLElement; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot({ - loader: { - provide: TranslateLoader, - useClass: TranslateLoaderMock - } + loader: { + provide: TranslateLoader, + useClass: TranslateLoaderMock + } }), RouterTestingModule.withRoutes([ - { path: 'search', component: DummyComponent, pathMatch: 'full' }, - ]) - ], - declarations: [ + { path: 'search', component: DummyComponent, pathMatch: 'full' }, + ]), ViewModeSwitchComponent, - DummyComponent, - BrowserOnlyMockPipe, - ], - providers: [ + DummyComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ { provide: SearchService, useValue: searchService }, - ], - }).overrideComponent(ViewModeSwitchComponent, { + ] +}).overrideComponent(ViewModeSwitchComponent, { set: { changeDetection: ChangeDetectionStrategy.Default } }).compileComponents(); })); diff --git a/src/app/shared/view-mode-switch/view-mode-switch.component.ts b/src/app/shared/view-mode-switch/view-mode-switch.component.ts index 95f35abf17..0ebd3956cc 100644 --- a/src/app/shared/view-mode-switch/view-mode-switch.component.ts +++ b/src/app/shared/view-mode-switch/view-mode-switch.component.ts @@ -6,16 +6,21 @@ import { SearchService } from '../../core/shared/search/search.service'; import { ViewMode } from '../../core/shared/view-mode.model'; import { isEmpty, isNotEmpty } from '../empty.util'; import { currentPath } from '../utils/route.utils'; -import { Router } from '@angular/router'; +import { Router, RouterLink, RouterLinkActive } from '@angular/router'; import { filter } from 'rxjs/operators'; +import { BrowserOnlyPipe } from '../utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgIf } from '@angular/common'; /** * Component to switch between list and grid views. */ @Component({ - selector: 'ds-view-mode-switch', - styleUrls: ['./view-mode-switch.component.scss'], - templateUrl: './view-mode-switch.component.html' + selector: 'ds-view-mode-switch', + styleUrls: ['./view-mode-switch.component.scss'], + templateUrl: './view-mode-switch.component.html', + standalone: true, + imports: [NgIf, RouterLink, RouterLinkActive, TranslateModule, BrowserOnlyPipe] }) export class ViewModeSwitchComponent implements OnInit, OnDestroy { diff --git a/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.spec.ts b/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.spec.ts index d5bb80dfde..b7b10f5c67 100644 --- a/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.spec.ts +++ b/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.spec.ts @@ -62,24 +62,22 @@ describe('CollectionStatisticsPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), CommonModule, SharedModule, - ], - declarations: [ CollectionStatisticsPageComponent, - StatisticsTableComponent, - ], - providers: [ + StatisticsTableComponent + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRoute }, { provide: Router, useValue: router }, { provide: UsageReportDataService, useValue: usageReportService }, { provide: DSpaceObjectDataService, useValue: {} }, { provide: DSONameService, useValue: nameService }, { provide: AuthService, useValue: authService }, - ], - }) + ] +}) .compileComponents(); })); diff --git a/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts b/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts index 4875ce39cd..5a708065e6 100644 --- a/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts +++ b/src/app/statistics-page/collection-statistics-page/collection-statistics-page.component.ts @@ -1,20 +1,23 @@ import { Component } from '@angular/core'; -import { StatisticsPageComponent } from '../statistics-page/statistics-page.component'; -import { UsageReportDataService } from '../../core/statistics/usage-report-data.service'; -import { ActivatedRoute , Router} from '@angular/router'; +import { StatisticsPageDirective } from '../statistics-page/statistics-page.directive'; import { Collection } from '../../core/shared/collection.model'; -import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; -import { AuthService } from '../../core/auth/auth.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { StatisticsTableComponent } from '../statistics-table/statistics-table.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { CommonModule } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * Component representing the statistics page for a collection. */ @Component({ - selector: 'ds-collection-statistics-page', - templateUrl: '../statistics-page/statistics-page.component.html', - styleUrls: ['./collection-statistics-page.component.scss'] + selector: 'ds-collection-statistics-page', + templateUrl: '../statistics-page/statistics-page.component.html', + styleUrls: ['./collection-statistics-page.component.scss'], + standalone: true, + imports: [CommonModule, VarDirective, ThemedLoadingComponent, StatisticsTableComponent, TranslateModule], }) -export class CollectionStatisticsPageComponent extends StatisticsPageComponent { +export class CollectionStatisticsPageComponent extends StatisticsPageDirective { /** * The report types to show on this statistics page. @@ -25,20 +28,4 @@ export class CollectionStatisticsPageComponent extends StatisticsPageComponent { protected getComponentName(): string { diff --git a/src/app/statistics-page/community-statistics-page/community-statistics-page.component.spec.ts b/src/app/statistics-page/community-statistics-page/community-statistics-page.component.spec.ts index 2e63f83b8f..3e55c70148 100644 --- a/src/app/statistics-page/community-statistics-page/community-statistics-page.component.spec.ts +++ b/src/app/statistics-page/community-statistics-page/community-statistics-page.component.spec.ts @@ -62,24 +62,22 @@ describe('CommunityStatisticsPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), CommonModule, SharedModule, - ], - declarations: [ CommunityStatisticsPageComponent, - StatisticsTableComponent, - ], - providers: [ + StatisticsTableComponent + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRoute }, { provide: Router, useValue: router }, { provide: UsageReportDataService, useValue: usageReportService }, { provide: DSpaceObjectDataService, useValue: {} }, { provide: DSONameService, useValue: nameService }, { provide: AuthService, useValue: authService }, - ], - }) + ] +}) .compileComponents(); })); diff --git a/src/app/statistics-page/community-statistics-page/community-statistics-page.component.ts b/src/app/statistics-page/community-statistics-page/community-statistics-page.component.ts index de7a8bbf8c..4e9b322b4f 100644 --- a/src/app/statistics-page/community-statistics-page/community-statistics-page.component.ts +++ b/src/app/statistics-page/community-statistics-page/community-statistics-page.component.ts @@ -1,10 +1,11 @@ import { Component } from '@angular/core'; -import { StatisticsPageComponent } from '../statistics-page/statistics-page.component'; -import { UsageReportDataService } from '../../core/statistics/usage-report-data.service'; -import { ActivatedRoute, Router } from '@angular/router'; +import { StatisticsPageDirective } from '../statistics-page/statistics-page.directive'; import { Community } from '../../core/shared/community.model'; -import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; -import { AuthService } from '../../core/auth/auth.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { StatisticsTableComponent } from '../statistics-table/statistics-table.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { CommonModule } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * Component representing the statistics page for a community. @@ -12,9 +13,11 @@ import { AuthService } from '../../core/auth/auth.service'; @Component({ selector: 'ds-community-statistics-page', templateUrl: '../statistics-page/statistics-page.component.html', - styleUrls: ['./community-statistics-page.component.scss'] + styleUrls: ['./community-statistics-page.component.scss'], + standalone: true, + imports: [CommonModule, VarDirective, ThemedLoadingComponent, StatisticsTableComponent, TranslateModule], }) -export class CommunityStatisticsPageComponent extends StatisticsPageComponent { +export class CommunityStatisticsPageComponent extends StatisticsPageDirective { /** * The report types to show on this statistics page. @@ -25,20 +28,4 @@ export class CommunityStatisticsPageComponent extends StatisticsPageComponent { protected getComponentName(): string { diff --git a/src/app/statistics-page/item-statistics-page/item-statistics-page.component.spec.ts b/src/app/statistics-page/item-statistics-page/item-statistics-page.component.spec.ts index 88bbca3fba..0e11b1e66e 100644 --- a/src/app/statistics-page/item-statistics-page/item-statistics-page.component.spec.ts +++ b/src/app/statistics-page/item-statistics-page/item-statistics-page.component.spec.ts @@ -62,24 +62,22 @@ describe('ItemStatisticsPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), CommonModule, SharedModule, - ], - declarations: [ ItemStatisticsPageComponent, - StatisticsTableComponent, - ], - providers: [ + StatisticsTableComponent + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRoute }, { provide: Router, useValue: router }, { provide: UsageReportDataService, useValue: usageReportService }, { provide: DSpaceObjectDataService, useValue: {} }, { provide: DSONameService, useValue: nameService }, { provide: AuthService, useValue: authService }, - ], - }) + ] +}) .compileComponents(); })); diff --git a/src/app/statistics-page/item-statistics-page/item-statistics-page.component.ts b/src/app/statistics-page/item-statistics-page/item-statistics-page.component.ts index f5f107af74..4673301764 100644 --- a/src/app/statistics-page/item-statistics-page/item-statistics-page.component.ts +++ b/src/app/statistics-page/item-statistics-page/item-statistics-page.component.ts @@ -1,20 +1,23 @@ import { Component } from '@angular/core'; -import { StatisticsPageComponent } from '../statistics-page/statistics-page.component'; -import { UsageReportDataService } from '../../core/statistics/usage-report-data.service'; -import { ActivatedRoute, Router } from '@angular/router'; +import { StatisticsPageDirective } from '../statistics-page/statistics-page.directive'; import { Item } from '../../core/shared/item.model'; -import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; -import { AuthService } from '../../core/auth/auth.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { StatisticsTableComponent } from '../statistics-table/statistics-table.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { CommonModule } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; /** * Component representing the statistics page for an item. */ @Component({ - selector: 'ds-item-statistics-page', - templateUrl: '../statistics-page/statistics-page.component.html', - styleUrls: ['./item-statistics-page.component.scss'] + selector: 'ds-item-statistics-page', + templateUrl: '../statistics-page/statistics-page.component.html', + styleUrls: ['./item-statistics-page.component.scss'], + standalone: true, + imports: [CommonModule, VarDirective, ThemedLoadingComponent, StatisticsTableComponent, TranslateModule], }) -export class ItemStatisticsPageComponent extends StatisticsPageComponent { +export class ItemStatisticsPageComponent extends StatisticsPageDirective { /** * The report types to show on this statistics page. @@ -26,20 +29,4 @@ export class ItemStatisticsPageComponent extends StatisticsPageComponent { 'TopCountries', 'TopCities', ]; - - constructor( - protected route: ActivatedRoute, - protected router: Router, - protected usageReportService: UsageReportDataService, - protected nameService: DSONameService, - protected authService: AuthService - ) { - super( - route, - router, - usageReportService, - nameService, - authService, - ); - } } diff --git a/src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts b/src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts index 50e26329a9..035d44f7f3 100644 --- a/src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts +++ b/src/app/statistics-page/item-statistics-page/themed-item-statistics-page.component.ts @@ -6,9 +6,10 @@ import { ItemStatisticsPageComponent } from './item-statistics-page.component'; * Themed wrapper for ItemStatisticsPageComponent */ @Component({ - selector: 'ds-themed-item-statistics-page', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-item-statistics-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedItemStatisticsPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/statistics-page/site-statistics-page/site-statistics-page.component.spec.ts b/src/app/statistics-page/site-statistics-page/site-statistics-page.component.spec.ts index 3c181c1816..597b4094c1 100644 --- a/src/app/statistics-page/site-statistics-page/site-statistics-page.component.spec.ts +++ b/src/app/statistics-page/site-statistics-page/site-statistics-page.component.spec.ts @@ -62,16 +62,14 @@ describe('SiteStatisticsPageComponent', () => { }); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), CommonModule, SharedModule, - ], - declarations: [ SiteStatisticsPageComponent, - StatisticsTableComponent, - ], - providers: [ + StatisticsTableComponent + ], + providers: [ { provide: ActivatedRoute, useValue: activatedRoute }, { provide: Router, useValue: router }, { provide: UsageReportDataService, useValue: usageReportService }, @@ -79,8 +77,8 @@ describe('SiteStatisticsPageComponent', () => { { provide: DSONameService, useValue: nameService }, { provide: SiteDataService, useValue: siteService }, { provide: AuthService, useValue: authService }, - ], - }) + ] +}) .compileComponents(); })); diff --git a/src/app/statistics-page/site-statistics-page/site-statistics-page.component.ts b/src/app/statistics-page/site-statistics-page/site-statistics-page.component.ts index 5eb19bec56..7d1fe3aa1f 100644 --- a/src/app/statistics-page/site-statistics-page/site-statistics-page.component.ts +++ b/src/app/statistics-page/site-statistics-page/site-statistics-page.component.ts @@ -1,12 +1,13 @@ import { Component } from '@angular/core'; -import { StatisticsPageComponent } from '../statistics-page/statistics-page.component'; -import { SiteDataService } from '../../core/data/site-data.service'; -import { UsageReportDataService } from '../../core/statistics/usage-report-data.service'; -import { ActivatedRoute, Router } from '@angular/router'; +import { StatisticsPageDirective } from '../statistics-page/statistics-page.directive'; import { Site } from '../../core/shared/site.model'; -import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; import { switchMap } from 'rxjs/operators'; -import { AuthService } from '../../core/auth/auth.service'; +import { TranslateModule } from '@ngx-translate/core'; +import { StatisticsTableComponent } from '../statistics-table/statistics-table.component'; +import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component'; +import { CommonModule } from '@angular/common'; +import { VarDirective } from '../../shared/utils/var.directive'; +import { SiteDataService } from '../../core/data/site-data.service'; /** * Component representing the site-wide statistics page. @@ -14,9 +15,11 @@ import { AuthService } from '../../core/auth/auth.service'; @Component({ selector: 'ds-site-statistics-page', templateUrl: '../statistics-page/statistics-page.component.html', - styleUrls: ['./site-statistics-page.component.scss'] + styleUrls: ['./site-statistics-page.component.scss'], + standalone: true, + imports: [CommonModule, VarDirective, ThemedLoadingComponent, StatisticsTableComponent, TranslateModule], }) -export class SiteStatisticsPageComponent extends StatisticsPageComponent { +export class SiteStatisticsPageComponent extends StatisticsPageDirective { /** * The report types to show on this statistics page. @@ -25,21 +28,8 @@ export class SiteStatisticsPageComponent extends StatisticsPageComponent { 'TotalVisits', ]; - constructor( - protected route: ActivatedRoute, - protected router: Router, - protected usageReportService: UsageReportDataService, - protected nameService: DSONameService, - protected siteService: SiteDataService, - protected authService: AuthService, - ) { - super( - route, - router, - usageReportService, - nameService, - authService, - ); + constructor(protected siteService: SiteDataService) { + super(); } protected getScope$() { diff --git a/src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts b/src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts index 3f841163ed..f7585c10c7 100644 --- a/src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts +++ b/src/app/statistics-page/site-statistics-page/themed-site-statistics-page.component.ts @@ -6,9 +6,10 @@ import { SiteStatisticsPageComponent } from './site-statistics-page.component'; * Themed wrapper for SiteStatisticsPageComponent */ @Component({ - selector: 'ds-themed-site-statistics-page', - styleUrls: [], - templateUrl: '../../shared/theme-support/themed.component.html', + selector: 'ds-themed-site-statistics-page', + styleUrls: [], + templateUrl: '../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedSiteStatisticsPageComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/statistics-page/statistics-page.module.ts b/src/app/statistics-page/statistics-page.module.ts index 75726de94c..43ea70351c 100644 --- a/src/app/statistics-page/statistics-page.module.ts +++ b/src/app/statistics-page/statistics-page.module.ts @@ -28,17 +28,17 @@ const components = [ ]; @NgModule({ - imports: [ - CommonModule, - SharedModule, - CoreModule.forRoot(), - StatisticsModule.forRoot() - ], - declarations: components, - providers: [ - UsageReportDataService, - ], - exports: components + imports: [ + CommonModule, + SharedModule, + CoreModule.forRoot(), + StatisticsModule.forRoot(), + ...components + ], + providers: [ + UsageReportDataService, + ], + exports: components }) /** diff --git a/src/app/statistics-page/statistics-page/statistics-page.component.ts b/src/app/statistics-page/statistics-page/statistics-page.directive.ts similarity index 85% rename from src/app/statistics-page/statistics-page/statistics-page.component.ts rename to src/app/statistics-page/statistics-page/statistics-page.directive.ts index 8b91d54ae8..9022c9b56d 100644 --- a/src/app/statistics-page/statistics-page/statistics-page.component.ts +++ b/src/app/statistics-page/statistics-page/statistics-page.directive.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Directive, inject, OnInit } from '@angular/core'; import { combineLatest, Observable } from 'rxjs'; import { UsageReportDataService } from '../../core/statistics/usage-report-data.service'; import { map, switchMap } from 'rxjs/operators'; @@ -14,14 +14,11 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; import { AuthService } from '../../core/auth/auth.service'; import { redirectOn4xx } from '../../core/shared/authorized.operators'; +@Directive() /** * Class representing an abstract statistics page component. */ -@Component({ - selector: 'ds-statistics-page', - template: '' -}) -export abstract class StatisticsPageComponent implements OnInit { +export abstract class StatisticsPageDirective implements OnInit { /** * The scope dso for this statistics page, as an Observable. @@ -40,14 +37,11 @@ export abstract class StatisticsPageComponent implements hasData$: Observable; - constructor( - protected route: ActivatedRoute, - protected router: Router, - protected usageReportService: UsageReportDataService, - protected nameService: DSONameService, - protected authService: AuthService, - ) { - } + protected route = inject(ActivatedRoute); + protected router = inject(Router); + protected usageReportService = inject(UsageReportDataService); + protected nameService = inject(DSONameService); + protected authService = inject(AuthService); ngOnInit(): void { this.scope$ = this.getScope$(); diff --git a/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts b/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts index c7900cd278..4fa4319145 100644 --- a/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts +++ b/src/app/statistics-page/statistics-table/statistics-table.component.spec.ts @@ -16,17 +16,15 @@ describe('StatisticsTableComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), - ], - declarations: [ - StatisticsTableComponent, - ], - providers: [ + StatisticsTableComponent + ], + providers: [ { provide: DSpaceObjectDataService, useValue: {} }, { provide: DSONameService, useValue: {} }, - ], - }) + ] +}) .compileComponents(); })); diff --git a/src/app/statistics-page/statistics-table/statistics-table.component.ts b/src/app/statistics-page/statistics-table/statistics-table.component.ts index 45924caa8d..96c1ff731c 100644 --- a/src/app/statistics-page/statistics-table/statistics-table.component.ts +++ b/src/app/statistics-page/statistics-table/statistics-table.component.ts @@ -5,16 +5,19 @@ import { DSONameService } from '../../core/breadcrumbs/dso-name.service'; import { map } from 'rxjs/operators'; import { getRemoteDataPayload, getFinishedRemoteData } from '../../core/shared/operators'; import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service'; -import { TranslateService } from '@ngx-translate/core'; +import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { isEmpty } from '../../shared/empty.util'; +import { NgIf, NgFor, AsyncPipe } from '@angular/common'; /** * Component representing a statistics table for a given usage report. */ @Component({ - selector: 'ds-statistics-table', - templateUrl: './statistics-table.component.html', - styleUrls: ['./statistics-table.component.scss'] + selector: 'ds-statistics-table', + templateUrl: './statistics-table.component.html', + styleUrls: ['./statistics-table.component.scss'], + standalone: true, + imports: [NgIf, NgFor, AsyncPipe, TranslateModule] }) export class StatisticsTableComponent implements OnInit { diff --git a/src/app/statistics/angulartics/dspace/view-tracker.component.ts b/src/app/statistics/angulartics/dspace/view-tracker.component.ts index 805d311cfd..471f148a0d 100644 --- a/src/app/statistics/angulartics/dspace/view-tracker.component.ts +++ b/src/app/statistics/angulartics/dspace/view-tracker.component.ts @@ -10,9 +10,10 @@ import { ReferrerService } from '../../../core/services/referrer.service'; * This component triggers a page view statistic */ @Component({ - selector: 'ds-view-tracker', - styleUrls: ['./view-tracker.component.scss'], - templateUrl: './view-tracker.component.html', + selector: 'ds-view-tracker', + styleUrls: ['./view-tracker.component.scss'], + templateUrl: './view-tracker.component.html', + standalone: true }) export class ViewTrackerComponent implements OnInit, OnDestroy { /** diff --git a/src/app/statistics/statistics.module.ts b/src/app/statistics/statistics.module.ts index 4870e4fbf0..186bd2fe76 100644 --- a/src/app/statistics/statistics.module.ts +++ b/src/app/statistics/statistics.module.ts @@ -13,17 +13,15 @@ export const models = [ ]; @NgModule({ - imports: [ - CommonModule, - CoreModule.forRoot(), - SharedModule, - ], - declarations: [ - ViewTrackerComponent, - ], - exports: [ - ViewTrackerComponent, - ] + imports: [ + CommonModule, + CoreModule.forRoot(), + SharedModule, + ViewTrackerComponent + ], + exports: [ + ViewTrackerComponent, + ] }) /** * This module handles the statistics diff --git a/src/app/submission/edit/submission-edit.component.spec.ts b/src/app/submission/edit/submission-edit.component.spec.ts index 8013162d85..eb5892b7af 100644 --- a/src/app/submission/edit/submission-edit.component.spec.ts +++ b/src/app/submission/edit/submission-edit.component.spec.ts @@ -39,14 +39,14 @@ describe('SubmissionEditComponent Component', () => { findByHref: createSuccessfulRemoteDataObject$(submissionObject.item), }); TestBed.configureTestingModule({ - imports: [ + imports: [ TranslateModule.forRoot(), RouterTestingModule.withRoutes([ - { path: ':id/edit', component: SubmissionEditComponent, pathMatch: 'full' }, - ]) - ], - declarations: [SubmissionEditComponent], - providers: [ + { path: ':id/edit', component: SubmissionEditComponent, pathMatch: 'full' }, + ]), + SubmissionEditComponent + ], + providers: [ { provide: NotificationsService, useClass: NotificationsServiceStub }, { provide: SubmissionService, useClass: SubmissionServiceStub }, { provide: SubmissionJsonPatchOperationsService, useClass: SubmissionJsonPatchOperationsServiceStub }, @@ -54,10 +54,9 @@ describe('SubmissionEditComponent Component', () => { { provide: TranslateService, useValue: getMockTranslateService() }, { provide: Router, useValue: new RouterStub() }, { provide: ActivatedRoute, useValue: route }, - - ], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); + ], + schemas: [NO_ERRORS_SCHEMA] +}).compileComponents(); })); beforeEach(() => { diff --git a/src/app/submission/edit/submission-edit.component.ts b/src/app/submission/edit/submission-edit.component.ts index 93200e5e5c..ae88295d2d 100644 --- a/src/app/submission/edit/submission-edit.component.ts +++ b/src/app/submission/edit/submission-edit.component.ts @@ -19,6 +19,7 @@ import { ItemDataService } from '../../core/data/item-data.service'; import { SubmissionJsonPatchOperationsService } from '../../core/submission/submission-json-patch-operations.service'; import parseSectionErrors from '../utils/parseSectionErrors'; import { SubmissionError } from '../objects/submission-error.model'; +import { SubmissionFormComponent } from '../form/submission-form.component'; /** * This component allows to edit an existing workspaceitem/workflowitem. @@ -26,7 +27,11 @@ import { SubmissionError } from '../objects/submission-error.model'; @Component({ selector: 'ds-submission-edit', styleUrls: ['./submission-edit.component.scss'], - templateUrl: './submission-edit.component.html' + templateUrl: './submission-edit.component.html', + standalone: true, + imports: [ + SubmissionFormComponent + ] }) export class SubmissionEditComponent implements OnDestroy, OnInit { diff --git a/src/app/submission/edit/themed-submission-edit.component.ts b/src/app/submission/edit/themed-submission-edit.component.ts index bbaf432c13..b5ac61a1f3 100644 --- a/src/app/submission/edit/themed-submission-edit.component.ts +++ b/src/app/submission/edit/themed-submission-edit.component.ts @@ -6,9 +6,10 @@ import { ThemedComponent } from '../../shared/theme-support/themed.component'; import { SubmissionEditComponent } from './submission-edit.component'; @Component({ - selector: 'ds-themed-submission-edit', - styleUrls: [], - templateUrl: './../../shared/theme-support/themed.component.html' + selector: 'ds-themed-submission-edit', + styleUrls: [], + templateUrl: './../../shared/theme-support/themed.component.html', + standalone: true }) export class ThemedSubmissionEditComponent extends ThemedComponent { protected getComponentName(): string { diff --git a/src/app/submission/form/collection/submission-form-collection.component.spec.ts b/src/app/submission/form/collection/submission-form-collection.component.spec.ts index c76de83b83..8fc5be12e0 100644 --- a/src/app/submission/form/collection/submission-form-collection.component.spec.ts +++ b/src/app/submission/form/collection/submission-form-collection.component.spec.ts @@ -127,17 +127,15 @@ describe('SubmissionFormCollectionComponent Component', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ FormsModule, ReactiveFormsModule, NgbModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), SubmissionFormCollectionComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: DSONameService, useValue: new DSONameServiceMock() }, { provide: CollectionDataService, useValue: collectionDataService }, { provide: SubmissionJsonPatchOperationsService, useClass: SubmissionJsonPatchOperationsServiceStub }, @@ -148,9 +146,9 @@ describe('SubmissionFormCollectionComponent Component', () => { { provide: SectionsService, useValue: sectionsService }, ChangeDetectorRef, SubmissionFormCollectionComponent - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); describe('', () => { @@ -291,8 +289,12 @@ describe('SubmissionFormCollectionComponent Component', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [FormsModule, + ReactiveFormsModule, + NgbModule] }) class TestComponent { diff --git a/src/app/submission/form/collection/submission-form-collection.component.ts b/src/app/submission/form/collection/submission-form-collection.component.ts index 964f86577a..8e7d217b1e 100644 --- a/src/app/submission/form/collection/submission-form-collection.component.ts +++ b/src/app/submission/form/collection/submission-form-collection.component.ts @@ -11,10 +11,7 @@ import { } from '@angular/core'; import { BehaviorSubject, Observable, of as observableOf, Subscription } from 'rxjs'; -import { - find, - map, mergeMap -} from 'rxjs/operators'; +import { find, map, mergeMap } from 'rxjs/operators'; import { Collection } from '../../../core/shared/collection.model'; import { hasValue, isNotEmpty } from '../../../shared/empty.util'; @@ -23,13 +20,21 @@ import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder'; import { SubmissionService } from '../../submission.service'; import { SubmissionObject } from '../../../core/submission/models/submission-object.model'; -import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service'; +import { + SubmissionJsonPatchOperationsService +} from '../../../core/submission/submission-json-patch-operations.service'; import { CollectionDataService } from '../../../core/data/collection-data.service'; import { CollectionDropdownComponent } from '../../../shared/collection-dropdown/collection-dropdown.component'; import { SectionsService } from '../../sections/sections.service'; import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators'; import { SectionsType } from '../../sections/sections-type'; import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; +import { CommonModule } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; +import { + ThemedCollectionDropdownComponent +} from '../../../shared/collection-dropdown/themed-collection-dropdown.component'; /** * This component allows to show the current collection the submission belonging to and to change it. @@ -37,7 +42,14 @@ import { DSONameService } from '../../../core/breadcrumbs/dso-name.service'; @Component({ selector: 'ds-submission-form-collection', styleUrls: ['./submission-form-collection.component.scss'], - templateUrl: './submission-form-collection.component.html' + templateUrl: './submission-form-collection.component.html', + standalone: true, + imports: [ + CommonModule, + TranslateModule, + NgbDropdownModule, + ThemedCollectionDropdownComponent + ] }) export class SubmissionFormCollectionComponent implements OnChanges, OnInit { diff --git a/src/app/submission/form/footer/submission-form-footer.component.spec.ts b/src/app/submission/form/footer/submission-form-footer.component.spec.ts index dd28f9a10a..6773c1cdcb 100644 --- a/src/app/submission/form/footer/submission-form-footer.component.spec.ts +++ b/src/app/submission/form/footer/submission-form-footer.component.spec.ts @@ -31,24 +31,22 @@ describe('SubmissionFormFooterComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NgbModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), SubmissionFormFooterComponent, - TestComponent, - BrowserOnlyMockPipe, - ], - providers: [ + TestComponent + ], + declarations: [BrowserOnlyMockPipe], + providers: [ { provide: SubmissionService, useValue: submissionServiceStub }, { provide: SubmissionRestService, useClass: SubmissionRestServiceStub }, ChangeDetectorRef, NgbModal, SubmissionFormFooterComponent - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); describe('', () => { @@ -248,8 +246,10 @@ describe('SubmissionFormFooterComponent', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [NgbModule] }) class TestComponent { diff --git a/src/app/submission/form/footer/submission-form-footer.component.ts b/src/app/submission/form/footer/submission-form-footer.component.ts index 7a11537616..aa10eb9323 100644 --- a/src/app/submission/form/footer/submission-form-footer.component.ts +++ b/src/app/submission/form/footer/submission-form-footer.component.ts @@ -8,14 +8,19 @@ import { SubmissionRestService } from '../../../core/submission/submission-rest. import { SubmissionService } from '../../submission.service'; import { SubmissionScopeType } from '../../../core/submission/submission-scope-type'; import { isNotEmpty } from '../../../shared/empty.util'; +import { CommonModule } from '@angular/common'; +import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe'; +import { TranslateModule } from '@ngx-translate/core'; /** * This component represents submission form footer bar. */ @Component({ - selector: 'ds-submission-form-footer', - styleUrls: ['./submission-form-footer.component.scss'], - templateUrl: './submission-form-footer.component.html' + selector: 'ds-submission-form-footer', + styleUrls: ['./submission-form-footer.component.scss'], + templateUrl: './submission-form-footer.component.html', + standalone: true, + imports: [CommonModule, BrowserOnlyPipe, TranslateModule] }) export class SubmissionFormFooterComponent implements OnChanges { diff --git a/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts b/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts index a8ad7fbe49..090b93d569 100644 --- a/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts +++ b/src/app/submission/form/section-add/submission-form-section-add.component.spec.ts @@ -57,24 +57,22 @@ describe('SubmissionFormSectionAddComponent Component', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [ + imports: [ NgbModule, - TranslateModule.forRoot() - ], - declarations: [ + TranslateModule.forRoot(), SubmissionFormSectionAddComponent, TestComponent - ], - providers: [ + ], + providers: [ { provide: HostWindowService, useValue: window }, { provide: SubmissionService, useValue: submissionServiceStub }, { provide: SectionsService, useClass: SectionsServiceStub }, { provide: Store, useValue: store }, ChangeDetectorRef, SubmissionFormSectionAddComponent - ], - schemas: [CUSTOM_ELEMENTS_SCHEMA] - }).compileComponents(); + ], + schemas: [CUSTOM_ELEMENTS_SCHEMA] +}).compileComponents(); })); describe('', () => { @@ -207,8 +205,10 @@ describe('SubmissionFormSectionAddComponent Component', () => { // declare a test component @Component({ - selector: 'ds-test-cmp', - template: `` + selector: 'ds-test-cmp', + template: ``, + standalone: true, + imports: [NgbModule] }) class TestComponent { diff --git a/src/app/submission/form/section-add/submission-form-section-add.component.ts b/src/app/submission/form/section-add/submission-form-section-add.component.ts index 1a758961d6..04e7bfa658 100644 --- a/src/app/submission/form/section-add/submission-form-section-add.component.ts +++ b/src/app/submission/form/section-add/submission-form-section-add.component.ts @@ -7,14 +7,19 @@ import { SectionsService } from '../../sections/sections.service'; import { HostWindowService } from '../../../shared/host-window.service'; import { SubmissionService } from '../../submission.service'; import { SectionDataObject } from '../../sections/models/section-data.model'; +import { CommonModule } from '@angular/common'; +import { TranslateModule } from '@ngx-translate/core'; +import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; /** * This component allow to add any new section to submission form */ @Component({ selector: 'ds-submission-form-section-add', - styleUrls: [ './submission-form-section-add.component.scss' ], - templateUrl: './submission-form-section-add.component.html' + styleUrls: ['./submission-form-section-add.component.scss'], + templateUrl: './submission-form-section-add.component.html', + standalone: true, + imports: [CommonModule, TranslateModule, NgbDropdownModule,] }) export class SubmissionFormSectionAddComponent implements OnInit { diff --git a/src/app/submission/form/submission-form.component.html b/src/app/submission/form/submission-form.component.html index 4a916cfe23..d31611ff2b 100644 --- a/src/app/submission/form/submission-form.component.html +++ b/src/app/submission/form/submission-form.component.html @@ -27,10 +27,10 @@
- + + [sectionData]="$any(object)">
`, standalone: true, imports: [ MarkdownDirective ], }) class TestComponent {} describe('MarkdownDirective', () => { - let component: TestComponent; let fixture: ComponentFixture; - let divEl: DebugElement; beforeEach(async () => { await TestBed.configureTestingModule({ @@ -32,12 +31,61 @@ describe('MarkdownDirective', () => { }).compileComponents(); spyOn(MarkdownDirective.prototype, 'render'); fixture = TestBed.createComponent(TestComponent); - component = fixture.componentInstance; - divEl = fixture.debugElement.query(By.css('div')); }); it('should call render method', () => { fixture.detectChanges(); expect(MarkdownDirective.prototype.render).toHaveBeenCalled(); }); + +}); + +describe('MarkdownDirective sanitization with markdown disabled', () => { + let fixture: ComponentFixture; + let divEl: DebugElement; + // Disable markdown + environment.markdown.enabled = false; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + providers: [ + { provide: MathService, useClass: MockMathService }, + ], + }).compileComponents(); + fixture = TestBed.createComponent(TestComponent); + divEl = fixture.debugElement.query(By.css('div')); + + }); + + it('should sanitize the script element out of innerHTML (markdown disabled)',() => { + fixture.detectChanges(); + divEl = fixture.debugElement.query(By.css('div')); + expect(divEl.nativeElement.innerHTML).toEqual('test'); + }); + +}); + +describe('MarkdownDirective sanitization with markdown enabled', () => { + let fixture: ComponentFixture; + let divEl: DebugElement; + // Enable markdown + environment.markdown.enabled = true; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + providers: [ + { provide: MathService, useClass: MockMathService }, + ], + }).compileComponents(); + fixture = TestBed.createComponent(TestComponent); + divEl = fixture.debugElement.query(By.css('div')); + + }); + + it('should sanitize the script element out of innerHTML (markdown enabled)',() => { + fixture.detectChanges(); + divEl = fixture.debugElement.query(By.css('div')); + expect(divEl.nativeElement.innerHTML).toEqual('test'); + }); + }); diff --git a/src/app/shared/utils/markdown.directive.ts b/src/app/shared/utils/markdown.directive.ts index 0540e25cc5..de13acb303 100644 --- a/src/app/shared/utils/markdown.directive.ts +++ b/src/app/shared/utils/markdown.directive.ts @@ -55,7 +55,7 @@ export class MarkdownDirective implements OnInit, OnDestroy { async render(value: string, forcePreview = false): Promise { if (isEmpty(value) || (!environment.markdown.enabled && !forcePreview)) { - this.el.innerHTML = value; + this.el.innerHTML = this.sanitizer.sanitize(SecurityContext.HTML, value); return; } else { if (environment.markdown.mathjax) { From f975e1da897b34df0621ecd78ee11d4fc58460b4 Mon Sep 17 00:00:00 2001 From: andreaNeki Date: Tue, 1 Oct 2024 14:34:43 -0300 Subject: [PATCH 1306/1529] Edit item - making page content more responsive and accessible --- .../item-status/item-status.component.html | 16 ++++++++-------- .../item-status/item-status.component.scss | 3 +++ .../item-status/item-status.component.ts | 1 + 3 files changed, 12 insertions(+), 8 deletions(-) create mode 100644 src/app/item-page/edit-item-page/item-status/item-status.component.scss diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.html b/src/app/item-page/edit-item-page/item-status/item-status.component.html index faad0e679b..30212c4a4c 100644 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.html +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.html @@ -1,28 +1,28 @@

{{'item.edit.tabs.status.description' | translate}}

-
-
+
+
{{'item.edit.tabs.status.labels.' + statusKey | translate}}:
-
+
{{statusData[statusKey]}}
-
+
-
+
{{identifier.identifierType.toLocaleUpperCase()}}
-
{{identifier.value}} +
{{identifier.value}} ({{"item.edit.identifiers.doi.status."+identifier.identifierStatus|translate}})
-
+
{{'item.edit.tabs.status.labels.itemPage' | translate}}:
-
+ diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.scss b/src/app/item-page/edit-item-page/item-status/item-status.component.scss new file mode 100644 index 0000000000..349416cd20 --- /dev/null +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.scss @@ -0,0 +1,3 @@ +.status-label { + font-weight: 700; +} diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.ts b/src/app/item-page/edit-item-page/item-status/item-status.component.ts index 1bb17dc77c..0ad500b56f 100644 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.ts +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.ts @@ -60,6 +60,7 @@ import { ItemOperation } from '../item-operation/itemOperation.model'; @Component({ selector: 'ds-base-item-status', + styleUrls: ['item-status.component.scss'], templateUrl: './item-status.component.html', changeDetection: ChangeDetectionStrategy.Default, animations: [ From fec4aa6df1bd6c5ea1ca9eeb10e4bc643a16d39e Mon Sep 17 00:00:00 2001 From: DanGastardelli <55243638+DanGastardelli@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:15:53 -0300 Subject: [PATCH 1307/1529] Changing the bitstream title in the submission form to use the view component title, avoiding disappearance with changes to the form --- .../sections/upload/file/section-upload-file.component.html | 3 +-- .../upload/file/view/section-upload-file-view.component.html | 5 +++-- .../upload/file/view/section-upload-file-view.component.ts | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.html b/src/app/submission/sections/upload/file/section-upload-file.component.html index da83e3f9a0..4698fdf68a 100644 --- a/src/app/submission/sections/upload/file/section-upload-file.component.html +++ b/src/app/submission/sections/upload/file/section-upload-file.component.html @@ -18,7 +18,7 @@
-

{{fileName}} ({{fileData?.sizeBytes | dsFileSize}})

+
@@ -43,7 +43,6 @@
-
diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html index cc12b5dea6..dc72fbdad0 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.html @@ -2,9 +2,10 @@ -
+

{{entry.value}} -

+ ({{fileData?.sizeBytes | dsFileSize}}) +
diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index 0630a28a76..7ab21fb85b 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -18,6 +18,7 @@ import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submis import { isNotEmpty } from '../../../../../shared/empty.util'; import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe'; import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessConditions/submission-section-upload-access-conditions.component'; +import { FileSizePipe } from "../../../../../shared/utils/file-size-pipe"; /** * This component allow to show bitstream's metadata @@ -31,7 +32,8 @@ import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessCo TruncatePipe, NgIf, NgForOf, - ], + FileSizePipe +], standalone: true, }) export class SubmissionSectionUploadFileViewComponent implements OnInit { From 161daffcc08e3c9ebcc209ba3115111243d2e6ae Mon Sep 17 00:00:00 2001 From: Yana De Pauw Date: Wed, 2 Oct 2024 09:23:26 +0200 Subject: [PATCH 1308/1529] 115284: Add tests for isRepeatable --- .../edit-relationship-list.component.spec.ts | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts index 48415000be..4784e8fc5c 100644 --- a/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts +++ b/src/app/item-page/edit-item-page/item-relationships/edit-relationship-list/edit-relationship-list.component.spec.ts @@ -110,7 +110,7 @@ describe('EditRelationshipListComponent', () => { }, }; - function init(leftType: string, rightType: string): void { + function init(leftType: string, rightType: string, leftMaxCardinality?: number, rightMaxCardinality?: number): void { entityTypeLeft = Object.assign(new ItemType(), { id: leftType, uuid: leftType, @@ -130,6 +130,8 @@ describe('EditRelationshipListComponent', () => { rightType: createSuccessfulRemoteDataObject$(entityTypeRight), leftwardType: `is${rightType}Of${leftType}`, rightwardType: `is${leftType}Of${rightType}`, + leftMaxCardinality: leftMaxCardinality, + rightMaxCardinality: rightMaxCardinality, }); paginationOptions = Object.assign(new PaginationComponentOptions(), { @@ -402,4 +404,31 @@ describe('EditRelationshipListComponent', () => { })); }); }); + + describe('Is repeatable relationship', () => { + beforeEach(waitForAsync(() => { + currentItemIsLeftItem$ = new BehaviorSubject(true); + })); + describe('when max cardinality is 1', () => { + beforeEach(waitForAsync(() => init('Publication', 'OrgUnit', 1, undefined))); + it('should return false', () => { + const result = (comp as any).isRepeatable(); + expect(result).toBeFalse(); + }); + }); + describe('when max cardinality is 2', () => { + beforeEach(waitForAsync(() => init('Publication', 'OrgUnit', 2, undefined))); + it('should return true', () => { + const result = (comp as any).isRepeatable(); + expect(result).toBeTrue(); + }); + }); + describe('when max cardinality is undefined', () => { + beforeEach(waitForAsync(() => init('Publication', 'OrgUnit', undefined, undefined))); + it('should return true', () => { + const result = (comp as any).isRepeatable(); + expect(result).toBeTrue(); + }); + }); + }); }); From df24a63a464c3f88adedf982cdf540241414a86a Mon Sep 17 00:00:00 2001 From: DanGastardelli <55243638+DanGastardelli@users.noreply.github.com> Date: Wed, 2 Oct 2024 08:38:42 -0300 Subject: [PATCH 1309/1529] Adjusting spacing and good rules --- .../upload/file/view/section-upload-file-view.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index 7ab21fb85b..378753a1e6 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -18,7 +18,7 @@ import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submis import { isNotEmpty } from '../../../../../shared/empty.util'; import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe'; import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessConditions/submission-section-upload-access-conditions.component'; -import { FileSizePipe } from "../../../../../shared/utils/file-size-pipe"; +import { FileSizePipe } from '../../../../../shared/utils/file-size-pipe'; /** * This component allow to show bitstream's metadata @@ -32,8 +32,8 @@ import { FileSizePipe } from "../../../../../shared/utils/file-size-pipe"; TruncatePipe, NgIf, NgForOf, - FileSizePipe -], + FileSizePipe, + ], standalone: true, }) export class SubmissionSectionUploadFileViewComponent implements OnInit { From 4aed1b60563b3486da9f5c98cd4ee15451553b73 Mon Sep 17 00:00:00 2001 From: andreaNeki Date: Wed, 2 Oct 2024 08:45:52 -0300 Subject: [PATCH 1310/1529] Adjusting bold text on labels --- .../item-operation/item-operation.component.html | 2 +- .../edit-item-page/item-status/item-status.component.html | 8 ++++---- .../edit-item-page/item-status/item-status.component.scss | 3 --- .../edit-item-page/item-status/item-status.component.ts | 1 - 4 files changed, 5 insertions(+), 9 deletions(-) delete mode 100644 src/app/item-page/edit-item-page/item-status/item-status.component.scss diff --git a/src/app/item-page/edit-item-page/item-operation/item-operation.component.html b/src/app/item-page/edit-item-page/item-operation/item-operation.component.html index deb8e15d29..0977876a19 100644 --- a/src/app/item-page/edit-item-page/item-operation/item-operation.component.html +++ b/src/app/item-page/edit-item-page/item-operation/item-operation.component.html @@ -1,5 +1,5 @@
- + {{'item.edit.tabs.status.buttons.' + operation.operationKey + '.label' | translate}}
diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.html b/src/app/item-page/edit-item-page/item-status/item-status.component.html index 30212c4a4c..7d6e2e9559 100644 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.html +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.html @@ -1,7 +1,7 @@

{{'item.edit.tabs.status.description' | translate}}

-
+
{{'item.edit.tabs.status.labels.' + statusKey | translate}}:
@@ -11,15 +11,15 @@
-
+
{{identifier.identifierType.toLocaleUpperCase()}}
-
{{identifier.value}} +
{{identifier.value}} ({{"item.edit.identifiers.doi.status."+identifier.identifierStatus|translate}})
-
+
{{'item.edit.tabs.status.labels.itemPage' | translate}}:
diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.scss b/src/app/item-page/edit-item-page/item-status/item-status.component.scss deleted file mode 100644 index 349416cd20..0000000000 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.status-label { - font-weight: 700; -} diff --git a/src/app/item-page/edit-item-page/item-status/item-status.component.ts b/src/app/item-page/edit-item-page/item-status/item-status.component.ts index 0ad500b56f..1bb17dc77c 100644 --- a/src/app/item-page/edit-item-page/item-status/item-status.component.ts +++ b/src/app/item-page/edit-item-page/item-status/item-status.component.ts @@ -60,7 +60,6 @@ import { ItemOperation } from '../item-operation/itemOperation.model'; @Component({ selector: 'ds-base-item-status', - styleUrls: ['item-status.component.scss'], templateUrl: './item-status.component.html', changeDetection: ChangeDetectionStrategy.Default, animations: [ From 762bc8ce8c5a87a1dc7ba9763916addaabe06398 Mon Sep 17 00:00:00 2001 From: DanGastardelli <55243638+DanGastardelli@users.noreply.github.com> Date: Wed, 2 Oct 2024 08:46:37 -0300 Subject: [PATCH 1311/1529] Adjusting spacing --- .../upload/file/view/section-upload-file-view.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index 378753a1e6..7b8e870400 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -54,13 +54,13 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit { * The bitstream's title key * @type {string} */ - public fileTitleKey = 'Title'; + public fileTitleKey: string = 'Title'; /** * The bitstream's description key * @type {string} */ - public fileDescrKey = 'Description'; + public fileDescrKey: string = 'Description'; public fileFormat!: string; From 62006c00cacf7e74661d6cc3dd4b5a53f47aeb72 Mon Sep 17 00:00:00 2001 From: DanGastardelli <55243638+DanGastardelli@users.noreply.github.com> Date: Wed, 2 Oct 2024 09:01:56 -0300 Subject: [PATCH 1312/1529] Fix last commit --- .../upload/file/view/section-upload-file-view.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index 7b8e870400..378753a1e6 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -54,13 +54,13 @@ export class SubmissionSectionUploadFileViewComponent implements OnInit { * The bitstream's title key * @type {string} */ - public fileTitleKey: string = 'Title'; + public fileTitleKey = 'Title'; /** * The bitstream's description key * @type {string} */ - public fileDescrKey: string = 'Description'; + public fileDescrKey = 'Description'; public fileFormat!: string; From eeaac8965b8b82e8d21f712350781c3e7f627157 Mon Sep 17 00:00:00 2001 From: DanGastardelli <55243638+DanGastardelli@users.noreply.github.com> Date: Wed, 2 Oct 2024 09:10:48 -0300 Subject: [PATCH 1313/1529] Import order adjustment --- .../upload/file/view/section-upload-file-view.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index 378753a1e6..20e86a492d 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -17,8 +17,8 @@ import { Metadata } from '../../../../../core/shared/metadata.utils'; import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; import { isNotEmpty } from '../../../../../shared/empty.util'; import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe'; -import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessConditions/submission-section-upload-access-conditions.component'; import { FileSizePipe } from '../../../../../shared/utils/file-size-pipe'; +import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessConditions/submission-section-upload-access-conditions.component'; /** * This component allow to show bitstream's metadata From 2643a459b6a1213b4edb16f245732ba0a1b32bcb Mon Sep 17 00:00:00 2001 From: DanGastardelli <55243638+DanGastardelli@users.noreply.github.com> Date: Wed, 2 Oct 2024 09:24:46 -0300 Subject: [PATCH 1314/1529] Import order adjustment --- .../upload/file/view/section-upload-file-view.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts index 20e86a492d..f065fc9e19 100644 --- a/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts +++ b/src/app/submission/sections/upload/file/view/section-upload-file-view.component.ts @@ -16,8 +16,8 @@ import { import { Metadata } from '../../../../../core/shared/metadata.utils'; import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model'; import { isNotEmpty } from '../../../../../shared/empty.util'; -import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe'; import { FileSizePipe } from '../../../../../shared/utils/file-size-pipe'; +import { TruncatePipe } from '../../../../../shared/utils/truncate.pipe'; import { SubmissionSectionUploadAccessConditionsComponent } from '../../accessConditions/submission-section-upload-access-conditions.component'; /** From c5b395802c890eab0761206aaae25f54b92212cc Mon Sep 17 00:00:00 2001 From: Julia Date: Fri, 4 Oct 2024 10:24:27 -0400 Subject: [PATCH 1315/1529] Update fr.json5 to add capitalization --- src/assets/i18n/fr.json5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assets/i18n/fr.json5 b/src/assets/i18n/fr.json5 index 399363f017..185576e186 100644 --- a/src/assets/i18n/fr.json5 +++ b/src/assets/i18n/fr.json5 @@ -2053,7 +2053,7 @@ "community.all-lists.head": "Sous-communautés et collections", // "community.sub-collection-list.head": "Collections of this Community", - "community.sub-collection-list.head": "collections au sein de cette communauté", + "community.sub-collection-list.head": "Collections au sein de cette communauté", // "community.sub-community-list.head": "Communities of this Community", "community.sub-community-list.head": "Sous-communautés au sein de cette communauté", From e6a7fb852a147e9193fd3164660d12228c36d56a Mon Sep 17 00:00:00 2001 From: FrancescoMolinaro Date: Fri, 19 Jul 2024 17:41:12 +0200 Subject: [PATCH 1316/1529] [CST-15592] add accessibility tests for following pages: Metadata Import Batch Import Processes Overview New Process Quality Assurance Sources --- cypress/e2e/batch-import-page.cy.ts | 17 +++++++++++++++++ cypress/e2e/metadata-import-page.cy.ts | 17 +++++++++++++++++ cypress/e2e/new-process.cy.ts | 17 +++++++++++++++++ cypress/e2e/processes-overview.cy.ts | 18 ++++++++++++++++++ .../e2e/quality-assurance-source-page.cy.ts | 17 +++++++++++++++++ .../quality-assurance-source.component.html | 2 +- .../process-overview-table.component.html | 1 - 7 files changed, 87 insertions(+), 2 deletions(-) create mode 100644 cypress/e2e/batch-import-page.cy.ts create mode 100644 cypress/e2e/metadata-import-page.cy.ts create mode 100644 cypress/e2e/new-process.cy.ts create mode 100644 cypress/e2e/processes-overview.cy.ts create mode 100644 cypress/e2e/quality-assurance-source-page.cy.ts diff --git a/cypress/e2e/batch-import-page.cy.ts b/cypress/e2e/batch-import-page.cy.ts new file mode 100644 index 0000000000..82660e8e43 --- /dev/null +++ b/cypress/e2e/batch-import-page.cy.ts @@ -0,0 +1,17 @@ +import { testA11y } from 'cypress/support/utils'; + +describe('Batch Import Page', () => { + // NOTE: these tests currently assume this query will return results! + beforeEach(() => { + // Must login as an Admin to see processes + cy.visit('/admin/batch-import'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('should pass accessibility tests', () => { + // Batch import form must first be visible + cy.get('ds-batch-import-page').should('be.visible'); + // Analyze for accessibility issues + testA11y('ds-batch-import-page'); + }); +}); diff --git a/cypress/e2e/metadata-import-page.cy.ts b/cypress/e2e/metadata-import-page.cy.ts new file mode 100644 index 0000000000..3c1d1a91af --- /dev/null +++ b/cypress/e2e/metadata-import-page.cy.ts @@ -0,0 +1,17 @@ +import { testA11y } from 'cypress/support/utils'; + +describe('Metadata Import Page', () => { + // NOTE: these tests currently assume this query will return results! + beforeEach(() => { + // Must login as an Admin to see processes + cy.visit('/admin/metadata-import'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('should pass accessibility tests', () => { + // Metadata import form must first be visible + cy.get('ds-metadata-import-page').should('be.visible'); + // Analyze for accessibility issues + testA11y('ds-metadata-import-page'); + }); +}); diff --git a/cypress/e2e/new-process.cy.ts b/cypress/e2e/new-process.cy.ts new file mode 100644 index 0000000000..d2a6ab4731 --- /dev/null +++ b/cypress/e2e/new-process.cy.ts @@ -0,0 +1,17 @@ +import { testA11y } from 'cypress/support/utils'; + +describe('New Process', () => { + // NOTE: these tests currently assume this query will return results! + beforeEach(() => { + // Must login as an Admin to see processes + cy.visit('/processes/new'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('should pass accessibility tests', () => { + // Process form must first be visible + cy.get('ds-new-process').should('be.visible'); + // Analyze for accessibility issues + testA11y('ds-new-process'); + }); +}); diff --git a/cypress/e2e/processes-overview.cy.ts b/cypress/e2e/processes-overview.cy.ts new file mode 100644 index 0000000000..f0e1ccc3fe --- /dev/null +++ b/cypress/e2e/processes-overview.cy.ts @@ -0,0 +1,18 @@ +import { testA11y } from 'cypress/support/utils'; + +describe('Processes Overview', () => { + // NOTE: these tests currently assume this query will return results! + beforeEach(() => { + // Must login as an Admin to see processes + cy.visit('/processes'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('should pass accessibility tests', () => { + + // Process overview must first be visible + cy.get('ds-process-overview').should('be.visible'); + // Analyze for accessibility issues + testA11y('ds-process-overview'); + }); +}); diff --git a/cypress/e2e/quality-assurance-source-page.cy.ts b/cypress/e2e/quality-assurance-source-page.cy.ts new file mode 100644 index 0000000000..beb797df41 --- /dev/null +++ b/cypress/e2e/quality-assurance-source-page.cy.ts @@ -0,0 +1,17 @@ +import { testA11y } from 'cypress/support/utils'; + +describe('Quality Assurance Source Page', () => { + // NOTE: these tests currently assume this query will return results! + beforeEach(() => { + // Must login as an Admin to see processes + cy.visit('/notifications/quality-assurance'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); + }); + + it('should pass accessibility tests', () => { + // Source page must first be visible + cy.get('ds-quality-assurance-source-page-component').should('be.visible'); + // Analyze for accessibility issues + testA11y('ds-quality-assurance-source-page-component'); + }); +}); diff --git a/src/app/notifications/qa/source/quality-assurance-source.component.html b/src/app/notifications/qa/source/quality-assurance-source.component.html index bf461873a1..faeb571234 100644 --- a/src/app/notifications/qa/source/quality-assurance-source.component.html +++ b/src/app/notifications/qa/source/quality-assurance-source.component.html @@ -7,7 +7,7 @@
-

{{'quality-assurance.source'| translate}}

+

{{'quality-assurance.source'| translate}}

{{tableEntry.info}}
diff --git a/src/styles/_global-styles.scss b/src/styles/_global-styles.scss index 765b50ae86..b3120c08cd 100644 --- a/src/styles/_global-styles.scss +++ b/src/styles/_global-styles.scss @@ -466,3 +466,11 @@ ngb-accordion { .mt-ncs { margin-top: calc(var(--ds-content-spacing) * -1); } .mb-ncs { margin-bottom: calc(var(--ds-content-spacing) * -1); } .my-ncs { margin-top: calc(var(--ds-content-spacing) * -1); margin-bottom: calc(var(--ds-content-spacing) * -1); } + + +.link-contrast { + // Rules for accessibility to meet minimum contrast and have an identifiable link between other texts + color: darken($link-color, 5%); + // We use underline to discern link from text as we can't make color lighter on a white bg + text-decoration: underline; +} From 69f618e8566445b800b83bcc4604bd2e59a98b28 Mon Sep 17 00:00:00 2001 From: FrancescoMolinaro Date: Tue, 23 Jul 2024 17:13:20 +0200 Subject: [PATCH 1321/1529] [CST-15592] improve tests, add attributes for testing, fix wrong references --- cypress/e2e/admin-add-new-modals.cy.ts | 6 ++-- cypress/e2e/admin-edit-modals.cy.ts | 6 ++-- cypress/e2e/admin-export-modals.cy.ts | 4 +-- cypress/e2e/admin-search-page.cy.ts | 3 ++ cypress/e2e/admin-workflow-page.cy.ts | 3 ++ cypress/e2e/bulk-access.cy.ts | 7 +++++ cypress/e2e/health-page.cy.ts | 31 +++++++++++++++---- .../health-page/health-page.component.html | 4 +-- .../onclick-menu-item.component.html | 3 +- 9 files changed, 50 insertions(+), 17 deletions(-) diff --git a/cypress/e2e/admin-add-new-modals.cy.ts b/cypress/e2e/admin-add-new-modals.cy.ts index 6e2e8e6970..565ae154f1 100644 --- a/cypress/e2e/admin-add-new-modals.cy.ts +++ b/cypress/e2e/admin-add-new-modals.cy.ts @@ -14,7 +14,7 @@ describe('Admin Add New Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-new-title').click(); - cy.get('a[title="menu.section.new_community"]').click(); + cy.get('a[data-test="menu.section.new_community"]').click(); // Analyze for accessibility testA11y('ds-create-community-parent-selector'); @@ -27,7 +27,7 @@ describe('Admin Add New Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-new-title').click(); - cy.get('a[title="menu.section.new_collection"]').click(); + cy.get('a[data-test="menu.section.new_collection"]').click(); // Analyze for accessibility testA11y('ds-create-collection-parent-selector'); @@ -40,7 +40,7 @@ describe('Admin Add New Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-new-title').click(); - cy.get('a[title="menu.section.new_item"]').click(); + cy.get('a[data-test="menu.section.new_item"]').click(); // Analyze for accessibility testA11y('ds-create-item-parent-selector'); diff --git a/cypress/e2e/admin-edit-modals.cy.ts b/cypress/e2e/admin-edit-modals.cy.ts index 256a6d89cb..e96d6ce898 100644 --- a/cypress/e2e/admin-edit-modals.cy.ts +++ b/cypress/e2e/admin-edit-modals.cy.ts @@ -14,7 +14,7 @@ describe('Admin Edit Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-edit-title').click(); - cy.get('a[title="menu.section.edit_community"]').click(); + cy.get('a[data-test="menu.section.edit_community"]').click(); // Analyze for accessibility testA11y('ds-edit-community-selector'); @@ -27,7 +27,7 @@ describe('Admin Edit Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-edit-title').click(); - cy.get('a[title="menu.section.edit_collection"]').click(); + cy.get('a[data-test="menu.section.edit_collection"]').click(); // Analyze for accessibility testA11y('ds-edit-collection-selector'); @@ -40,7 +40,7 @@ describe('Admin Edit Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-edit-title').click(); - cy.get('a[title="menu.section.edit_item"]').click(); + cy.get('a[data-test="menu.section.edit_item"]').click(); // Analyze for accessibility testA11y('ds-edit-item-selector'); diff --git a/cypress/e2e/admin-export-modals.cy.ts b/cypress/e2e/admin-export-modals.cy.ts index b611bb8fd5..9f69764d19 100644 --- a/cypress/e2e/admin-export-modals.cy.ts +++ b/cypress/e2e/admin-export-modals.cy.ts @@ -14,7 +14,7 @@ describe('Admin Export Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-export-title').click(); - cy.get('a[title="menu.section.export_metadata"]').click(); + cy.get('a[data-test="menu.section.export_metadata"]').click(); // Analyze for accessibility testA11y('ds-export-metadata-selector'); @@ -27,7 +27,7 @@ describe('Admin Export Modals', () => { // Click on entry of menu cy.get('#admin-menu-section-export-title').click(); - cy.get('a[title="menu.section.export_batch"]').click(); + cy.get('a[data-test="menu.section.export_batch"]').click(); // Analyze for accessibility testA11y('ds-export-batch-selector'); diff --git a/cypress/e2e/admin-search-page.cy.ts b/cypress/e2e/admin-search-page.cy.ts index 2e1d13aa13..4fbf8939fe 100644 --- a/cypress/e2e/admin-search-page.cy.ts +++ b/cypress/e2e/admin-search-page.cy.ts @@ -12,6 +12,9 @@ describe('Admin Search Page', () => { cy.get('ds-admin-search-page').should('be.visible'); // At least one search result should be displayed cy.get('[data-test="list-object"]').should('be.visible'); + // Click each filter toggle to open *every* filter + // (As we want to scan filter section for accessibility issues as well) + cy.get('[data-test="filter-toggle"]').click({ multiple: true }); // Analyze for accessibility issues testA11y('ds-admin-search-page'); }); diff --git a/cypress/e2e/admin-workflow-page.cy.ts b/cypress/e2e/admin-workflow-page.cy.ts index cd2275f584..c3c235e346 100644 --- a/cypress/e2e/admin-workflow-page.cy.ts +++ b/cypress/e2e/admin-workflow-page.cy.ts @@ -12,6 +12,9 @@ describe('Admin Workflow Page', () => { cy.get('ds-admin-workflow-page').should('be.visible'); // At least one search result should be displayed cy.get('[data-test="list-object"]').should('be.visible'); + // Click each filter toggle to open *every* filter + // (As we want to scan filter section for accessibility issues as well) + cy.get('[data-test="filter-toggle"]').click({ multiple: true }); // Analyze for accessibility issues testA11y('ds-admin-workflow-page'); }); diff --git a/cypress/e2e/bulk-access.cy.ts b/cypress/e2e/bulk-access.cy.ts index 4d199f53f9..87033e13e4 100644 --- a/cypress/e2e/bulk-access.cy.ts +++ b/cypress/e2e/bulk-access.cy.ts @@ -11,6 +11,11 @@ describe('Bulk Access', () => { it('should pass accessibility tests', () => { // Page must first be visible cy.get('ds-bulk-access').should('be.visible'); + // At least one search result should be displayed + cy.get('[data-test="list-object"]').should('be.visible'); + // Click each filter toggle to open *every* filter + // (As we want to scan filter section for accessibility issues as well) + cy.get('[data-test="filter-toggle"]').click({ multiple: true }); // Analyze for accessibility issues testA11y('ds-bulk-access', { rules: { @@ -18,6 +23,8 @@ describe('Bulk Access', () => { // Seem to require updating ng-bootstrap and https://github.com/DSpace/dspace-angular/issues/2216 'aria-required-children': { enabled: false }, 'nested-interactive': { enabled: false }, + // Card titles fail this test currently + 'heading-order': { enabled: false }, }, } as Options); }); diff --git a/cypress/e2e/health-page.cy.ts b/cypress/e2e/health-page.cy.ts index 91c68638ea..79ebf4bc04 100644 --- a/cypress/e2e/health-page.cy.ts +++ b/cypress/e2e/health-page.cy.ts @@ -1,13 +1,14 @@ import { testA11y } from 'cypress/support/utils'; import { Options } from 'cypress-axe'; -describe('Health Page', () => { - beforeEach(() => { - // Must login as an Admin to see the page - cy.visit('/health'); - cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); - }); +beforeEach(() => { + // Must login as an Admin to see the page + cy.visit('/health'); + cy.loginViaForm(Cypress.env('DSPACE_TEST_ADMIN_USER'), Cypress.env('DSPACE_TEST_ADMIN_PASSWORD')); +}); + +describe('Health Page > Status Tab', () => { it('should pass accessibility tests', () => { // Page must first be visible cy.get('ds-health-page').should('be.visible'); @@ -22,3 +23,21 @@ describe('Health Page', () => { } as Options); }); }); + +describe('Health Page > Info Tab', () => { + it('should pass accessibility tests', () => { + // Page must first be visible + cy.get('ds-health-page').should('be.visible'); + cy.get('a[data-test="health-page.info-tab"]').click(); + + // Analyze for accessibility issues + testA11y('ds-health-page', { + rules: { + // All panels are accordians & fail "aria-required-children" and "nested-interactive". + // Seem to require updating ng-bootstrap and https://github.com/DSpace/dspace-angular/issues/2216 + 'aria-required-children': { enabled: false }, + 'nested-interactive': { enabled: false }, + }, + } as Options); + }); +}); diff --git a/src/app/health-page/health-page.component.html b/src/app/health-page/health-page.component.html index d8cba1d46d..797ca0bc6e 100644 --- a/src/app/health-page/health-page.component.html +++ b/src/app/health-page/health-page.component.html @@ -3,7 +3,7 @@