mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-08 02:24:11 +00:00
Merge remote-tracking branch 'origin/main' into DSC-287-Show-an-error-page-if-the-REST-API-is-not-available
# Conflicts: # src/app/app-routing.module.ts
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -29,11 +29,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# https://github.com/actions/checkout
|
# https://github.com/actions/checkout
|
||||||
- name: Checkout codebase
|
- name: Checkout codebase
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# https://github.com/actions/setup-node
|
# https://github.com/actions/setup-node
|
||||||
- name: Install Node.js ${{ matrix.node-version }}
|
- name: Install Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v1
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ jobs:
|
|||||||
# Upload coverage reports to Codecov (for Node v12 only)
|
# Upload coverage reports to Codecov (for Node v12 only)
|
||||||
# https://github.com/codecov/codecov-action
|
# https://github.com/codecov/codecov-action
|
||||||
- name: Upload coverage to Codecov.io
|
- name: Upload coverage to Codecov.io
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v2
|
||||||
if: matrix.node-version == '12.x'
|
if: matrix.node-version == '12.x'
|
||||||
|
|
||||||
# Using docker-compose start backend using CI configuration
|
# Using docker-compose start backend using CI configuration
|
||||||
|
78
.github/workflows/docker.yml
vendored
Normal file
78
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
# DSpace Docker image build for hub.docker.com
|
||||||
|
name: Docker images
|
||||||
|
|
||||||
|
# Run this Build for all pushes to 'main' or maintenance branches, or tagged releases.
|
||||||
|
# Also run for PRs to ensure PR doesn't break Docker build process
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- 'dspace-**'
|
||||||
|
tags:
|
||||||
|
- 'dspace-**'
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
# 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
|
||||||
|
|
||||||
|
steps:
|
||||||
|
# https://github.com/actions/checkout
|
||||||
|
- name: Checkout codebase
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
# https://github.com/docker/setup-buildx-action
|
||||||
|
- name: Setup Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
# 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@v1
|
||||||
|
with:
|
||||||
|
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
|
||||||
|
id: meta_build
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
|
with:
|
||||||
|
images: dspace/dspace-angular
|
||||||
|
tags: ${{ env.IMAGE_TAGS }}
|
||||||
|
flavor: ${{ env.TAGS_FLAVOR }}
|
||||||
|
|
||||||
|
# https://github.com/docker/build-push-action
|
||||||
|
- name: Build and push 'dspace-angular' image
|
||||||
|
id: docker_build
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
file: ./Dockerfile
|
||||||
|
# For pull requests, we run the Docker build (to ensure no PR changes break the build),
|
||||||
|
# but we ONLY do an image push to DockerHub if it's NOT a PR
|
||||||
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
|
# Use tags / labels provided by 'docker/metadata-action' above
|
||||||
|
tags: ${{ steps.meta_build.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta_build.outputs.labels }}
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -3,5 +3,6 @@
|
|||||||
"i18n-ally.localesPaths": [
|
"i18n-ally.localesPaths": [
|
||||||
"src/assets/i18n",
|
"src/assets/i18n",
|
||||||
"src/app/core/locale"
|
"src/app/core/locale"
|
||||||
]
|
],
|
||||||
|
"typescript.tsdk": "node_modules\\typescript\\lib"
|
||||||
}
|
}
|
@@ -1,7 +1,7 @@
|
|||||||
# This image will be published as dspace/dspace-angular
|
# This image will be published as dspace/dspace-angular
|
||||||
# See https://dspace-labs.github.io/DSpace-Docker-Images/ for usage details
|
# See https://github.com/DSpace/dspace-angular/tree/main/docker for usage details
|
||||||
|
|
||||||
FROM node:12-alpine
|
FROM node:14-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ADD . /app/
|
ADD . /app/
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
|
18
LICENSE
18
LICENSE
@@ -1,4 +1,4 @@
|
|||||||
DSpace source code BSD License:
|
BSD 3-Clause License
|
||||||
|
|
||||||
Copyright (c) 2002-2021, LYRASIS. All rights reserved.
|
Copyright (c) 2002-2021, LYRASIS. All rights reserved.
|
||||||
|
|
||||||
@@ -13,13 +13,12 @@ notice, this list of conditions and the following disclaimer.
|
|||||||
notice, this list of conditions and the following disclaimer in the
|
notice, this list of conditions and the following disclaimer in the
|
||||||
documentation and/or other materials provided with the distribution.
|
documentation and/or other materials provided with the distribution.
|
||||||
|
|
||||||
- Neither the name DuraSpace nor the name of the DSpace Foundation
|
- Neither the name of the copyright holder nor the names of its
|
||||||
nor the names of its contributors may be used to endorse or promote
|
contributors may be used to endorse or promote products derived from
|
||||||
products derived from this software without specific prior written
|
this software without specific prior written permission.
|
||||||
permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||||
@@ -30,10 +29,3 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
|||||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
|
||||||
DAMAGE.
|
DAMAGE.
|
||||||
|
|
||||||
|
|
||||||
DSpace uses third-party libraries which may be distributed under
|
|
||||||
different licenses to the above. Information about these licenses
|
|
||||||
is detailed in the LICENSES_THIRD_PARTY file at the root of the source
|
|
||||||
tree. You must agree to the terms of these licenses, in addition to
|
|
||||||
the above DSpace source code license, in order to use this software.
|
|
||||||
|
28
NOTICE
Normal file
28
NOTICE
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
Licenses of Third-Party Libraries
|
||||||
|
=================================
|
||||||
|
|
||||||
|
DSpace uses third-party libraries which may be distributed under
|
||||||
|
different licenses than specified in our LICENSE file. Information
|
||||||
|
about these licenses is detailed in the LICENSES_THIRD_PARTY file at
|
||||||
|
the root of the source tree. You must agree to the terms of these
|
||||||
|
licenses, in addition to the DSpace source code license, in order to
|
||||||
|
use this software.
|
||||||
|
|
||||||
|
Licensing Notices
|
||||||
|
=================
|
||||||
|
|
||||||
|
[July 2019] DuraSpace joined with LYRASIS (another 501(c)3 organization) in July 2019.
|
||||||
|
LYRASIS holds the copyrights of DuraSpace.
|
||||||
|
|
||||||
|
[July 2009] Fedora Commons joined with the DSpace Foundation and began operating under
|
||||||
|
the new name DuraSpace in July 2009. DuraSpace holds the copyrights of
|
||||||
|
the DSpace Foundation, Inc.
|
||||||
|
|
||||||
|
[July 2007] The DSpace Foundation, Inc. is a 501(c)3 corporation established in July 2007
|
||||||
|
with a mission to promote and advance the dspace platform enabling management,
|
||||||
|
access and preservation of digital works. The Foundation was able to transfer
|
||||||
|
the legal copyright from Hewlett-Packard Company (HP) and Massachusetts
|
||||||
|
Institute of Technology (MIT) to the DSpace Foundation in October 2007. Many
|
||||||
|
of the files in the source code may contain a copyright statement stating HP
|
||||||
|
and MIT possess the copyright, in these instances please note that the copy
|
||||||
|
right has transferred to the DSpace foundation, and subsequently to DuraSpace.
|
@@ -449,4 +449,8 @@ DSpace uses GitHub to track issues:
|
|||||||
|
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
This project's source code is made available under the DSpace BSD License: http://www.dspace.org/license
|
DSpace source code is freely available under a standard [BSD 3-Clause license](https://opensource.org/licenses/BSD-3-Clause).
|
||||||
|
The full license is available in the [LICENSE](LICENSE) file or online at http://www.dspace.org/license/
|
||||||
|
|
||||||
|
DSpace uses third-party libraries which may be distributed under different licenses. Those licenses are listed
|
||||||
|
in the [LICENSES_THIRD_PARTY](LICENSES_THIRD_PARTY) file.
|
||||||
|
@@ -4,6 +4,20 @@
|
|||||||
:warning: **NOT PRODUCTION READY** The below Docker Compose resources are not guaranteed "production ready" at this time. They have been built for development/testing only. Therefore, DSpace Docker images may not be fully secured or up-to-date. While you are welcome to base your own images on these DSpace images/resources, these should not be used "as is" in any production scenario.
|
:warning: **NOT PRODUCTION READY** The below Docker Compose resources are not guaranteed "production ready" at this time. They have been built for development/testing only. Therefore, DSpace Docker images may not be fully secured or up-to-date. While you are welcome to base your own images on these DSpace images/resources, these should not be used "as is" in any production scenario.
|
||||||
***
|
***
|
||||||
|
|
||||||
|
## 'Dockerfile' in root directory
|
||||||
|
This Dockerfile is used to build a *development* DSpace 7 Angular UI image, published as 'dspace/dspace-angular'
|
||||||
|
|
||||||
|
```
|
||||||
|
docker build -t dspace/dspace-angular:dspace-7_x .
|
||||||
|
```
|
||||||
|
|
||||||
|
This image is built *automatically* after each commit is made to the `main` branch.
|
||||||
|
|
||||||
|
Admins to our DockerHub repo can manually publish with the following command.
|
||||||
|
```
|
||||||
|
docker push dspace/dspace-angular:dspace-7_x
|
||||||
|
```
|
||||||
|
|
||||||
## docker directory
|
## docker directory
|
||||||
- docker-compose.yml
|
- docker-compose.yml
|
||||||
- Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace 7 REST instance will also be started in Docker.
|
- Starts DSpace Angular with Docker Compose from the current branch. This file assumes that a DSpace 7 REST instance will also be started in Docker.
|
||||||
|
@@ -20,7 +20,7 @@ services:
|
|||||||
DSPACE_NAMESPACE: /
|
DSPACE_NAMESPACE: /
|
||||||
DSPACE_PORT: '4000'
|
DSPACE_PORT: '4000'
|
||||||
DSPACE_SSL: "false"
|
DSPACE_SSL: "false"
|
||||||
image: dspace/dspace-angular:latest
|
image: dspace/dspace-angular:dspace-7_x
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ..
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
66
package.json
66
package.json
@@ -63,26 +63,26 @@
|
|||||||
"webdriver-manager": "^12.1.8"
|
"webdriver-manager": "^12.1.8"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "~10.2.3",
|
"@angular/animations": "~11.2.14",
|
||||||
"@angular/cdk": "^10.2.6",
|
"@angular/cdk": "^11.2.13",
|
||||||
"@angular/common": "~10.2.3",
|
"@angular/common": "~11.2.14",
|
||||||
"@angular/compiler": "~10.2.3",
|
"@angular/compiler": "~11.2.14",
|
||||||
"@angular/core": "~10.2.3",
|
"@angular/core": "~11.2.14",
|
||||||
"@angular/forms": "~10.2.3",
|
"@angular/forms": "~11.2.14",
|
||||||
"@angular/localize": "10.2.3",
|
"@angular/localize": "11.2.14",
|
||||||
"@angular/platform-browser": "~10.2.3",
|
"@angular/platform-browser": "~11.2.14",
|
||||||
"@angular/platform-browser-dynamic": "~10.2.3",
|
"@angular/platform-browser-dynamic": "~11.2.14",
|
||||||
"@angular/platform-server": "~10.2.3",
|
"@angular/platform-server": "~11.2.14",
|
||||||
"@angular/router": "~10.2.3",
|
"@angular/router": "~11.2.14",
|
||||||
"@angularclass/bootloader": "1.0.1",
|
"@angularclass/bootloader": "1.0.1",
|
||||||
"@kolkov/ngx-gallery": "^1.2.3",
|
"@kolkov/ngx-gallery": "^1.2.3",
|
||||||
"@ng-bootstrap/ng-bootstrap": "7.0.0",
|
"@ng-bootstrap/ng-bootstrap": "9.1.3",
|
||||||
"@ng-dynamic-forms/core": "^12.0.0",
|
"@ng-dynamic-forms/core": "^13.0.0",
|
||||||
"@ng-dynamic-forms/ui-ng-bootstrap": "^12.0.0",
|
"@ng-dynamic-forms/ui-ng-bootstrap": "^13.0.0",
|
||||||
"@ngrx/effects": "^10.0.1",
|
"@ngrx/effects": "^11.1.1",
|
||||||
"@ngrx/router-store": "^10.0.1",
|
"@ngrx/router-store": "^11.1.1",
|
||||||
"@ngrx/store": "^10.0.1",
|
"@ngrx/store": "^11.1.1",
|
||||||
"@nguniversal/express-engine": "10.1.0",
|
"@nguniversal/express-engine": "11.2.1",
|
||||||
"@ngx-translate/core": "^13.0.0",
|
"@ngx-translate/core": "^13.0.0",
|
||||||
"@nicky-lenaers/ngx-scroll-to": "^9.0.0",
|
"@nicky-lenaers/ngx-scroll-to": "^9.0.0",
|
||||||
"angular-idle-preload": "3.0.0",
|
"angular-idle-preload": "3.0.0",
|
||||||
@@ -115,13 +115,13 @@
|
|||||||
"mirador-share-plugin": "^0.10.0",
|
"mirador-share-plugin": "^0.10.0",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"morgan": "^1.10.0",
|
"morgan": "^1.10.0",
|
||||||
"ng-mocks": "10.5.4",
|
"ng-mocks": "11.11.2",
|
||||||
"ng2-file-upload": "1.4.0",
|
"ng2-file-upload": "1.4.0",
|
||||||
"ng2-nouislider": "^1.8.3",
|
"ng2-nouislider": "^1.8.3",
|
||||||
"ngx-infinite-scroll": "^10.0.1",
|
"ngx-infinite-scroll": "^10.0.1",
|
||||||
"ngx-moment": "^5.0.0",
|
"ngx-moment": "^5.0.0",
|
||||||
"ngx-pagination": "5.0.0",
|
"ngx-pagination": "5.0.0",
|
||||||
"ngx-sortablejs": "^10.0.0",
|
"ngx-sortablejs": "^11.1.0",
|
||||||
"nouislider": "^14.6.3",
|
"nouislider": "^14.6.3",
|
||||||
"pem": "1.14.4",
|
"pem": "1.14.4",
|
||||||
"postcss-cli": "^8.3.0",
|
"postcss-cli": "^8.3.0",
|
||||||
@@ -138,25 +138,25 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-builders/custom-webpack": "10.0.1",
|
"@angular-builders/custom-webpack": "10.0.1",
|
||||||
"@angular-devkit/build-angular": "~0.1002.3",
|
"@angular-devkit/build-angular": "~0.1102.15",
|
||||||
"@angular/cli": "~10.2.0",
|
"@angular/cli": "~11.2.15",
|
||||||
"@angular/compiler-cli": "~10.2.3",
|
"@angular/compiler-cli": "~11.2.14",
|
||||||
"@angular/language-service": "~10.2.3",
|
"@angular/language-service": "~11.2.14",
|
||||||
"@cypress/schematic": "^1.5.0",
|
"@cypress/schematic": "^1.5.0",
|
||||||
"@fortawesome/fontawesome-free": "^5.5.0",
|
"@fortawesome/fontawesome-free": "^5.5.0",
|
||||||
"@ngrx/store-devtools": "^10.0.1",
|
"@ngrx/store-devtools": "^11.1.1",
|
||||||
"@ngtools/webpack": "10.2.3",
|
"@ngtools/webpack": "10.2.3",
|
||||||
"@nguniversal/builders": "~10.1.0",
|
"@nguniversal/builders": "~11.2.1",
|
||||||
"@types/deep-freeze": "0.1.2",
|
"@types/deep-freeze": "0.1.2",
|
||||||
"@types/express": "^4.17.9",
|
"@types/express": "^4.17.9",
|
||||||
"@types/file-saver": "^2.0.1",
|
"@types/file-saver": "^2.0.1",
|
||||||
"@types/jasmine": "^3.6.2",
|
"@types/jasmine": "~3.6.0",
|
||||||
"@types/jasminewd2": "~2.0.8",
|
"@types/jasminewd2": "~2.0.8",
|
||||||
"@types/js-cookie": "2.2.6",
|
"@types/js-cookie": "2.2.6",
|
||||||
"@types/lodash": "^4.14.165",
|
"@types/lodash": "^4.14.165",
|
||||||
"@types/node": "^14.14.9",
|
"@types/node": "^14.14.9",
|
||||||
"axe-core": "^4.3.3",
|
"axe-core": "^4.3.3",
|
||||||
"codelyzer": "^6.0.1",
|
"codelyzer": "^6.0.0",
|
||||||
"compression-webpack-plugin": "^3.0.1",
|
"compression-webpack-plugin": "^3.0.1",
|
||||||
"copy-webpack-plugin": "^6.4.1",
|
"copy-webpack-plugin": "^6.4.1",
|
||||||
"css-loader": "3.4.0",
|
"css-loader": "3.4.0",
|
||||||
@@ -169,14 +169,14 @@
|
|||||||
"fork-ts-checker-webpack-plugin": "^6.0.3",
|
"fork-ts-checker-webpack-plugin": "^6.0.3",
|
||||||
"html-loader": "^1.3.2",
|
"html-loader": "^1.3.2",
|
||||||
"html-webpack-plugin": "^4.5.0",
|
"html-webpack-plugin": "^4.5.0",
|
||||||
"jasmine-core": "^3.6.0",
|
"jasmine-core": "~3.6.0",
|
||||||
"jasmine-marbles": "0.6.0",
|
"jasmine-marbles": "0.6.0",
|
||||||
"jasmine-spec-reporter": "^6.0.0",
|
"jasmine-spec-reporter": "~5.0.0",
|
||||||
"karma": "^5.2.3",
|
"karma": "^5.2.3",
|
||||||
"karma-chrome-launcher": "^3.1.0",
|
"karma-chrome-launcher": "~3.1.0",
|
||||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||||
"karma-jasmine": "^4.0.1",
|
"karma-jasmine": "~4.0.0",
|
||||||
"karma-jasmine-html-reporter": "^1.5.4",
|
"karma-jasmine-html-reporter": "^1.5.0",
|
||||||
"karma-mocha-reporter": "2.2.5",
|
"karma-mocha-reporter": "2.2.5",
|
||||||
"nodemon": "^2.0.2",
|
"nodemon": "^2.0.2",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
|
@@ -216,7 +216,8 @@ import { ServerCheckGuard } from './core/server-check/server-check.guard';
|
|||||||
}
|
}
|
||||||
], {
|
], {
|
||||||
onSameUrlNavigation: 'reload',
|
onSameUrlNavigation: 'reload',
|
||||||
})
|
relativeLinkResolution: 'legacy'
|
||||||
|
})
|
||||||
],
|
],
|
||||||
exports: [RouterModule],
|
exports: [RouterModule],
|
||||||
})
|
})
|
||||||
|
@@ -5,9 +5,10 @@
|
|||||||
<p [innerHTML]="'collection.edit.item-mapper.collection' | translate:{ name: (collectionName$ |async) }" id="collection-name"></p>
|
<p [innerHTML]="'collection.edit.item-mapper.collection' | translate:{ name: (collectionName$ |async) }" id="collection-name"></p>
|
||||||
<p>{{'collection.edit.item-mapper.description' | translate}}</p>
|
<p>{{'collection.edit.item-mapper.description' | translate}}</p>
|
||||||
|
|
||||||
<ngb-tabset (tabChange)="tabChange($event)" [destroyOnHide]="true" #tabs="ngbTabset">
|
<ul ngbNav (navChange)="tabChange($event)" [destroyOnHide]="true" #tabs="ngbNav" class="nav-tabs">
|
||||||
<ngb-tab title="{{'collection.edit.item-mapper.tabs.browse' | translate}}" id="browseTab">
|
<li [ngbNavItem]="'browseTab'">
|
||||||
<ng-template ngbTabContent>
|
<a ngbNavLink>{{'collection.edit.item-mapper.tabs.browse' | translate}}</a>
|
||||||
|
<ng-template ngbNavContent>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<ds-item-select class="mt-2"
|
<ds-item-select class="mt-2"
|
||||||
[key]="'browse'"
|
[key]="'browse'"
|
||||||
@@ -21,9 +22,10 @@
|
|||||||
(cancel)="onCancel()"></ds-item-select>
|
(cancel)="onCancel()"></ds-item-select>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngb-tab>
|
</li>
|
||||||
<ngb-tab title="{{'collection.edit.item-mapper.tabs.map' | translate}}" id="mapTab">
|
<li [ngbNavItem]="'mapTab'">
|
||||||
<ng-template ngbTabContent>
|
<a ngbNavLink>{{'collection.edit.item-mapper.tabs.map' | translate}}</a>
|
||||||
|
<ng-template ngbNavContent>
|
||||||
<div class="row mt-2">
|
<div class="row mt-2">
|
||||||
<div class="col-12 col-lg-6">
|
<div class="col-12 col-lg-6">
|
||||||
<ds-search-form id="search-form"
|
<ds-search-form id="search-form"
|
||||||
@@ -52,8 +54,9 @@
|
|||||||
{{'collection.edit.item-mapper.no-search' | translate}}
|
{{'collection.edit.item-mapper.no-search' | translate}}
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngb-tab>
|
</li>
|
||||||
</ngb-tabset>
|
</ul>
|
||||||
|
<div [ngbNavOutlet]="tabs"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -5,9 +5,10 @@
|
|||||||
<p [innerHTML]="'item.edit.item-mapper.item' | translate:{ name: (itemName$ | async) }" id="item-name"></p>
|
<p [innerHTML]="'item.edit.item-mapper.item' | translate:{ name: (itemName$ | async) }" id="item-name"></p>
|
||||||
<p>{{'item.edit.item-mapper.description' | translate}}</p>
|
<p>{{'item.edit.item-mapper.description' | translate}}</p>
|
||||||
|
|
||||||
<ngb-tabset (tabChange)="tabChange($event)" [destroyOnHide]="true" #tabs="ngbTabset">
|
<ul ngbNav (navChange)="tabChange($event)" [destroyOnHide]="true" #tabs="ngbNav" class="nav-tabs">
|
||||||
<ngb-tab title="{{'item.edit.item-mapper.tabs.browse' | translate}}" id="browseTab">
|
<li [ngbNavItem]="'browseTab'">
|
||||||
<ng-template ngbTabContent>
|
<a ngbNavLink>{{'item.edit.item-mapper.tabs.browse' | translate}}</a>
|
||||||
|
<ng-template ngbNavContent>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<ds-collection-select class="mt-2"
|
<ds-collection-select class="mt-2"
|
||||||
[key]="'browse'"
|
[key]="'browse'"
|
||||||
@@ -20,9 +21,10 @@
|
|||||||
(cancel)="onCancel()"></ds-collection-select>
|
(cancel)="onCancel()"></ds-collection-select>
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngb-tab>
|
</li>
|
||||||
<ngb-tab title="{{'item.edit.item-mapper.tabs.map' | translate}}" id="mapTab">
|
<li [ngbNavItem]="'mapTab'">
|
||||||
<ng-template ngbTabContent>
|
<a ngbNavLink>{{'item.edit.item-mapper.tabs.map' | translate}}</a>
|
||||||
|
<ng-template ngbNavContent>
|
||||||
<div class="row mt-2">
|
<div class="row mt-2">
|
||||||
<div class="col-12 col-lg-6">
|
<div class="col-12 col-lg-6">
|
||||||
<ds-search-form id="search-form"
|
<ds-search-form id="search-form"
|
||||||
@@ -50,8 +52,9 @@
|
|||||||
{{'item.edit.item-mapper.no-search' | translate}}
|
{{'item.edit.item-mapper.no-search' | translate}}
|
||||||
</div>
|
</div>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ngb-tab>
|
</li>
|
||||||
</ngb-tabset>
|
</ul>
|
||||||
|
<div [ngbNavOutlet]="tabs"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { NgxGalleryOptions } from '@kolkov/ngx-gallery';
|
import { NgxGalleryOptions } from '@kolkov/ngx-gallery';
|
||||||
import { Bitstream } from '../../../core/shared/bitstream.model';
|
import { Bitstream } from '../../../core/shared/bitstream.model';
|
||||||
import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model';
|
import { MediaViewerItem } from '../../../core/shared/media-viewer-item.model';
|
||||||
@@ -55,7 +55,7 @@ describe('MediaViewerImageComponent', () => {
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports:[],
|
imports:[],
|
||||||
declarations: [MediaViewerImageComponent],
|
declarations: [MediaViewerImageComponent],
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
@@ -17,7 +17,7 @@ describe('MediaViewerVideoComponent', () => {
|
|||||||
let component: MediaViewerVideoComponent;
|
let component: MediaViewerVideoComponent;
|
||||||
let fixture: ComponentFixture<MediaViewerVideoComponent>;
|
let fixture: ComponentFixture<MediaViewerVideoComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { Bitstream } from '../../core/shared/bitstream.model';
|
import { Bitstream } from '../../core/shared/bitstream.model';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../shared/remote-data.utils';
|
||||||
import { createPaginatedList } from '../../shared/testing/utils.test';
|
import { createPaginatedList } from '../../shared/testing/utils.test';
|
||||||
@@ -60,7 +60,7 @@ describe('MediaViewerComponent', () => {
|
|||||||
{ bitstream: mockBitstream, format: 'image', thumbnail: null }
|
{ bitstream: mockBitstream, format: 'image', thumbnail: null }
|
||||||
);
|
);
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
|
@@ -1,17 +1,21 @@
|
|||||||
<ngb-tabset *ngIf="relationTypes.length > 1" [destroyOnHide]="true" #tabs="ngbTabset" [activeId]="activeTab$ | async" (tabChange)="onTabChange($event)">
|
<ng-container *ngIf="relationTypes.length > 1">
|
||||||
<ngb-tab *ngFor="let relationType of relationTypes" title="{{'item.page.relationships.' + relationType.label | translate}}" [id]="relationType.filter">
|
<ul ngbNav #tabs="ngbNav" [destroyOnHide]="true" [activeId]="activeTab$ | async" (navChange)="onTabChange($event)" class="nav-tabs">
|
||||||
<ng-template ngbTabContent>
|
<li *ngFor="let relationType of relationTypes" [ngbNavItem]="relationType.filter">
|
||||||
<div class="mt-4">
|
<a ngbNavLink>{{'item.page.relationships.' + relationType.label | translate}}</a>
|
||||||
<ds-related-entities-search [item]="item"
|
<ng-template ngbNavContent>
|
||||||
[relationType]="relationType.filter"
|
<div class="mt-4">
|
||||||
[configuration]="relationType.configuration"
|
<ds-related-entities-search [item]="item"
|
||||||
[searchEnabled]="searchEnabled"
|
[relationType]="relationType.filter"
|
||||||
[sideBarWidth]="sideBarWidth">
|
[configuration]="relationType.configuration"
|
||||||
</ds-related-entities-search>
|
[searchEnabled]="searchEnabled"
|
||||||
</div>
|
[sideBarWidth]="sideBarWidth">
|
||||||
</ng-template>
|
</ds-related-entities-search>
|
||||||
</ngb-tab>
|
</div>
|
||||||
</ngb-tabset>
|
</ng-template>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div [ngbNavOutlet]="tabs"></div>
|
||||||
|
</ng-container>
|
||||||
<div *ngIf="relationTypes.length === 1" class="mt-4">
|
<div *ngIf="relationTypes.length === 1" class="mt-4">
|
||||||
<ds-related-entities-search *ngVar="relationTypes[0] as relationType" [item]="item"
|
<ds-related-entities-search *ngVar="relationTypes[0] as relationType" [item]="item"
|
||||||
[relationType]="relationType.filter"
|
[relationType]="relationType.filter"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
@@ -75,7 +75,7 @@ describe('MyDSpaceNewExternalDropdownComponent test', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
describe('With only one Entity', () => {
|
describe('With only one Entity', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@@ -126,7 +126,7 @@ describe('MyDSpaceNewExternalDropdownComponent test', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('With more than one Entity', () => {
|
describe('With more than one Entity', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, inject, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
@@ -79,7 +79,7 @@ describe('MyDSpaceNewSubmissionDropdownComponent test', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
describe('With only one Entity', () => {
|
describe('With only one Entity', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@@ -130,7 +130,7 @@ describe('MyDSpaceNewSubmissionDropdownComponent test', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('With more than one Entity', () => {
|
describe('With more than one Entity', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { AuthService } from '../../core/auth/auth.service';
|
import { AuthService } from '../../core/auth/auth.service';
|
||||||
import { FileService } from '../../core/shared/file.service';
|
import { FileService } from '../../core/shared/file.service';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
@@ -77,7 +77,7 @@ describe('BitstreamDownloadPageComponent', () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
describe('init', () => {
|
describe('init', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
initTestbed();
|
initTestbed();
|
||||||
}));
|
}));
|
||||||
@@ -93,7 +93,7 @@ describe('BitstreamDownloadPageComponent', () => {
|
|||||||
|
|
||||||
describe('bitstream retrieval', () => {
|
describe('bitstream retrieval', () => {
|
||||||
describe('when the user is authorized and not logged in', () => {
|
describe('when the user is authorized and not logged in', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
|
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ describe('BitstreamDownloadPageComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('when the user is authorized and logged in', () => {
|
describe('when the user is authorized and logged in', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
initTestbed();
|
initTestbed();
|
||||||
}));
|
}));
|
||||||
@@ -123,7 +123,7 @@ describe('BitstreamDownloadPageComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('when the user is not authorized and logged in', () => {
|
describe('when the user is not authorized and logged in', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));
|
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));
|
||||||
initTestbed();
|
initTestbed();
|
||||||
@@ -138,7 +138,7 @@ describe('BitstreamDownloadPageComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('when the user is not authorized and not logged in', () => {
|
describe('when the user is not authorized and not logged in', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
|
(authService.isAuthenticated as jasmine.Spy).and.returnValue(observableOf(false));
|
||||||
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));
|
(authorizationService.isAuthorized as jasmine.Spy).and.returnValue(observableOf(false));
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li *ngFor="let object of objects?.payload?.page" class="mt-4 mb-4">
|
<li *ngFor="let object of objects?.payload?.page" class="mt-4 mb-4">
|
||||||
<ds-listable-object-component-loader [object]="object"></ds-listable-object-component-loader>
|
<ds-listable-object-component-loader [object]="object" [viewMode]="viewMode"></ds-listable-object-component-loader>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div>
|
<div>
|
||||||
|
@@ -2,7 +2,7 @@ import { BrowseByComponent } from './browse-by.component';
|
|||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { NO_ERRORS_SCHEMA } from '@angular/core';
|
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
import { SharedModule } from '../shared.module';
|
import { SharedModule } from '../shared.module';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
@@ -18,17 +18,31 @@ import { PaginationComponentOptions } from '../pagination/pagination-component-o
|
|||||||
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model';
|
||||||
import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils';
|
||||||
import { storeModuleConfig } from '../../app.reducer';
|
import { storeModuleConfig } from '../../app.reducer';
|
||||||
import { FindListOptions } from '../../core/data/request.models';
|
|
||||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||||
import { PaginationServiceStub } from '../testing/pagination-service.stub';
|
import { PaginationServiceStub } from '../testing/pagination-service.stub';
|
||||||
|
import { ListableObjectComponentLoaderComponent } from '../object-collection/shared/listable-object/listable-object-component-loader.component';
|
||||||
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
|
import { BrowseEntryListElementComponent } from '../object-list/browse-entry-list-element/browse-entry-list-element.component';
|
||||||
|
import {
|
||||||
|
DEFAULT_CONTEXT,
|
||||||
|
listableObjectComponent,
|
||||||
|
} from '../object-collection/shared/listable-object/listable-object.decorator';
|
||||||
|
import { BrowseEntry } from '../../core/shared/browse-entry.model';
|
||||||
|
import { ITEM } from '../../core/shared/item.resource-type';
|
||||||
import { ThemeService } from '../theme-support/theme.service';
|
import { ThemeService } from '../theme-support/theme.service';
|
||||||
|
import SpyObj = jasmine.SpyObj;
|
||||||
|
|
||||||
|
@listableObjectComponent(BrowseEntry, ViewMode.ListElement, DEFAULT_CONTEXT, 'custom')
|
||||||
|
@Component({
|
||||||
|
selector: 'ds-browse-entry-list-element',
|
||||||
|
template: ''
|
||||||
|
})
|
||||||
|
class MockThemedBrowseEntryListElementComponent {}
|
||||||
|
|
||||||
describe('BrowseByComponent', () => {
|
describe('BrowseByComponent', () => {
|
||||||
let comp: BrowseByComponent;
|
let comp: BrowseByComponent;
|
||||||
let fixture: ComponentFixture<BrowseByComponent>;
|
let fixture: ComponentFixture<BrowseByComponent>;
|
||||||
|
|
||||||
let themeService: ThemeService;
|
|
||||||
|
|
||||||
const mockItems = [
|
const mockItems = [
|
||||||
Object.assign(new Item(), {
|
Object.assign(new Item(), {
|
||||||
id: 'fakeId-1',
|
id: 'fakeId-1',
|
||||||
@@ -59,9 +73,12 @@ describe('BrowseByComponent', () => {
|
|||||||
});
|
});
|
||||||
const paginationService = new PaginationServiceStub(paginationConfig);
|
const paginationService = new PaginationServiceStub(paginationConfig);
|
||||||
|
|
||||||
|
let themeService: SpyObj<ThemeService>;
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
themeService = jasmine.createSpyObj('themeService', {
|
themeService = jasmine.createSpyObj('themeService', {
|
||||||
getThemeName: 'dspace',
|
getThemeName: 'dspace',
|
||||||
|
getThemeName$: observableOf('dspace'),
|
||||||
});
|
});
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -82,6 +99,7 @@ describe('BrowseByComponent', () => {
|
|||||||
declarations: [],
|
declarations: [],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: PaginationService, useValue: paginationService},
|
{provide: PaginationService, useValue: paginationService},
|
||||||
|
{provide: MockThemedBrowseEntryListElementComponent},
|
||||||
{ provide: ThemeService, useValue: themeService },
|
{ provide: ThemeService, useValue: themeService },
|
||||||
],
|
],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
@@ -170,4 +188,67 @@ describe('BrowseByComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('when enableArrows is true and browseEntries are provided', () => {
|
||||||
|
let browseEntries;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
browseEntries = [
|
||||||
|
Object.assign(new BrowseEntry(), {
|
||||||
|
type: ITEM,
|
||||||
|
authority: 'authority key 1',
|
||||||
|
value: 'browse entry 1',
|
||||||
|
language: null,
|
||||||
|
count: 1,
|
||||||
|
}),
|
||||||
|
Object.assign(new BrowseEntry(), {
|
||||||
|
type: ITEM,
|
||||||
|
authority: null,
|
||||||
|
value: 'browse entry 2',
|
||||||
|
language: null,
|
||||||
|
count: 4,
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
|
||||||
|
comp.enableArrows = true;
|
||||||
|
comp.objects$ = createSuccessfulRemoteDataObject$(buildPaginatedList(new PageInfo(), browseEntries));
|
||||||
|
comp.paginationConfig = paginationConfig;
|
||||||
|
comp.sortConfig = Object.assign(new SortOptions('dc.title', SortDirection.ASC));
|
||||||
|
// NOTE: do NOT trigger change detection until the theme is set, such that the theme can be picked up as well
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('when theme is base', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
themeService.getThemeName.and.returnValue('base');
|
||||||
|
themeService.getThemeName$.and.returnValue(observableOf('base'));
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should use the base component to render browse entries', () => {
|
||||||
|
const componentLoaders = fixture.debugElement.queryAll(By.directive(ListableObjectComponentLoaderComponent));
|
||||||
|
expect(componentLoaders.length).toEqual(browseEntries.length);
|
||||||
|
componentLoaders.forEach((componentLoader) => {
|
||||||
|
const browseEntry = componentLoader.query(By.css('ds-browse-entry-list-element'));
|
||||||
|
expect(browseEntry.componentInstance).toBeInstanceOf(BrowseEntryListElementComponent);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('when theme is custom', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
themeService.getThemeName.and.returnValue('custom');
|
||||||
|
themeService.getThemeName$.and.returnValue(observableOf('custom'));
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should use the themed component to render browse entries', () => {
|
||||||
|
const componentLoaders = fixture.debugElement.queryAll(By.directive(ListableObjectComponentLoaderComponent));
|
||||||
|
expect(componentLoaders.length).toEqual(browseEntries.length);
|
||||||
|
componentLoaders.forEach((componentLoader) => {
|
||||||
|
const browseEntry = componentLoader.query(By.css('ds-browse-entry-list-element'));
|
||||||
|
expect(browseEntry.componentInstance).toBeInstanceOf(MockThemedBrowseEntryListElementComponent);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@@ -8,6 +8,7 @@ import { Observable } from 'rxjs';
|
|||||||
import { ListableObject } from '../object-collection/shared/listable-object.model';
|
import { ListableObject } from '../object-collection/shared/listable-object.model';
|
||||||
import { getStartsWithComponent, StartsWithType } from '../starts-with/starts-with-decorator';
|
import { getStartsWithComponent, StartsWithType } from '../starts-with/starts-with-decorator';
|
||||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||||
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-browse-by',
|
selector: 'ds-browse-by',
|
||||||
@@ -22,6 +23,12 @@ import { PaginationService } from '../../core/pagination/pagination.service';
|
|||||||
* Component to display a browse-by page for any ListableObject
|
* Component to display a browse-by page for any ListableObject
|
||||||
*/
|
*/
|
||||||
export class BrowseByComponent implements OnInit {
|
export class BrowseByComponent implements OnInit {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ViewMode that should be passed to {@link ListableObjectComponentLoaderComponent}.
|
||||||
|
*/
|
||||||
|
viewMode: ViewMode = ViewMode.ListElement;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The i18n message to display as title
|
* The i18n message to display as title
|
||||||
*/
|
*/
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
class="form-control"
|
class="form-control"
|
||||||
(click)="$event.stopPropagation();"
|
(click)="$event.stopPropagation();"
|
||||||
placeholder="{{'dso-selector.placeholder' | translate: { type: typesString } }}"
|
placeholder="{{'dso-selector.placeholder' | translate: { type: typesString } }}"
|
||||||
[formControl]="input" dsAutoFocus (keyup.enter)="selectSingleResult()">
|
[formControl]="input" ngbAutofocus (keyup.enter)="selectSingleResult()">
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<div class="scrollable-menu list-group">
|
<div class="scrollable-menu list-group">
|
||||||
|
@@ -7,59 +7,64 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ds-loading *ngIf="!item || !collection"></ds-loading>
|
<ds-loading *ngIf="!item || !collection"></ds-loading>
|
||||||
<ngb-tabset *ngIf="item && collection">
|
<ng-container *ngIf="item && collection">
|
||||||
<ngb-tab [title]="'submission.sections.describe.relationship-lookup.search-tab.tab-title.' + relationshipOptions.relationshipType | translate : {count: (totalInternal$ | async)}">
|
<ul ngbNav #nav="ngbNav" class="nav-tabs">
|
||||||
<ng-template ngbTabContent>
|
<li ngbNavItem>
|
||||||
<ds-dynamic-lookup-relation-search-tab
|
<a ngbNavLink>{{'submission.sections.describe.relationship-lookup.search-tab.tab-title.' + relationshipOptions.relationshipType | translate : { count: (totalInternal$ | async)} }}</a>
|
||||||
[selection$]="selection$"
|
<ng-template ngbNavContent>
|
||||||
[listId]="listId"
|
<ds-dynamic-lookup-relation-search-tab
|
||||||
[relationship]="relationshipOptions"
|
[selection$]="selection$"
|
||||||
[repeatable]="repeatable"
|
[listId]="listId"
|
||||||
[context]="context"
|
[relationship]="relationshipOptions"
|
||||||
[query]="query"
|
[repeatable]="repeatable"
|
||||||
[relationshipType]="relationshipType"
|
[context]="context"
|
||||||
[isLeft]="isLeft"
|
[query]="query"
|
||||||
[item]="item"
|
[relationshipType]="relationshipType"
|
||||||
[isEditRelationship]="isEditRelationship"
|
[isLeft]="isLeft"
|
||||||
[toRemove]="toRemove"
|
[item]="item"
|
||||||
(selectObject)="select($event)"
|
[isEditRelationship]="isEditRelationship"
|
||||||
(deselectObject)="deselect($event)"
|
[toRemove]="toRemove"
|
||||||
class="d-block pt-3">
|
(selectObject)="select($event)"
|
||||||
</ds-dynamic-lookup-relation-search-tab>
|
(deselectObject)="deselect($event)"
|
||||||
</ng-template>
|
class="d-block pt-3">
|
||||||
</ngb-tab>
|
</ds-dynamic-lookup-relation-search-tab>
|
||||||
<ngb-tab *ngFor="let source of (externalSourcesRD$ | async); let idx = index"
|
</ng-template>
|
||||||
[title]="'submission.sections.describe.relationship-lookup.search-tab.tab-title.' + source.id | translate : {count: (totalExternal$ | async)[idx]}">
|
</li>
|
||||||
<ng-template ngbTabContent>
|
<li ngbNavItem *ngFor="let source of (externalSourcesRD$ | async); let idx = index">
|
||||||
<ds-dynamic-lookup-relation-external-source-tab
|
<a ngbNavLink>{{'submission.sections.describe.relationship-lookup.search-tab.tab-title.' + source.id | translate : { count: (totalExternal$ | async)[idx] } }}</a>
|
||||||
[label]="label"
|
<ng-template ngbNavContent>
|
||||||
[listId]="listId"
|
<ds-dynamic-lookup-relation-external-source-tab
|
||||||
[repeatable]="repeatable"
|
[label]="label"
|
||||||
[item]="item"
|
[listId]="listId"
|
||||||
[collection]="collection"
|
[repeatable]="repeatable"
|
||||||
[relationship]="relationshipOptions"
|
[item]="item"
|
||||||
[context]="context"
|
[collection]="collection"
|
||||||
[externalSource]="source"
|
[relationship]="relationshipOptions"
|
||||||
(importedObject)="imported($event)"
|
[context]="context"
|
||||||
class="d-block pt-3">
|
[externalSource]="source"
|
||||||
</ds-dynamic-lookup-relation-external-source-tab>
|
(importedObject)="imported($event)"
|
||||||
</ng-template>
|
class="d-block pt-3">
|
||||||
</ngb-tab>
|
</ds-dynamic-lookup-relation-external-source-tab>
|
||||||
<ngb-tab *ngIf="!isEditRelationship" [title]="'submission.sections.describe.relationship-lookup.selection-tab.tab-title' | translate : {count: (selection$ | async)?.length}">
|
</ng-template>
|
||||||
<ng-template ngbTabContent>
|
</li>
|
||||||
<ds-dynamic-lookup-relation-selection-tab
|
<li ngbNavItem *ngIf="!isEditRelationship">
|
||||||
[selection$]="selection$"
|
<a ngbNavLink>{{'submission.sections.describe.relationship-lookup.selection-tab.tab-title' | translate : { count: (selection$ | async)?.length } }}</a>
|
||||||
[listId]="listId"
|
<ng-template ngbNavContent>
|
||||||
[relationshipType]="relationshipOptions.relationshipType"
|
<ds-dynamic-lookup-relation-selection-tab
|
||||||
[repeatable]="repeatable"
|
[selection$]="selection$"
|
||||||
[context]="context"
|
[listId]="listId"
|
||||||
(selectObject)="select($event)"
|
[relationshipType]="relationshipOptions.relationshipType"
|
||||||
(deselectObject)="deselect($event)"
|
[repeatable]="repeatable"
|
||||||
class="d-block pt-3">
|
[context]="context"
|
||||||
</ds-dynamic-lookup-relation-selection-tab>
|
(selectObject)="select($event)"
|
||||||
</ng-template>
|
(deselectObject)="deselect($event)"
|
||||||
</ngb-tab>
|
class="d-block pt-3">
|
||||||
</ngb-tabset>
|
</ds-dynamic-lookup-relation-selection-tab>
|
||||||
|
</ng-template>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div [ngbNavOutlet]="nav"></div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<small>{{ ('submission.sections.describe.relationship-lookup.selected' | translate: {size: (selection$ | async)?.length || 0}) }}</small>
|
<small>{{ ('submission.sections.describe.relationship-lookup.selected' | translate: {size: (selection$ | async)?.length || 0}) }}</small>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
@@ -60,7 +60,7 @@ mockResultObject.indexableObject = Object.assign(new ClaimedTask(), { workflowit
|
|||||||
const linkService = getMockLinkService();
|
const linkService = getMockLinkService();
|
||||||
|
|
||||||
describe('ClaimedApprovedSearchResultListElementComponent', () => {
|
describe('ClaimedApprovedSearchResultListElementComponent', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [NoopAnimationsModule],
|
imports: [NoopAnimationsModule],
|
||||||
declarations: [ClaimedApprovedSearchResultListElementComponent, VarDirective],
|
declarations: [ClaimedApprovedSearchResultListElementComponent, VarDirective],
|
||||||
@@ -75,7 +75,7 @@ describe('ClaimedApprovedSearchResultListElementComponent', () => {
|
|||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
fixture = TestBed.createComponent(ClaimedApprovedSearchResultListElementComponent);
|
fixture = TestBed.createComponent(ClaimedApprovedSearchResultListElementComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
}));
|
}));
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
@@ -60,7 +60,7 @@ mockResultObject.indexableObject = Object.assign(new ClaimedTask(), { workflowit
|
|||||||
const linkService = getMockLinkService();
|
const linkService = getMockLinkService();
|
||||||
|
|
||||||
describe('ClaimedDeclinedSearchResultListElementComponent', () => {
|
describe('ClaimedDeclinedSearchResultListElementComponent', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [NoopAnimationsModule],
|
imports: [NoopAnimationsModule],
|
||||||
declarations: [ClaimedDeclinedSearchResultListElementComponent, VarDirective],
|
declarations: [ClaimedDeclinedSearchResultListElementComponent, VarDirective],
|
||||||
@@ -75,7 +75,7 @@ describe('ClaimedDeclinedSearchResultListElementComponent', () => {
|
|||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
fixture = TestBed.createComponent(ClaimedDeclinedSearchResultListElementComponent);
|
fixture = TestBed.createComponent(ClaimedDeclinedSearchResultListElementComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
}));
|
}));
|
||||||
|
@@ -8,19 +8,24 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<label for="ResourcePolicyObject">{{'resource-policies.form.eperson-group-list.label' | translate}}</label>
|
<label for="ResourcePolicyObject">{{'resource-policies.form.eperson-group-list.label' | translate}}</label>
|
||||||
<input id="ResourcePolicyObject" class="form-control mb-3" type="text" readonly [value]="resourcePolicyTargetName$ | async">
|
<input id="ResourcePolicyObject" class="form-control mb-3" type="text" readonly [value]="resourcePolicyTargetName$ | async">
|
||||||
<ngb-tabset *ngIf="canSetGrant()" type="pills">
|
<ng-container *ngIf="canSetGrant()">
|
||||||
<ngb-tab [title]="'resource-policies.form.eperson-group-list.tab.eperson' | translate">
|
<ul ngbNav #nav="ngbNav" class="nav-pills">
|
||||||
<ng-template ngbTabContent>
|
<li ngbNavItem>
|
||||||
<ds-eperson-group-list (select)="updateObjectSelected($event, true)"></ds-eperson-group-list>
|
<a ngbNavLink>{{'resource-policies.form.eperson-group-list.tab.eperson' | translate}}</a>
|
||||||
</ng-template>
|
<ng-template ngbNavContent>
|
||||||
</ngb-tab>
|
<ds-eperson-group-list (select)="updateObjectSelected($event, true)"></ds-eperson-group-list>
|
||||||
<ngb-tab [title]="'resource-policies.form.eperson-group-list.tab.group' | translate">
|
</ng-template>
|
||||||
<ng-template ngbTabContent>
|
</li>
|
||||||
<ds-eperson-group-list [isListOfEPerson]="false"
|
<li ngbNavItem>
|
||||||
(select)="updateObjectSelected($event, false)"></ds-eperson-group-list>
|
<a ngbNavLink>{{'resource-policies.form.eperson-group-list.tab.group' | translate}}</a>
|
||||||
</ng-template>
|
<ng-template ngbNavContent>
|
||||||
</ngb-tab>
|
<ds-eperson-group-list [isListOfEPerson]="false"
|
||||||
</ngb-tabset>
|
(select)="updateObjectSelected($event, false)"></ds-eperson-group-list>
|
||||||
|
</ng-template>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<div [ngbNavOutlet]="nav"></div>
|
||||||
|
</ng-container>
|
||||||
<div>
|
<div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
|
@@ -3,6 +3,7 @@ import { ChangeDetectorRef, Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
|||||||
import { BrowserModule, By } from '@angular/platform-browser';
|
import { BrowserModule, By } from '@angular/platform-browser';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
|
|
||||||
import { getTestScheduler } from 'jasmine-marbles';
|
import { getTestScheduler } from 'jasmine-marbles';
|
||||||
import { of as observableOf } from 'rxjs';
|
import { of as observableOf } from 'rxjs';
|
||||||
@@ -30,6 +31,14 @@ import { ResourcePolicy } from '../../../core/resource-policy/models/resource-po
|
|||||||
import { RESOURCE_POLICY } from '../../../core/resource-policy/models/resource-policy.resource-type';
|
import { RESOURCE_POLICY } from '../../../core/resource-policy/models/resource-policy.resource-type';
|
||||||
import { EPersonMock } from '../../testing/eperson.mock';
|
import { EPersonMock } from '../../testing/eperson.mock';
|
||||||
import { isNotEmptyOperator } from '../../empty.util';
|
import { isNotEmptyOperator } from '../../empty.util';
|
||||||
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
|
import { RemoteData } from 'src/app/core/data/remote-data';
|
||||||
|
import { RouterMock } from '../../mocks/router.mock';
|
||||||
|
import { Store } from '@ngrx/store';
|
||||||
|
import { PaginationServiceStub } from '../../testing/pagination-service.stub';
|
||||||
|
import { PaginationService } from 'src/app/core/pagination/pagination.service';
|
||||||
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
import { StoreMock } from '../../testing/store.mock';
|
||||||
|
|
||||||
export const mockResourcePolicyFormData = {
|
export const mockResourcePolicyFormData = {
|
||||||
name: [
|
name: [
|
||||||
@@ -156,12 +165,23 @@ describe('ResourcePolicyFormComponent test suite', () => {
|
|||||||
findAll: jasmine.createSpy('findAll')
|
findAll: jasmine.createSpy('findAll')
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const mockPolicyRD: RemoteData<ResourcePolicy> = createSuccessfulRemoteDataObject(resourcePolicy);
|
||||||
|
const activatedRouteStub = {
|
||||||
|
parent: {
|
||||||
|
data: observableOf({
|
||||||
|
dso: mockPolicyRD
|
||||||
|
})
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
|
NgbModule,
|
||||||
|
NoopAnimationsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
@@ -172,9 +192,13 @@ describe('ResourcePolicyFormComponent test suite', () => {
|
|||||||
TestComponent
|
TestComponent
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
||||||
|
{ provide: Router, useValue: new RouterMock() },
|
||||||
|
{ provide: Store, useValue: StoreMock },
|
||||||
{ provide: EPersonDataService, useValue: epersonService },
|
{ provide: EPersonDataService, useValue: epersonService },
|
||||||
{ provide: FormService, useValue: formService },
|
{ provide: FormService, useValue: formService },
|
||||||
{ provide: GroupDataService, useValue: groupService },
|
{ provide: GroupDataService, useValue: groupService },
|
||||||
|
{ provide: PaginationService, useValue: new PaginationServiceStub() },
|
||||||
{ provide: RequestService, useValue: getMockRequestService() },
|
{ provide: RequestService, useValue: getMockRequestService() },
|
||||||
FormBuilderService,
|
FormBuilderService,
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
|
@@ -54,12 +54,12 @@ export function getRequest(transferState: TransferState): any {
|
|||||||
// forRoot ensures the providers are only created once
|
// forRoot ensures the providers are only created once
|
||||||
IdlePreloadModule.forRoot(),
|
IdlePreloadModule.forRoot(),
|
||||||
RouterModule.forRoot([], {
|
RouterModule.forRoot([], {
|
||||||
// enableTracing: true,
|
// enableTracing: true,
|
||||||
useHash: false,
|
useHash: false,
|
||||||
scrollPositionRestoration: 'enabled',
|
scrollPositionRestoration: 'enabled',
|
||||||
anchorScrolling: 'enabled',
|
anchorScrolling: 'enabled',
|
||||||
preloadingStrategy: NoPreloading
|
preloadingStrategy: NoPreloading
|
||||||
}),
|
}),
|
||||||
StatisticsModule.forRoot(),
|
StatisticsModule.forRoot(),
|
||||||
Angulartics2RouterlessModule.forRoot(),
|
Angulartics2RouterlessModule.forRoot(),
|
||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
|
@@ -59,3 +59,18 @@ ds-admin-sidebar {
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ngb-modal-backdrop {
|
||||||
|
// ng-bootsrap animates opacity, causing the fully opaque background to flash briefly before the transition starts
|
||||||
|
// animating background-color between transparent & a RGBA color instead looks smoother
|
||||||
|
&.fade {
|
||||||
|
opacity: 1 !important;
|
||||||
|
background-color: transparent;
|
||||||
|
transition: background-color 0.15s linear;
|
||||||
|
|
||||||
|
&.show {
|
||||||
|
background-color: rgba(0, 0, 0, 0.5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user