mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
upgraded to angular 8
This commit is contained in:
@@ -32,9 +32,4 @@ export class ProtractorPage {
|
|||||||
submitByPressingEnter() {
|
submitByPressingEnter() {
|
||||||
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(protractor.Key.ENTER);
|
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(protractor.Key.ENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
submitByPressingEnter() {
|
|
||||||
element(by.css('#search-navbar-container form input[name="query"]')).sendKeys(protractor.Key.ENTER);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
66
package.json
66
package.json
@@ -75,30 +75,28 @@
|
|||||||
"sync-i18n": "node ./scripts/sync-i18n-files.js"
|
"sync-i18n": "node ./scripts/sync-i18n-files.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "^7.2.15",
|
"@angular/animations": "^8.2.14",
|
||||||
"@angular/cdk": "7.3.7",
|
"@angular/cdk": "8.2.3",
|
||||||
"@angular/cli": "^7.3.5",
|
"@angular/cli": "^8.3.25",
|
||||||
"@angular/common": "^7.2.15",
|
"@angular/common": "^8.2.14",
|
||||||
"@angular/core": "^7.2.15",
|
"@angular/core": "^8.2.14",
|
||||||
"@angular/forms": "^7.2.15",
|
"@angular/forms": "^8.2.14",
|
||||||
"@angular/http": "^7.2.15",
|
"@angular/platform-browser": "^8.2.14",
|
||||||
"@angular/platform-browser": "^7.2.15",
|
"@angular/platform-browser-dynamic": "^8.2.14",
|
||||||
"@angular/platform-browser-dynamic": "^7.2.15",
|
"@angular/platform-server": "^8.2.14",
|
||||||
"@angular/platform-server": "^7.2.15",
|
"@angular/router": "^8.2.14",
|
||||||
"@angular/router": "^7.2.15",
|
|
||||||
"@angularclass/bootloader": "1.0.1",
|
"@angularclass/bootloader": "1.0.1",
|
||||||
"@ng-bootstrap/ng-bootstrap": "^4.1.0",
|
"@ng-bootstrap/ng-bootstrap": "^5.2.1",
|
||||||
"@ng-dynamic-forms/core": "^7.1.0",
|
"@ng-dynamic-forms/core": "8.1.1",
|
||||||
"@ng-dynamic-forms/ui-ng-bootstrap": "^7.1.0",
|
"@ng-dynamic-forms/ui-ng-bootstrap": "8.1.1",
|
||||||
"@ngrx/effects": "^7.3.0",
|
"@ngrx/effects": "^8.6.0",
|
||||||
"@ngrx/router-store": "^7.3.0",
|
"@ngrx/router-store": "^8.6.0",
|
||||||
"@ngrx/store": "^7.3.0",
|
"@ngrx/store": "^8.6.0",
|
||||||
"@nguniversal/express-engine": "^7.1.1",
|
"@nguniversal/express-engine": "^8.2.6",
|
||||||
"@ngx-translate/core": "11.0.1",
|
"@ngx-translate/core": "11.0.1",
|
||||||
"@ngx-translate/http-loader": "4.0.0",
|
"@ngx-translate/http-loader": "4.0.0",
|
||||||
"@nicky-lenaers/ngx-scroll-to": "^1.0.0",
|
"@nicky-lenaers/ngx-scroll-to": "^3.0.1",
|
||||||
"angular-idle-preload": "3.0.0",
|
"angular-idle-preload": "3.0.0",
|
||||||
"angular-sortablejs": "^2.5.0",
|
|
||||||
"angular2-text-mask": "9.0.0",
|
"angular2-text-mask": "9.0.0",
|
||||||
"angulartics2": "7.5.2",
|
"angulartics2": "7.5.2",
|
||||||
"body-parser": "1.18.2",
|
"body-parser": "1.18.2",
|
||||||
@@ -106,7 +104,7 @@
|
|||||||
"cerialize": "0.1.18",
|
"cerialize": "0.1.18",
|
||||||
"compression": "1.7.1",
|
"compression": "1.7.1",
|
||||||
"cookie-parser": "1.4.3",
|
"cookie-parser": "1.4.3",
|
||||||
"core-js": "^2.6.5",
|
"core-js": "^3.6.4",
|
||||||
"debug-loader": "^0.0.1",
|
"debug-loader": "^0.0.1",
|
||||||
"express": "4.16.2",
|
"express": "4.16.2",
|
||||||
"express-session": "1.15.6",
|
"express-session": "1.15.6",
|
||||||
@@ -126,17 +124,18 @@
|
|||||||
"moment": "^2.22.1",
|
"moment": "^2.22.1",
|
||||||
"moment-range": "^4.0.2",
|
"moment-range": "^4.0.2",
|
||||||
"morgan": "^1.9.1",
|
"morgan": "^1.9.1",
|
||||||
"ng-mocks": "^7.6.0",
|
"ng-mocks": "^8.1.0",
|
||||||
"ng2-file-upload": "1.2.1",
|
"ng2-file-upload": "1.2.1",
|
||||||
"ng2-nouislider": "^1.8.2",
|
"ng2-nouislider": "^1.8.2",
|
||||||
"ngx-bootstrap": "^3.2.0",
|
"ngx-bootstrap": "^5.3.2",
|
||||||
"ngx-infinite-scroll": "6.0.1",
|
"ngx-infinite-scroll": "6.0.1",
|
||||||
"ngx-moment": "^3.4.0",
|
"ngx-moment": "^3.4.0",
|
||||||
"ngx-pagination": "3.0.3",
|
"ngx-pagination": "3.0.3",
|
||||||
|
"ngx-sortablejs": "^3.1.4",
|
||||||
"nouislider": "^11.0.0",
|
"nouislider": "^11.0.0",
|
||||||
"pem": "1.13.2",
|
"pem": "1.13.2",
|
||||||
"reflect-metadata": "0.1.12",
|
"reflect-metadata": "0.1.12",
|
||||||
"rxjs": "6.4.0",
|
"rxjs": "6.5.4",
|
||||||
"rxjs-spy": "^7.5.1",
|
"rxjs-spy": "^7.5.1",
|
||||||
"sass-resources-loader": "^2.0.0",
|
"sass-resources-loader": "^2.0.0",
|
||||||
"sortablejs": "1.7.0",
|
"sortablejs": "1.7.0",
|
||||||
@@ -147,17 +146,17 @@
|
|||||||
"uuid": "^3.2.1",
|
"uuid": "^3.2.1",
|
||||||
"webfontloader": "1.6.28",
|
"webfontloader": "1.6.28",
|
||||||
"webpack-cli": "^3.2.0",
|
"webpack-cli": "^3.2.0",
|
||||||
"zone.js": "^0.8.29"
|
"zone.js": "^0.9.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@angular-devkit/build-angular": "^0.13.5",
|
"@angular-devkit/build-angular": "^0.803.25",
|
||||||
"@angular/compiler": "^7.2.15",
|
"@angular/compiler": "^8.2.14",
|
||||||
"@angular/compiler-cli": "^7.2.15",
|
"@angular/compiler-cli": "^8.2.14",
|
||||||
"@fortawesome/fontawesome-free": "^5.5.0",
|
"@fortawesome/fontawesome-free": "^5.5.0",
|
||||||
"@ngrx/entity": "^7.3.0",
|
"@ngrx/entity": "^8.6.0",
|
||||||
"@ngrx/schematics": "^7.3.0",
|
"@ngrx/schematics": "^8.6.0",
|
||||||
"@ngrx/store-devtools": "^7.3.0",
|
"@ngrx/store-devtools": "^8.6.0",
|
||||||
"@ngtools/webpack": "^7.3.9",
|
"@ngtools/webpack": "^8.3.25",
|
||||||
"@schematics/angular": "^0.7.5",
|
"@schematics/angular": "^0.7.5",
|
||||||
"@types/acorn": "^4.0.3",
|
"@types/acorn": "^4.0.3",
|
||||||
"@types/cookie-parser": "1.4.1",
|
"@types/cookie-parser": "1.4.1",
|
||||||
@@ -215,7 +214,6 @@
|
|||||||
"karma-webdriver-launcher": "^1.0.7",
|
"karma-webdriver-launcher": "^1.0.7",
|
||||||
"karma-webpack": "3.0.0",
|
"karma-webpack": "3.0.0",
|
||||||
"ncp": "^2.0.0",
|
"ncp": "^2.0.0",
|
||||||
"ngrx-store-freeze": "^0.2.4",
|
|
||||||
"node-sass": "^4.11.0",
|
"node-sass": "^4.11.0",
|
||||||
"nodemon": "^1.15.0",
|
"nodemon": "^1.15.0",
|
||||||
"npm-run-all": "4.1.3",
|
"npm-run-all": "4.1.3",
|
||||||
@@ -247,7 +245,7 @@
|
|||||||
"ts-node": "4.1.0",
|
"ts-node": "4.1.0",
|
||||||
"tslint": "5.11.0",
|
"tslint": "5.11.0",
|
||||||
"typedoc": "^0.9.0",
|
"typedoc": "^0.9.0",
|
||||||
"typescript": "3.1.6",
|
"typescript": "3.5.3",
|
||||||
"webdriver-manager": "^12.1.7",
|
"webdriver-manager": "^12.1.7",
|
||||||
"webpack": "^4.29.6",
|
"webpack": "^4.29.6",
|
||||||
"webpack-bundle-analyzer": "^3.3.2",
|
"webpack-bundle-analyzer": "^3.3.2",
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
*/
|
*/
|
||||||
Error.stackTraceLimit = Infinity;
|
Error.stackTraceLimit = Infinity;
|
||||||
|
|
||||||
require('core-js/es6');
|
require('core-js/es');
|
||||||
require('core-js/es7/reflect');
|
require('core-js/features/reflect');
|
||||||
|
|
||||||
// Typescript emit helpers polyfill
|
// Typescript emit helpers polyfill
|
||||||
require('ts-helpers');
|
require('ts-helpers');
|
||||||
|
@@ -43,7 +43,7 @@ describe('AddBitstreamFormatComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [AddBitstreamFormatComponent],
|
declarations: [AddBitstreamFormatComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: Router, useValue: router},
|
{provide: Router, useValue: router},
|
||||||
@@ -83,7 +83,7 @@ describe('AddBitstreamFormatComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [AddBitstreamFormatComponent],
|
declarations: [AddBitstreamFormatComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: Router, useValue: router},
|
{provide: Router, useValue: router},
|
||||||
|
@@ -92,7 +92,7 @@ describe('BitstreamFormatsComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
|
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
|
||||||
@@ -214,7 +214,7 @@ describe('BitstreamFormatsComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
|
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
|
||||||
@@ -260,7 +260,7 @@ describe('BitstreamFormatsComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
declarations: [BitstreamFormatsComponent, PaginationComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
|
{provide: BitstreamFormatDataService, useValue: bitstreamFormatService},
|
||||||
|
@@ -49,7 +49,7 @@ describe('EditBitstreamFormatComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [EditBitstreamFormatComponent],
|
declarations: [EditBitstreamFormatComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: ActivatedRoute, useValue: routeStub},
|
{provide: ActivatedRoute, useValue: routeStub},
|
||||||
@@ -99,7 +99,7 @@ describe('EditBitstreamFormatComponent', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [EditBitstreamFormatComponent],
|
declarations: [EditBitstreamFormatComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: ActivatedRoute, useValue: routeStub},
|
{provide: ActivatedRoute, useValue: routeStub},
|
||||||
|
@@ -40,7 +40,7 @@ describe('FormatFormComponent', () => {
|
|||||||
|
|
||||||
const initAsync = () => {
|
const initAsync = () => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), ReactiveFormsModule, FormsModule, TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [FormatFormComponent],
|
declarations: [FormatFormComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: Router, useValue: router},
|
{provide: Router, useValue: router},
|
||||||
|
@@ -148,4 +148,6 @@ export type MetadataRegistryAction
|
|||||||
| MetadataRegistryEditFieldAction
|
| MetadataRegistryEditFieldAction
|
||||||
| MetadataRegistryCancelFieldAction
|
| MetadataRegistryCancelFieldAction
|
||||||
| MetadataRegistrySelectFieldAction
|
| MetadataRegistrySelectFieldAction
|
||||||
| MetadataRegistryDeselectFieldAction;
|
| MetadataRegistryDeselectFieldAction
|
||||||
|
| MetadataRegistryDeselectAllSchemaAction
|
||||||
|
| MetadataRegistryDeselectAllFieldAction;
|
||||||
|
@@ -53,7 +53,7 @@ describe('MetadataRegistryComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [MetadataRegistryComponent, PaginationComponent, EnumKeysPipe],
|
declarations: [MetadataRegistryComponent, PaginationComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RegistryService, useValue: registryServiceStub },
|
{ provide: RegistryService, useValue: registryServiceStub },
|
||||||
|
@@ -34,7 +34,7 @@ describe('MetadataSchemaFormComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ MetadataSchemaFormComponent, EnumKeysPipe ],
|
declarations: [ MetadataSchemaFormComponent, EnumKeysPipe ],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RegistryService, useValue: registryServiceStub },
|
{ provide: RegistryService, useValue: registryServiceStub },
|
||||||
|
@@ -42,7 +42,7 @@ describe('MetadataFieldFormComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ MetadataFieldFormComponent, EnumKeysPipe ],
|
declarations: [ MetadataFieldFormComponent, EnumKeysPipe ],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RegistryService, useValue: registryServiceStub },
|
{ provide: RegistryService, useValue: registryServiceStub },
|
||||||
|
@@ -99,7 +99,7 @@ describe('MetadataSchemaComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [MetadataSchemaComponent, PaginationComponent, EnumKeysPipe],
|
declarations: [MetadataSchemaComponent, PaginationComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RegistryService, useValue: registryServiceStub },
|
{ provide: RegistryService, useValue: registryServiceStub },
|
||||||
|
@@ -68,7 +68,7 @@ describe('BrowseByDatePageComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [BrowseByDatePageComponent, EnumKeysPipe, VarDirective],
|
declarations: [BrowseByDatePageComponent, EnumKeysPipe, VarDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: GLOBAL_CONFIG, useValue: ENV_CONFIG },
|
{ provide: GLOBAL_CONFIG, useValue: ENV_CONFIG },
|
||||||
|
@@ -86,7 +86,7 @@ describe('BrowseByMetadataPageComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [BrowseByMetadataPageComponent, EnumKeysPipe, VarDirective],
|
declarations: [BrowseByMetadataPageComponent, EnumKeysPipe, VarDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
||||||
|
@@ -64,7 +64,7 @@ describe('BrowseByTitlePageComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [BrowseByTitlePageComponent, EnumKeysPipe, VarDirective],
|
declarations: [BrowseByTitlePageComponent, EnumKeysPipe, VarDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
||||||
|
@@ -116,7 +116,7 @@ describe('CollectionItemMapperComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [CollectionItemMapperComponent, ItemSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent],
|
declarations: [CollectionItemMapperComponent, ItemSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
||||||
|
@@ -48,7 +48,7 @@ export class CollectionItemMapperComponent implements OnInit {
|
|||||||
* A view on the tabset element
|
* A view on the tabset element
|
||||||
* Used to switch tabs programmatically
|
* Used to switch tabs programmatically
|
||||||
*/
|
*/
|
||||||
@ViewChild('tabs') tabs;
|
@ViewChild('tabs', {static: false}) tabs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The collection to map items to
|
* The collection to map items to
|
||||||
|
@@ -116,7 +116,7 @@ describe('CommunityPageSubCollectionList Component', () => {
|
|||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
SharedModule,
|
SharedModule,
|
||||||
RouterTestingModule.withRoutes([]),
|
RouterTestingModule.withRoutes([]),
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
NoopAnimationsModule
|
NoopAnimationsModule
|
||||||
],
|
],
|
||||||
declarations: [CommunityPageSubCollectionListComponent],
|
declarations: [CommunityPageSubCollectionListComponent],
|
||||||
|
@@ -117,7 +117,7 @@ describe('CommunityPageSubCommunityListComponent Component', () => {
|
|||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
SharedModule,
|
SharedModule,
|
||||||
RouterTestingModule.withRoutes([]),
|
RouterTestingModule.withRoutes([]),
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
NoopAnimationsModule
|
NoopAnimationsModule
|
||||||
],
|
],
|
||||||
declarations: [CommunityPageSubCommunityListComponent],
|
declarations: [CommunityPageSubCommunityListComponent],
|
||||||
|
@@ -107,7 +107,7 @@ describe('TopLevelCommunityList Component', () => {
|
|||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
SharedModule,
|
SharedModule,
|
||||||
RouterTestingModule.withRoutes([]),
|
RouterTestingModule.withRoutes([]),
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
NoopAnimationsModule
|
NoopAnimationsModule
|
||||||
],
|
],
|
||||||
declarations: [TopLevelCommunityListComponent],
|
declarations: [TopLevelCommunityListComponent],
|
||||||
|
@@ -98,7 +98,7 @@ describe('ItemCollectionMapperComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemCollectionMapperComponent, CollectionSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent],
|
declarations: [ItemCollectionMapperComponent, CollectionSelectComponent, SearchFormComponent, PaginationComponent, EnumKeysPipe, VarDirective, ErrorComponent, LoadingComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
||||||
|
@@ -39,7 +39,7 @@ export class ItemCollectionMapperComponent implements OnInit {
|
|||||||
* A view on the tabset element
|
* A view on the tabset element
|
||||||
* Used to switch tabs programmatically
|
* Used to switch tabs programmatically
|
||||||
*/
|
*/
|
||||||
@ViewChild('tabs') tabs;
|
@ViewChild('tabs', {static: false}) tabs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The item to map to collections
|
* The item to map to collections
|
||||||
|
@@ -182,7 +182,7 @@ describe('ItemDeleteComponent', () => {
|
|||||||
notificationsServiceStub = new NotificationsServiceStub();
|
notificationsServiceStub = new NotificationsServiceStub();
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemDeleteComponent, VarDirective],
|
declarations: [ItemDeleteComponent, VarDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
|
@@ -82,7 +82,7 @@ describe('ItemMoveComponent', () => {
|
|||||||
describe('ItemMoveComponent success', () => {
|
describe('ItemMoveComponent success', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemMoveComponent],
|
declarations: [ItemMoveComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: ActivatedRoute, useValue: routeStub},
|
{provide: ActivatedRoute, useValue: routeStub},
|
||||||
@@ -143,7 +143,7 @@ describe('ItemMoveComponent', () => {
|
|||||||
describe('ItemMoveComponent fail', () => {
|
describe('ItemMoveComponent fail', () => {
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemMoveComponent],
|
declarations: [ItemMoveComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: ActivatedRoute, useValue: routeStub},
|
{provide: ActivatedRoute, useValue: routeStub},
|
||||||
|
@@ -60,7 +60,7 @@ describe('ItemPrivateComponent', () => {
|
|||||||
notificationsServiceStub = new NotificationsServiceStub();
|
notificationsServiceStub = new NotificationsServiceStub();
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemPrivateComponent],
|
declarations: [ItemPrivateComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
|
@@ -60,7 +60,7 @@ describe('ItemPublicComponent', () => {
|
|||||||
notificationsServiceStub = new NotificationsServiceStub();
|
notificationsServiceStub = new NotificationsServiceStub();
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemPublicComponent],
|
declarations: [ItemPublicComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
|
@@ -60,7 +60,7 @@ describe('ItemReinstateComponent', () => {
|
|||||||
notificationsServiceStub = new NotificationsServiceStub();
|
notificationsServiceStub = new NotificationsServiceStub();
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemReinstateComponent],
|
declarations: [ItemReinstateComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
|
@@ -33,7 +33,7 @@ describe('ItemStatusComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [ItemStatusComponent],
|
declarations: [ItemStatusComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
|
@@ -60,7 +60,7 @@ describe('ItemWithdrawComponent', () => {
|
|||||||
notificationsServiceStub = new NotificationsServiceStub();
|
notificationsServiceStub = new NotificationsServiceStub();
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot(),],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule,],
|
||||||
declarations: [ItemWithdrawComponent],
|
declarations: [ItemWithdrawComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
|
@@ -83,7 +83,7 @@ describe('AbstractSimpleItemActionComponent', () => {
|
|||||||
notificationsServiceStub = new NotificationsServiceStub();
|
notificationsServiceStub = new NotificationsServiceStub();
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, FormsModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [MySimpleItemActionComponent],
|
declarations: [MySimpleItemActionComponent],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: routeStub },
|
{ provide: ActivatedRoute, useValue: routeStub },
|
||||||
|
@@ -29,7 +29,7 @@ describe('TabbedRelatedEntitiesSearchComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), NoopAnimationsModule, NgbModule.forRoot()],
|
imports: [TranslateModule.forRoot(), NoopAnimationsModule, NgbModule],
|
||||||
declarations: [TabbedRelatedEntitiesSearchComponent, VarDirective],
|
declarations: [TabbedRelatedEntitiesSearchComponent, VarDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
|
@@ -84,7 +84,7 @@ describe('MyDSpacePageComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule.forRoot()],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule],
|
||||||
declarations: [MyDSpacePageComponent, RoleDirective],
|
declarations: [MyDSpacePageComponent, RoleDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SearchService, useValue: searchServiceStub },
|
{ provide: SearchService, useValue: searchServiceStub },
|
||||||
|
@@ -5,6 +5,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/deep/ .search-controls {
|
::ng-deep .search-controls {
|
||||||
margin-bottom: $spacer;
|
margin-bottom: $spacer;
|
||||||
}
|
}
|
||||||
|
@@ -90,7 +90,7 @@ const routeServiceStub = {
|
|||||||
|
|
||||||
export function configureSearchComponentTestingModule(compType) {
|
export function configureSearchComponentTestingModule(compType) {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule.forRoot()],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NoopAnimationsModule, NgbCollapseModule],
|
||||||
declarations: [compType],
|
declarations: [compType],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SearchService, useValue: searchServiceStub },
|
{ provide: SearchService, useValue: searchServiceStub },
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
import { isNotEmpty } from './shared/empty.util';
|
|
||||||
import { StoreActionTypes } from './store.actions';
|
import { StoreActionTypes } from './store.actions';
|
||||||
|
|
||||||
// fallback ngrx debugger
|
// fallback ngrx debugger
|
||||||
|
@@ -6,14 +6,12 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
|||||||
|
|
||||||
import { EffectsModule } from '@ngrx/effects';
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
import { RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router-store';
|
import { RouterStateSerializer, StoreRouterConnectingModule } from '@ngrx/router-store';
|
||||||
import { META_REDUCERS, MetaReducer, StoreModule } from '@ngrx/store';
|
import { META_REDUCERS, MetaReducer, StoreModule, USER_PROVIDED_META_REDUCERS } from '@ngrx/store';
|
||||||
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
||||||
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
||||||
|
|
||||||
import { storeFreeze } from 'ngrx-store-freeze';
|
|
||||||
|
|
||||||
import { ENV_CONFIG, GLOBAL_CONFIG, GlobalConfig } from '../config';
|
import { ENV_CONFIG, GLOBAL_CONFIG, GlobalConfig } from '../config';
|
||||||
import { AdminSidebarSectionComponent } from './+admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component';
|
import { AdminSidebarSectionComponent } from './+admin/admin-sidebar/admin-sidebar-section/admin-sidebar-section.component';
|
||||||
import { AdminSidebarComponent } from './+admin/admin-sidebar/admin-sidebar.component';
|
import { AdminSidebarComponent } from './+admin/admin-sidebar/admin-sidebar.component';
|
||||||
@@ -23,7 +21,7 @@ import { AppRoutingModule } from './app-routing.module';
|
|||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
import { appEffects } from './app.effects';
|
import { appEffects } from './app.effects';
|
||||||
import { appMetaReducers, debugMetaReducers } from './app.metareducers';
|
import { appMetaReducers, debugMetaReducers, universalMetaReducer } from './app.metareducers';
|
||||||
import { appReducers, AppState } from './app.reducer';
|
import { appReducers, AppState } from './app.reducer';
|
||||||
|
|
||||||
import { CoreModule } from './core/core.module';
|
import { CoreModule } from './core/core.module';
|
||||||
@@ -51,8 +49,7 @@ export function getBase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getMetaReducers(config: GlobalConfig): Array<MetaReducer<AppState>> {
|
export function getMetaReducers(config: GlobalConfig): Array<MetaReducer<AppState>> {
|
||||||
const metaReducers: Array<MetaReducer<AppState>> = config.production ? appMetaReducers : [...appMetaReducers, storeFreeze];
|
return config.debug ? [...appMetaReducers, ...debugMetaReducers] : appMetaReducers;
|
||||||
return config.debug ? [...metaReducers, ...debugMetaReducers] : metaReducers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const IMPORTS = [
|
const IMPORTS = [
|
||||||
@@ -63,11 +60,11 @@ const IMPORTS = [
|
|||||||
AppRoutingModule,
|
AppRoutingModule,
|
||||||
CoreModule.forRoot(),
|
CoreModule.forRoot(),
|
||||||
ScrollToModule.forRoot(),
|
ScrollToModule.forRoot(),
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
EffectsModule.forRoot(appEffects),
|
EffectsModule.forRoot(appEffects),
|
||||||
StoreModule.forRoot(appReducers),
|
StoreModule.forRoot(appReducers),
|
||||||
StoreRouterConnectingModule,
|
StoreRouterConnectingModule.forRoot(),
|
||||||
];
|
];
|
||||||
|
|
||||||
const ENTITY_IMPORTS = [
|
const ENTITY_IMPORTS = [
|
||||||
@@ -92,7 +89,7 @@ const PROVIDERS = [
|
|||||||
useFactory: (getBase)
|
useFactory: (getBase)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
provide: META_REDUCERS,
|
provide: USER_PROVIDED_META_REDUCERS,
|
||||||
useFactory: getMetaReducers,
|
useFactory: getMetaReducers,
|
||||||
deps: [GLOBAL_CONFIG]
|
deps: [GLOBAL_CONFIG]
|
||||||
},
|
},
|
||||||
|
@@ -279,4 +279,6 @@ export type ObjectUpdatesAction
|
|||||||
| ReinstateObjectUpdatesAction
|
| ReinstateObjectUpdatesAction
|
||||||
| RemoveObjectUpdatesAction
|
| RemoveObjectUpdatesAction
|
||||||
| RemoveFieldUpdateAction
|
| RemoveFieldUpdateAction
|
||||||
| SelectVirtualMetadataAction;
|
| SelectVirtualMetadataAction
|
||||||
|
| SetEditableFieldUpdateAction
|
||||||
|
| SetValidFieldUpdateAction;
|
||||||
|
@@ -4,7 +4,6 @@ import { Injectable } from '@angular/core';
|
|||||||
import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'
|
import { HttpClient, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'
|
||||||
|
|
||||||
import { DSpaceRESTV2Response } from './dspace-rest-v2-response.model';
|
import { DSpaceRESTV2Response } from './dspace-rest-v2-response.model';
|
||||||
import { HttpObserve } from '@angular/common/http/src/client';
|
|
||||||
import { RestRequestMethod } from '../data/rest-request-method';
|
import { RestRequestMethod } from '../data/rest-request-method';
|
||||||
import { hasNoValue, isNotEmpty } from '../../shared/empty.util';
|
import { hasNoValue, isNotEmpty } from '../../shared/empty.util';
|
||||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||||
@@ -14,7 +13,7 @@ export interface HttpOptions {
|
|||||||
body?: any;
|
body?: any;
|
||||||
headers?: HttpHeaders;
|
headers?: HttpHeaders;
|
||||||
params?: HttpParams;
|
params?: HttpParams;
|
||||||
observe?: HttpObserve;
|
observe?: 'body' | 'events' | 'response';
|
||||||
reportProgress?: boolean;
|
reportProgress?: boolean;
|
||||||
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
responseType?: 'arraybuffer' | 'blob' | 'json' | 'text';
|
||||||
withCredentials?: boolean;
|
withCredentials?: boolean;
|
||||||
|
@@ -91,4 +91,4 @@ export class RemoveFromIndexBySubstringAction implements Action {
|
|||||||
/**
|
/**
|
||||||
* A type to encompass all HrefIndexActions
|
* A type to encompass all HrefIndexActions
|
||||||
*/
|
*/
|
||||||
export type IndexAction = AddToIndexAction | RemoveFromIndexByValueAction;
|
export type IndexAction = AddToIndexAction | RemoveFromIndexByValueAction | RemoveFromIndexBySubstringAction;
|
||||||
|
@@ -126,7 +126,7 @@ function removeFromIndexByValue(state: MetaIndexState, action: RemoveFromIndexBy
|
|||||||
* @return MetaIndexState
|
* @return MetaIndexState
|
||||||
* the new state
|
* the new state
|
||||||
*/
|
*/
|
||||||
function removeFromIndexBySubstring(state: MetaIndexState, action: RemoveFromIndexByValueAction): MetaIndexState {
|
function removeFromIndexBySubstring(state: MetaIndexState, action: RemoveFromIndexByValueAction | RemoveFromIndexBySubstringAction): MetaIndexState {
|
||||||
const subState = state[action.payload.name];
|
const subState = state[action.payload.name];
|
||||||
const newSubState = Object.create(null);
|
const newSubState = Object.create(null);
|
||||||
for (const value in subState) {
|
for (const value in subState) {
|
||||||
|
@@ -162,4 +162,5 @@ export type RouteActions =
|
|||||||
| AddQueryParameterAction
|
| AddQueryParameterAction
|
||||||
| AddParameterAction
|
| AddParameterAction
|
||||||
| ResetRouteStateAction
|
| ResetRouteStateAction
|
||||||
| SetParameterAction;
|
| SetParameterAction
|
||||||
|
| SetQueryParameterAction;
|
||||||
|
@@ -9,5 +9,5 @@
|
|||||||
<ds-truncatable [id]="metadataRepresentation.id">
|
<ds-truncatable [id]="metadataRepresentation.id">
|
||||||
<a [routerLink]="['/items/' + metadataRepresentation.id]"
|
<a [routerLink]="['/items/' + metadataRepresentation.id]"
|
||||||
[innerHTML]="metadataRepresentation.getValue()"
|
[innerHTML]="metadataRepresentation.getValue()"
|
||||||
[tooltip]="metadataRepresentation.allMetadata(['dc.description']).length > 0 ? descTemplate : null"></a>
|
[tooltip]="metadataRepresentation.allMetadata(['organization.legalName']).length > 0 ? descTemplate : null"></a>
|
||||||
</ds-truncatable>
|
</ds-truncatable>
|
||||||
|
@@ -23,7 +23,7 @@ describe('OrgUnitItemMetadataListElementComponent', () => {
|
|||||||
declarations: [OrgUnitItemMetadataListElementComponent],
|
declarations: [OrgUnitItemMetadataListElementComponent],
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
schemas: [NO_ERRORS_SCHEMA]
|
||||||
}).overrideComponent(OrgUnitItemMetadataListElementComponent, {
|
}).overrideComponent(OrgUnitItemMetadataListElementComponent, {
|
||||||
set: { changeDetection: ChangeDetectionStrategy.Default }
|
// set: { changeDetection: ChangeDetectionStrategy.Default }
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ describe('NameVariantModalComponent', () => {
|
|||||||
init();
|
init();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [NameVariantModalComponent],
|
declarations: [NameVariantModalComponent],
|
||||||
imports: [NgbModule.forRoot(), TranslateModule.forRoot()],
|
imports: [NgbModule, TranslateModule.forRoot()],
|
||||||
providers: [{ provide: NgbActiveModal, useValue: modal }]
|
providers: [{ provide: NgbActiveModal, useValue: modal }]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
|
@@ -22,7 +22,7 @@ export class SearchNavbarComponent {
|
|||||||
isExpanded = 'collapsed';
|
isExpanded = 'collapsed';
|
||||||
|
|
||||||
// Search input field
|
// Search input field
|
||||||
@ViewChild('searchInput') searchField: ElementRef;
|
@ViewChild('searchInput', {static: false}) searchField: ElementRef;
|
||||||
|
|
||||||
constructor(private formBuilder: FormBuilder, private router: Router, private searchService: SearchService) {
|
constructor(private formBuilder: FormBuilder, private router: Router, private searchService: SearchService) {
|
||||||
this.searchForm = this.formBuilder.group(({
|
this.searchForm = this.formBuilder.group(({
|
||||||
|
@@ -51,7 +51,7 @@ describe('BrowseByComponent', () => {
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
SharedModule,
|
SharedModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
StoreModule.forRoot({}),
|
StoreModule.forRoot({}),
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {
|
loader: {
|
||||||
|
@@ -6,16 +6,16 @@ import { Chips } from './models/chips.model';
|
|||||||
import { UploaderService } from '../uploader/uploader.service';
|
import { UploaderService } from '../uploader/uploader.service';
|
||||||
import { ChipsComponent } from './chips.component';
|
import { ChipsComponent } from './chips.component';
|
||||||
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { SortablejsModule } from 'angular-sortablejs';
|
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { FormFieldMetadataValueObject } from '../form/builder/models/form-field-metadata-value.model';
|
import { FormFieldMetadataValueObject } from '../form/builder/models/form-field-metadata-value.model';
|
||||||
import { createTestComponent, hasClass } from '../testing/utils';
|
import { createTestComponent } from '../testing/utils';
|
||||||
import { AuthorityConfidenceStateDirective } from '../authority-confidence/authority-confidence-state.directive';
|
import { AuthorityConfidenceStateDirective } from '../authority-confidence/authority-confidence-state.directive';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { GlobalConfig } from '../../../config/global-config.interface';
|
import { GlobalConfig } from '../../../config/global-config.interface';
|
||||||
import { GLOBAL_CONFIG } from '../../../config';
|
import { GLOBAL_CONFIG } from '../../../config';
|
||||||
import { MOCK_SUBMISSION_CONFIG } from '../testing/mock-submission-config';
|
import { MOCK_SUBMISSION_CONFIG } from '../testing/mock-submission-config';
|
||||||
import { ConfidenceType } from '../../core/integration/models/confidence-type';
|
import { ConfidenceType } from '../../core/integration/models/confidence-type';
|
||||||
|
import { SortablejsModule } from 'ngx-sortablejs';
|
||||||
|
|
||||||
describe('ChipsComponent test suite', () => {
|
describe('ChipsComponent test suite', () => {
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ describe('ChipsComponent test suite', () => {
|
|||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
SortablejsModule.forRoot({animation: 150}),
|
SortablejsModule.forRoot({animation: 150}),
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
|
@@ -1,13 +1,13 @@
|
|||||||
import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, } from '@angular/core';
|
import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges, } from '@angular/core';
|
||||||
|
|
||||||
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
|
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
|
||||||
import { SortablejsOptions } from 'angular-sortablejs';
|
|
||||||
import { isObject } from 'lodash';
|
import { isObject } from 'lodash';
|
||||||
|
|
||||||
import { Chips } from './models/chips.model';
|
import { Chips } from './models/chips.model';
|
||||||
import { ChipsItem } from './models/chips-item.model';
|
import { ChipsItem } from './models/chips-item.model';
|
||||||
import { UploaderService } from '../uploader/uploader.service';
|
import { UploaderService } from '../uploader/uploader.service';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
|
import { Options } from 'sortablejs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-chips',
|
selector: 'ds-chips',
|
||||||
@@ -25,7 +25,7 @@ export class ChipsComponent implements OnChanges {
|
|||||||
@Output() remove: EventEmitter<number> = new EventEmitter<number>();
|
@Output() remove: EventEmitter<number> = new EventEmitter<number>();
|
||||||
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
options: SortablejsOptions;
|
options: Options;
|
||||||
dragged = -1;
|
dragged = -1;
|
||||||
tipText: string[];
|
tipText: string[];
|
||||||
|
|
||||||
|
@@ -119,7 +119,6 @@ describe('ComColFormComponent', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
comp.onSubmit();
|
comp.onSubmit();
|
||||||
|
|
||||||
expect(comp.submitForm.emit).toHaveBeenCalledWith(
|
expect(comp.submitForm.emit).toHaveBeenCalledWith(
|
||||||
@@ -313,9 +312,9 @@ describe('ComColFormComponent', () => {
|
|||||||
comp.formModel = [];
|
comp.formModel = [];
|
||||||
comp.dso = dso;
|
comp.dso = dso;
|
||||||
(comp as any).type = Community.type;
|
(comp as any).type = Community.type;
|
||||||
comp.uploaderComponent = Object.assign({
|
comp.uploaderComponent = {uploader: {}} as any;
|
||||||
uploader: {}
|
|
||||||
});
|
console.log(comp);
|
||||||
(comp as any).dsoService = dsoService;
|
(comp as any).dsoService = dsoService;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
location = (comp as any).location;
|
location = (comp as any).location;
|
||||||
|
@@ -43,7 +43,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit, OnDe
|
|||||||
/**
|
/**
|
||||||
* The logo uploader component
|
* The logo uploader component
|
||||||
*/
|
*/
|
||||||
@ViewChild(UploaderComponent) uploaderComponent: UploaderComponent;
|
@ViewChild(UploaderComponent, {static: true}) uploaderComponent: UploaderComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DSpaceObject that the form represents
|
* DSpaceObject that the form represents
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .custom-select {
|
:host ::ng-deep .custom-select {
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
@@ -160,7 +160,7 @@ describe('DsDynamicFormControlContainerComponent test suite', () => {
|
|||||||
imports: [
|
imports: [
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
DynamicFormsCoreModule.forRoot(),
|
DynamicFormsCoreModule.forRoot(),
|
||||||
SharedModule,
|
SharedModule,
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
|
@@ -29,13 +29,13 @@ import {
|
|||||||
DYNAMIC_FORM_CONTROL_TYPE_SELECT,
|
DYNAMIC_FORM_CONTROL_TYPE_SELECT,
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA,
|
DYNAMIC_FORM_CONTROL_TYPE_TEXTAREA,
|
||||||
DYNAMIC_FORM_CONTROL_TYPE_TIMEPICKER,
|
DYNAMIC_FORM_CONTROL_TYPE_TIMEPICKER,
|
||||||
DynamicDatePickerModel,
|
DynamicDatePickerModel, DynamicFormComponentService,
|
||||||
DynamicFormControl,
|
DynamicFormControl,
|
||||||
DynamicFormControlContainerComponent,
|
DynamicFormControlContainerComponent,
|
||||||
DynamicFormControlEvent,
|
DynamicFormControlEvent,
|
||||||
DynamicFormControlModel, DynamicFormInstancesService,
|
DynamicFormControlModel,
|
||||||
DynamicFormLayout,
|
DynamicFormLayout,
|
||||||
DynamicFormLayoutService,
|
DynamicFormLayoutService, DynamicFormRelationService,
|
||||||
DynamicFormValidationService,
|
DynamicFormValidationService,
|
||||||
DynamicTemplateDirective,
|
DynamicTemplateDirective,
|
||||||
} from '@ng-dynamic-forms/core';
|
} from '@ng-dynamic-forms/core';
|
||||||
@@ -201,32 +201,32 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
|||||||
@Output('dfFocus') focus: EventEmitter<DynamicFormControlEvent> = new EventEmitter<DynamicFormControlEvent>();
|
@Output('dfFocus') focus: EventEmitter<DynamicFormControlEvent> = new EventEmitter<DynamicFormControlEvent>();
|
||||||
@Output('ngbEvent') customEvent: EventEmitter<DynamicFormControlEvent> = new EventEmitter<DynamicFormControlEvent>();
|
@Output('ngbEvent') customEvent: EventEmitter<DynamicFormControlEvent> = new EventEmitter<DynamicFormControlEvent>();
|
||||||
/* tslint:enable:no-output-rename */
|
/* tslint:enable:no-output-rename */
|
||||||
@ViewChild('componentViewContainer', { read: ViewContainerRef }) componentViewContainerRef: ViewContainerRef;
|
@ViewChild('componentViewContainer', { read: ViewContainerRef, static: true}) componentViewContainerRef: ViewContainerRef;
|
||||||
|
|
||||||
private showErrorMessagesPreviousStage: boolean;
|
private showErrorMessagesPreviousStage: boolean;
|
||||||
|
|
||||||
get componentType(): Type<DynamicFormControl> | null {
|
get componentType(): Type<DynamicFormControl> | null {
|
||||||
return this.layoutService.getCustomComponentType(this.model) || dsDynamicFormControlMapFn(this.model);
|
return dsDynamicFormControlMapFn(this.model);
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected componentFactoryResolver: ComponentFactoryResolver,
|
protected componentFactoryResolver: ComponentFactoryResolver,
|
||||||
protected dynamicFormInstanceService: DynamicFormInstancesService,
|
protected dynamicFormComponentService: DynamicFormComponentService,
|
||||||
protected layoutService: DynamicFormLayoutService,
|
protected layoutService: DynamicFormLayoutService,
|
||||||
protected validationService: DynamicFormValidationService,
|
protected validationService: DynamicFormValidationService,
|
||||||
protected translateService: TranslateService,
|
protected translateService: TranslateService,
|
||||||
|
protected relationService: DynamicFormRelationService,
|
||||||
private modalService: NgbModal,
|
private modalService: NgbModal,
|
||||||
private relationService: RelationshipService,
|
private relationshipService: RelationshipService,
|
||||||
private selectableListService: SelectableListService,
|
private selectableListService: SelectableListService,
|
||||||
private itemService: ItemDataService,
|
private itemService: ItemDataService,
|
||||||
private relationshipService: RelationshipService,
|
|
||||||
private zone: NgZone,
|
private zone: NgZone,
|
||||||
private store: Store<AppState>,
|
private store: Store<AppState>,
|
||||||
private submissionObjectService: SubmissionObjectDataService,
|
private submissionObjectService: SubmissionObjectDataService,
|
||||||
private ref: ChangeDetectorRef
|
private ref: ChangeDetectorRef
|
||||||
) {
|
) {
|
||||||
|
|
||||||
super(componentFactoryResolver, layoutService, validationService, dynamicFormInstanceService);
|
super(componentFactoryResolver, layoutService, validationService, dynamicFormComponentService, relationService);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -251,7 +251,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
|||||||
this.subs.push(item$.subscribe((item) => this.item = item));
|
this.subs.push(item$.subscribe((item) => this.item = item));
|
||||||
this.subs.push(collection$.subscribe((collection) => this.collection = collection));
|
this.subs.push(collection$.subscribe((collection) => this.collection = collection));
|
||||||
this.reorderables$ = item$.pipe(
|
this.reorderables$ = item$.pipe(
|
||||||
switchMap((item) => this.relationService.getItemRelationshipsByLabel(item, this.model.relationship.relationshipType)
|
switchMap((item) => this.relationshipService.getItemRelationshipsByLabel(item, this.model.relationship.relationshipType)
|
||||||
.pipe(
|
.pipe(
|
||||||
getAllSucceededRemoteData(),
|
getAllSucceededRemoteData(),
|
||||||
getRemoteDataPayload(),
|
getRemoteDataPayload(),
|
||||||
@@ -283,7 +283,7 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
|
|||||||
this.ref.detectChanges();
|
this.ref.detectChanges();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
this.relationService.getRelatedItemsByLabel(this.item, this.model.relationship.relationshipType).pipe(
|
this.relationshipService.getRelatedItemsByLabel(this.item, this.model.relationship.relationshipType).pipe(
|
||||||
map((items: RemoteData<PaginatedList<Item>>) => items.payload.page.map((item) => Object.assign(new ItemSearchResult(), { indexableObject: item }))),
|
map((items: RemoteData<PaginatedList<Item>>) => items.payload.page.map((item) => Object.assign(new ItemSearchResult(), { indexableObject: item }))),
|
||||||
).subscribe((relatedItems: Array<SearchResult<Item>>) => this.selectableListService.select(this.listId, relatedItems));
|
).subscribe((relatedItems: Array<SearchResult<Item>>) => this.selectableListService.select(this.listId, relatedItems));
|
||||||
}
|
}
|
||||||
|
@@ -26,7 +26,7 @@ describe('DsDatePickerInlineComponent test suite', () => {
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NoopAnimationsModule,
|
NoopAnimationsModule,
|
||||||
TextMaskModule,
|
TextMaskModule,
|
||||||
NgbDatepickerModule.forRoot(),
|
NgbDatepickerModule,
|
||||||
DynamicFormsCoreModule.forRoot()
|
DynamicFormsCoreModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [DsDatePickerInlineComponent]
|
declarations: [DsDatePickerInlineComponent]
|
||||||
|
@@ -24,7 +24,7 @@ export class DsDatePickerInlineComponent extends DynamicFormControlComponent {
|
|||||||
@Output() change: EventEmitter<any> = new EventEmitter();
|
@Output() change: EventEmitter<any> = new EventEmitter();
|
||||||
@Output() focus: EventEmitter<any> = new EventEmitter();
|
@Output() focus: EventEmitter<any> = new EventEmitter();
|
||||||
|
|
||||||
@ViewChild(NgbDatepicker) ngbDatePicker: NgbDatepicker;
|
@ViewChild(NgbDatepicker, {static: false}) ngbDatePicker: NgbDatepicker;
|
||||||
|
|
||||||
constructor(protected layoutService: DynamicFormLayoutService,
|
constructor(protected layoutService: DynamicFormLayoutService,
|
||||||
protected validationService: DynamicFormValidationService,
|
protected validationService: DynamicFormValidationService,
|
||||||
|
@@ -43,7 +43,7 @@ describe('DsDatePickerComponent test suite', () => {
|
|||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NgbModule.forRoot()
|
NgbModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
DsDatePickerComponent,
|
DsDatePickerComponent,
|
||||||
|
@@ -88,7 +88,7 @@ describe('DsDynamicListComponent test suite', () => {
|
|||||||
DynamicFormsNGBootstrapUIModule,
|
DynamicFormsNGBootstrapUIModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot()
|
NgbModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
DsDynamicListComponent,
|
DsDynamicListComponent,
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
display:none
|
display:none
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .dropdown-menu {
|
:host ::ng-deep .dropdown-menu {
|
||||||
left: 0 !important;
|
left: 0 !important;
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
max-height: $dropdown-menu-max-height;
|
max-height: $dropdown-menu-max-height;
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .dropdown-item.active,
|
:host ::ng-deep .dropdown-item.active,
|
||||||
:host /deep/ .dropdown-item:active,
|
:host ::ng-deep .dropdown-item:active,
|
||||||
:host /deep/ .dropdown-item:focus,
|
:host ::ng-deep .dropdown-item:focus,
|
||||||
:host /deep/ .dropdown-item:hover {
|
:host ::ng-deep .dropdown-item:hover {
|
||||||
color: $dropdown-link-hover-color !important;
|
color: $dropdown-link-hover-color !important;
|
||||||
background-color: $dropdown-link-hover-bg !important;
|
background-color: $dropdown-link-hover-bg !important;
|
||||||
}
|
}
|
||||||
|
@@ -160,7 +160,7 @@ describe('Dynamic Lookup component', () => {
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
InfiniteScrollModule,
|
InfiniteScrollModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@@ -113,7 +113,7 @@ describe('DsDynamicRelationGroupComponent test suite', () => {
|
|||||||
BrowserAnimationsModule,
|
BrowserAnimationsModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
StoreModule.forRoot({}),
|
StoreModule.forRoot({}),
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
|
@@ -65,7 +65,7 @@ export class DsDynamicRelationGroupComponent extends DynamicFormControlComponent
|
|||||||
private selectedChipItem: ChipsItem;
|
private selectedChipItem: ChipsItem;
|
||||||
private subs: Subscription[] = [];
|
private subs: Subscription[] = [];
|
||||||
|
|
||||||
@ViewChild('formRef') private formRef: FormComponent;
|
@ViewChild('formRef', {static: false}) private formRef: FormComponent;
|
||||||
|
|
||||||
constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig,
|
constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig,
|
||||||
private authorityService: AuthorityService,
|
private authorityService: AuthorityService,
|
||||||
|
@@ -64,7 +64,7 @@ describe('Dynamic Dynamic Scrollable Dropdown component', () => {
|
|||||||
FormsModule,
|
FormsModule,
|
||||||
InfiniteScrollModule,
|
InfiniteScrollModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
padding-right: 100%;
|
padding-right: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .dropdown-menu {
|
:host ::ng-deep .dropdown-menu {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
max-height: $dropdown-menu-max-height;
|
max-height: $dropdown-menu-max-height;
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
@@ -17,10 +17,10 @@
|
|||||||
margin-top: $spacer !important;
|
margin-top: $spacer !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .dropdown-item.active,
|
:host ::ng-deep .dropdown-item.active,
|
||||||
:host /deep/ .dropdown-item:active,
|
:host ::ng-deep .dropdown-item:active,
|
||||||
:host /deep/ .dropdown-item:focus,
|
:host ::ng-deep .dropdown-item:focus,
|
||||||
:host /deep/ .dropdown-item:hover {
|
:host ::ng-deep .dropdown-item:hover {
|
||||||
color: $dropdown-link-hover-color !important;
|
color: $dropdown-link-hover-color !important;
|
||||||
background-color: $dropdown-link-hover-bg !important;
|
background-color: $dropdown-link-hover-bg !important;
|
||||||
}
|
}
|
||||||
|
@@ -85,7 +85,7 @@ describe('DsDynamicTagComponent test suite', () => {
|
|||||||
DynamicFormsCoreModule,
|
DynamicFormsCoreModule,
|
||||||
DynamicFormsNGBootstrapUIModule,
|
DynamicFormsNGBootstrapUIModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@@ -33,7 +33,7 @@ export class DsDynamicTagComponent extends DynamicFormControlComponent implement
|
|||||||
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
||||||
@Output() focus: EventEmitter<any> = new EventEmitter<any>();
|
@Output() focus: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
@ViewChild('instance') instance: NgbTypeahead;
|
@ViewChild('instance', {static: false}) instance: NgbTypeahead;
|
||||||
|
|
||||||
chips: Chips;
|
chips: Chips;
|
||||||
hasAuthority: boolean;
|
hasAuthority: boolean;
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
:host /deep/ .dropdown-menu {
|
:host ::ng-deep .dropdown-menu {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
max-height: $dropdown-menu-max-height;
|
max-height: $dropdown-menu-max-height;
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .dropdown-item {
|
:host ::ng-deep .dropdown-item {
|
||||||
border-bottom: $dropdown-border-width solid $dropdown-border-color;
|
border-bottom: $dropdown-border-width solid $dropdown-border-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .dropdown-item.active,
|
:host ::ng-deep .dropdown-item.active,
|
||||||
:host /deep/ .dropdown-item:active,
|
:host ::ng-deep .dropdown-item:active,
|
||||||
:host /deep/ .dropdown-item:focus,
|
:host ::ng-deep .dropdown-item:focus,
|
||||||
:host /deep/ .dropdown-item:hover {
|
:host ::ng-deep .dropdown-item:hover {
|
||||||
color: $dropdown-link-hover-color !important;
|
color: $dropdown-link-hover-color !important;
|
||||||
background-color: $dropdown-link-hover-bg !important;
|
background-color: $dropdown-link-hover-bg !important;
|
||||||
}
|
}
|
||||||
|
@@ -70,7 +70,7 @@ describe('DsDynamicTypeaheadComponent test suite', () => {
|
|||||||
DynamicFormsCoreModule,
|
DynamicFormsCoreModule,
|
||||||
DynamicFormsNGBootstrapUIModule,
|
DynamicFormsNGBootstrapUIModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
|
@@ -31,7 +31,7 @@ export class DsDynamicTypeaheadComponent extends DynamicFormControlComponent imp
|
|||||||
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
||||||
@Output() focus: EventEmitter<any> = new EventEmitter<any>();
|
@Output() focus: EventEmitter<any> = new EventEmitter<any>();
|
||||||
|
|
||||||
@ViewChild('instance') instance: NgbTypeahead;
|
@ViewChild('instance', {static: false}) instance: NgbTypeahead;
|
||||||
|
|
||||||
searching = false;
|
searching = false;
|
||||||
searchOptions: IntegrationSearchOptions;
|
searchOptions: IntegrationSearchOptions;
|
||||||
|
@@ -79,7 +79,7 @@ describe('DsDynamicLookupRelationModalComponent', () => {
|
|||||||
init();
|
init();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [DsDynamicLookupRelationModalComponent],
|
declarations: [DsDynamicLookupRelationModalComponent],
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule.forRoot()],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: SearchConfigurationService, useValue: {
|
provide: SearchConfigurationService, useValue: {
|
||||||
|
@@ -95,7 +95,7 @@ describe('DsDynamicLookupRelationExternalSourceTabComponent', () => {
|
|||||||
init();
|
init();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [DsDynamicLookupRelationExternalSourceTabComponent, VarDirective],
|
declarations: [DsDynamicLookupRelationExternalSourceTabComponent, VarDirective],
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule.forRoot(), BrowserAnimationsModule],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule, BrowserAnimationsModule],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: SearchConfigurationService, useValue: {
|
provide: SearchConfigurationService, useValue: {
|
||||||
|
@@ -67,7 +67,7 @@ describe('DsDynamicLookupRelationExternalSourceTabComponent', () => {
|
|||||||
init();
|
init();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ExternalSourceEntryImportModalComponent],
|
declarations: [ExternalSourceEntryImportModalComponent],
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule.forRoot()],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: LookupRelationService, useValue: lookupRelationService },
|
{ provide: LookupRelationService, useValue: lookupRelationService },
|
||||||
{ provide: SelectableListService, useValue: selectService },
|
{ provide: SelectableListService, useValue: selectService },
|
||||||
|
@@ -14,7 +14,7 @@ export class FormFieldPreviousValueObject {
|
|||||||
return this._path;
|
return this._path;
|
||||||
}
|
}
|
||||||
|
|
||||||
set path(path: any[]) {
|
set path(path: string | string[]) {
|
||||||
this._path = path;
|
this._path = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -142,7 +142,7 @@ describe('FormComponent test suite', () => {
|
|||||||
CommonModule,
|
CommonModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
StoreModule.forRoot({}),
|
StoreModule.forRoot({}),
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
|
@@ -92,7 +92,7 @@ export class InputSuggestionsComponent implements ControlValueAccessor, OnChange
|
|||||||
/**
|
/**
|
||||||
* Reference to the input field component
|
* Reference to the input field component
|
||||||
*/
|
*/
|
||||||
@ViewChild('inputField') queryInput: ElementRef;
|
@ViewChild('inputField', {static: false}) queryInput: ElementRef;
|
||||||
/**
|
/**
|
||||||
* Reference to the suggestion components
|
* Reference to the suggestion components
|
||||||
*/
|
*/
|
||||||
|
@@ -223,4 +223,6 @@ export type MenuAction =
|
|||||||
| ActivateMenuSectionAction
|
| ActivateMenuSectionAction
|
||||||
| DeactivateMenuSectionAction
|
| DeactivateMenuSectionAction
|
||||||
| ToggleActiveMenuSectionAction
|
| ToggleActiveMenuSectionAction
|
||||||
|
| CollapseMenuPreviewAction
|
||||||
|
| ExpandMenuPreviewAction
|
||||||
/* tslint:enable:max-classes-per-file */
|
/* tslint:enable:max-classes-per-file */
|
||||||
|
@@ -28,7 +28,7 @@ export class MetadataRepresentationLoaderComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* Directive to determine where the dynamic child component is located
|
* Directive to determine where the dynamic child component is located
|
||||||
*/
|
*/
|
||||||
@ViewChild(MetadataRepresentationDirective) mdRepDirective: MetadataRepresentationDirective;
|
@ViewChild(MetadataRepresentationDirective, {static: true}) mdRepDirective: MetadataRepresentationDirective;
|
||||||
|
|
||||||
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
|
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
|
||||||
}
|
}
|
||||||
|
@@ -18,7 +18,7 @@ describe('ClaimedTaskActionsRejectComponent', () => {
|
|||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {
|
loader: {
|
||||||
@@ -75,7 +75,7 @@ describe('ClaimedTaskActionsRejectComponent', () => {
|
|||||||
expect(span).toBeDefined();
|
expect(span).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call openRejectModal on reject button click', fakeAsync(() => {
|
it('should call openRejectModal on reject button click', () => {
|
||||||
spyOn(component.rejectForm, 'reset');
|
spyOn(component.rejectForm, 'reset');
|
||||||
const btn = fixture.debugElement.query(By.css('.btn-danger'));
|
const btn = fixture.debugElement.query(By.css('.btn-danger'));
|
||||||
btn.nativeElement.click();
|
btn.nativeElement.click();
|
||||||
@@ -85,9 +85,9 @@ describe('ClaimedTaskActionsRejectComponent', () => {
|
|||||||
expect(component.modalRef).toBeDefined();
|
expect(component.modalRef).toBeDefined();
|
||||||
|
|
||||||
component.modalRef.close()
|
component.modalRef.close()
|
||||||
}));
|
});
|
||||||
|
|
||||||
it('should call confirmReject on form submit', fakeAsync(() => {
|
it('should call confirmReject on form submit', () => {
|
||||||
spyOn(component.reject, 'emit');
|
spyOn(component.reject, 'emit');
|
||||||
|
|
||||||
const btn = fixture.debugElement.query(By.css('.btn-danger'));
|
const btn = fixture.debugElement.query(By.css('.btn-danger'));
|
||||||
@@ -104,5 +104,5 @@ describe('ClaimedTaskActionsRejectComponent', () => {
|
|||||||
expect(component.reject.emit).toHaveBeenCalled();
|
expect(component.reject.emit).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
}));
|
});
|
||||||
});
|
});
|
||||||
|
@@ -72,7 +72,7 @@ describe('WorkspaceitemActionsComponent', () => {
|
|||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {
|
loader: {
|
||||||
provide: TranslateLoader,
|
provide: TranslateLoader,
|
||||||
@@ -128,7 +128,7 @@ describe('WorkspaceitemActionsComponent', () => {
|
|||||||
expect(btn).toBeDefined();
|
expect(btn).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call confirmDiscard on discard confirmation', fakeAsync(() => {
|
it('should call confirmDiscard on discard confirmation', () => {
|
||||||
mockDataService.delete.and.returnValue(observableOf(true));
|
mockDataService.delete.and.returnValue(observableOf(true));
|
||||||
spyOn(component, 'reload');
|
spyOn(component, 'reload');
|
||||||
const btn = fixture.debugElement.query(By.css('.btn-danger'));
|
const btn = fixture.debugElement.query(By.css('.btn-danger'));
|
||||||
@@ -144,7 +144,7 @@ describe('WorkspaceitemActionsComponent', () => {
|
|||||||
expect(mockDataService.delete).toHaveBeenCalledWith(mockObject);
|
expect(mockDataService.delete).toHaveBeenCalledWith(mockObject);
|
||||||
});
|
});
|
||||||
|
|
||||||
}));
|
});
|
||||||
|
|
||||||
it('should display a success notification on delete success', async(() => {
|
it('should display a success notification on delete success', async(() => {
|
||||||
spyOn((component as any).modalService, 'open').and.returnValue({result: Promise.resolve('ok')});
|
spyOn((component as any).modalService, 'open').and.returnValue({result: Promise.resolve('ok')});
|
||||||
|
@@ -24,7 +24,7 @@ describe('NumberPickerComponent test suite', () => {
|
|||||||
imports: [
|
imports: [
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot()
|
NgbModule
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
NumberPickerComponent,
|
NumberPickerComponent,
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Component, ComponentFactoryResolver, Input, OnInit, ViewChild } from '@angular/core';
|
import { Component, ComponentFactoryResolver, ContentChild, ElementRef, Input, OnInit, ViewChild } from '@angular/core';
|
||||||
import { ListableObject } from '../listable-object.model';
|
import { ListableObject } from '../listable-object.model';
|
||||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||||
import { Context } from '../../../../core/shared/context.model';
|
import { Context } from '../../../../core/shared/context.model';
|
||||||
@@ -49,7 +49,7 @@ export class ListableObjectComponentLoaderComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* Directive hook used to place the dynamic child component
|
* Directive hook used to place the dynamic child component
|
||||||
*/
|
*/
|
||||||
@ViewChild(ListableObjectDirective) listableObjectDirective: ListableObjectDirective;
|
@ViewChild(ListableObjectDirective, {static: true}) listableObjectDirective: ListableObjectDirective;
|
||||||
|
|
||||||
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
|
constructor(private componentFactoryResolver: ComponentFactoryResolver) {
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
:host {
|
:host {
|
||||||
/deep/ em {
|
::ng-deep em {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@ import { isEqual, isObject, transform } from 'lodash';
|
|||||||
* Returns passed object without specified property
|
* Returns passed object without specified property
|
||||||
*/
|
*/
|
||||||
export function deleteProperty(object: object, key: string): object {
|
export function deleteProperty(object: object, key: string): object {
|
||||||
const {[key]: deletedKey, ...otherKeys} = object;
|
const { [key]: deletedKey, ...otherKeys } = object as { [key: string]: any };
|
||||||
return otherKeys;
|
return otherKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ export function difference(object: object, base: object) {
|
|||||||
const changes = (o, b) => {
|
const changes = (o, b) => {
|
||||||
return transform(o, (result, value, key) => {
|
return transform(o, (result, value, key) => {
|
||||||
if (!isEqual(value, b[key]) && isNotEmpty(value)) {
|
if (!isEqual(value, b[key]) && isNotEmpty(value)) {
|
||||||
const resultValue = (isObject(value) && isObject(b[key])) ? changes(value, b[key]) : value;
|
const resultValue = (isObject(value) && isObject(b[key])) ? changes(value, b[key]) : value as object;
|
||||||
if (!hasOnlyEmptyProperties(resultValue)) {
|
if (!hasOnlyEmptyProperties(resultValue)) {
|
||||||
result[key] = resultValue;
|
result[key] = resultValue;
|
||||||
}
|
}
|
||||||
|
@@ -139,7 +139,7 @@ describe('Pagination component', () => {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
NgxPaginationModule,
|
NgxPaginationModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
RouterTestingModule.withRoutes([
|
RouterTestingModule.withRoutes([
|
||||||
{ path: 'home', component: TestComponent }
|
{ path: 'home', component: TestComponent }
|
||||||
])],
|
])],
|
||||||
|
@@ -1,9 +1,7 @@
|
|||||||
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
||||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { hasValue, isNotEmpty } from '../empty.util';
|
import { isNotEmpty } from '../empty.util';
|
||||||
import { QueryParamsHandling } from '@angular/router/src/config';
|
|
||||||
import { MYDSPACE_ROUTE } from '../../+my-dspace-page/my-dspace-page.component';
|
|
||||||
import { SearchService } from '../../core/shared/search/search.service';
|
import { SearchService } from '../../core/shared/search/search.service';
|
||||||
import { currentPath } from '../utils/route.utils';
|
import { currentPath } from '../utils/route.utils';
|
||||||
|
|
||||||
|
@@ -1,6 +1,5 @@
|
|||||||
import { isNotEmpty } from '../empty.util';
|
import { isNotEmpty } from '../empty.util';
|
||||||
import { URLCombiner } from '../../core/url-combiner/url-combiner';
|
import { URLCombiner } from '../../core/url-combiner/url-combiner';
|
||||||
import 'core-js/library/fn/object/entries';
|
|
||||||
import { SearchFilter } from './search-filter.model';
|
import { SearchFilter } from './search-filter.model';
|
||||||
import { DSpaceObjectType } from '../../core/shared/dspace-object-type.model';
|
import { DSpaceObjectType } from '../../core/shared/dspace-object-type.model';
|
||||||
import { ViewMode } from '../../core/shared/view-mode.model';
|
import { ViewMode } from '../../core/shared/view-mode.model';
|
||||||
|
@@ -12,7 +12,7 @@ describe('SearchSidebarComponent', () => {
|
|||||||
// async beforeEach
|
// async beforeEach
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), NgbCollapseModule.forRoot()],
|
imports: [TranslateModule.forRoot(), NgbCollapseModule],
|
||||||
declarations: [SearchSidebarComponent],
|
declarations: [SearchSidebarComponent],
|
||||||
schemas: [NO_ERRORS_SCHEMA],
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
})
|
})
|
||||||
|
@@ -66,7 +66,6 @@ import { DsDynamicFormGroupComponent } from './form/builder/ds-dynamic-form-ui/m
|
|||||||
import { DsDynamicFormArrayComponent } from './form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component';
|
import { DsDynamicFormArrayComponent } from './form/builder/ds-dynamic-form-ui/models/array-group/dynamic-form-array.component';
|
||||||
import { DsDynamicRelationGroupComponent } from './form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components';
|
import { DsDynamicRelationGroupComponent } from './form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.components';
|
||||||
import { DsDatePickerInlineComponent } from './form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component';
|
import { DsDatePickerInlineComponent } from './form/builder/ds-dynamic-form-ui/models/date-picker-inline/dynamic-date-picker-inline.component';
|
||||||
import { SortablejsModule } from 'angular-sortablejs';
|
|
||||||
import { NumberPickerComponent } from './number-picker/number-picker.component';
|
import { NumberPickerComponent } from './number-picker/number-picker.component';
|
||||||
import { DsDatePickerComponent } from './form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component';
|
import { DsDatePickerComponent } from './form/builder/ds-dynamic-form-ui/models/date-picker/date-picker.component';
|
||||||
import { DsDynamicLookupComponent } from './form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component';
|
import { DsDynamicLookupComponent } from './form/builder/ds-dynamic-form-ui/models/lookup/dynamic-lookup.component';
|
||||||
@@ -177,6 +176,7 @@ import { ExternalSourceEntryImportModalComponent } from './form/builder/ds-dynam
|
|||||||
import { ImportableListItemControlComponent } from './object-collection/shared/importable-list-item-control/importable-list-item-control.component';
|
import { ImportableListItemControlComponent } from './object-collection/shared/importable-list-item-control/importable-list-item-control.component';
|
||||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||||
import { ExistingMetadataListElementComponent } from './form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component';
|
import { ExistingMetadataListElementComponent } from './form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component';
|
||||||
|
import { SortablejsModule } from 'ngx-sortablejs';
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
// Do NOT include UniversalModule, HttpModule, or JsonpModule here
|
||||||
|
@@ -27,7 +27,7 @@ describe('StartsWithDateComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [StartsWithDateComponent, EnumKeysPipe],
|
declarations: [StartsWithDateComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: 'startsWithOptions', useValue: options },
|
{ provide: 'startsWithOptions', useValue: options },
|
||||||
|
@@ -19,7 +19,7 @@ describe('StartsWithTextComponent', () => {
|
|||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule.forRoot()],
|
imports: [CommonModule, RouterTestingModule.withRoutes([]), TranslateModule.forRoot(), NgbModule],
|
||||||
declarations: [StartsWithTextComponent, EnumKeysPipe],
|
declarations: [StartsWithTextComponent, EnumKeysPipe],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: 'startsWithOptions', useValue: options }
|
{ provide: 'startsWithOptions', useValue: options }
|
||||||
|
@@ -222,7 +222,7 @@ describe('SubmissionFormCollectionComponent Component', () => {
|
|||||||
imports: [
|
imports: [
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@@ -34,7 +34,7 @@ describe('SubmissionFormFooterComponent Component', () => {
|
|||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
@@ -188,7 +188,7 @@ describe('SubmissionFormFooterComponent Component', () => {
|
|||||||
expect(submissionServiceStub.dispatchDeposit).toHaveBeenCalledWith(submissionId);
|
expect(submissionServiceStub.dispatchDeposit).toHaveBeenCalledWith(submissionId);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should call dispatchDiscard on discard confirmation', fakeAsync(() => {
|
it('should call dispatchDiscard on discard confirmation', () => {
|
||||||
comp.showDepositAndDiscard = observableOf(true);
|
comp.showDepositAndDiscard = observableOf(true);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const modalBtn = fixture.debugElement.query(By.css('.btn-danger'));
|
const modalBtn = fixture.debugElement.query(By.css('.btn-danger'));
|
||||||
@@ -204,7 +204,7 @@ describe('SubmissionFormFooterComponent Component', () => {
|
|||||||
fixture.whenStable().then(() => {
|
fixture.whenStable().then(() => {
|
||||||
expect(submissionServiceStub.dispatchDiscard).toHaveBeenCalledWith(submissionId);
|
expect(submissionServiceStub.dispatchDiscard).toHaveBeenCalledWith(submissionId);
|
||||||
});
|
});
|
||||||
}));
|
});
|
||||||
|
|
||||||
it('should have deposit button disabled when submission is not valid', () => {
|
it('should have deposit button disabled when submission is not valid', () => {
|
||||||
comp.showDepositAndDiscard = observableOf(true);
|
comp.showDepositAndDiscard = observableOf(true);
|
||||||
|
@@ -59,7 +59,7 @@ describe('SubmissionFormSectionAddComponent Component', () => {
|
|||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@@ -796,4 +796,5 @@ export type SubmissionObjectAction = DisableSectionAction
|
|||||||
| SaveSubmissionSectionFormAction
|
| SaveSubmissionSectionFormAction
|
||||||
| SaveSubmissionSectionFormSuccessAction
|
| SaveSubmissionSectionFormSuccessAction
|
||||||
| SaveSubmissionSectionFormErrorAction
|
| SaveSubmissionSectionFormErrorAction
|
||||||
| SetActiveSectionAction;
|
| SetActiveSectionAction
|
||||||
|
| DepositSubmissionAction;
|
||||||
|
@@ -22,14 +22,13 @@ import {
|
|||||||
SaveAndDepositSubmissionAction,
|
SaveAndDepositSubmissionAction,
|
||||||
SaveForLaterSubmissionFormAction,
|
SaveForLaterSubmissionFormAction,
|
||||||
SaveForLaterSubmissionFormErrorAction,
|
SaveForLaterSubmissionFormErrorAction,
|
||||||
SaveForLaterSubmissionFormSuccessAction,
|
|
||||||
SaveSubmissionFormAction,
|
SaveSubmissionFormAction,
|
||||||
SaveSubmissionFormErrorAction,
|
SaveSubmissionFormErrorAction,
|
||||||
SaveSubmissionFormSuccessAction,
|
SaveSubmissionFormSuccessAction,
|
||||||
SaveSubmissionSectionFormAction,
|
SaveSubmissionSectionFormAction,
|
||||||
SaveSubmissionSectionFormErrorAction,
|
SaveSubmissionSectionFormErrorAction,
|
||||||
SaveSubmissionSectionFormSuccessAction,
|
SaveSubmissionSectionFormSuccessAction,
|
||||||
SectionStatusChangeAction,
|
SectionStatusChangeAction, SubmissionObjectAction,
|
||||||
UpdateSectionDataAction
|
UpdateSectionDataAction
|
||||||
} from './submission-objects.actions';
|
} from './submission-objects.actions';
|
||||||
import { SectionsType } from '../sections/sections-type';
|
import { SectionsType } from '../sections/sections-type';
|
||||||
@@ -117,7 +116,7 @@ describe('submissionReducer test suite', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should set to true savePendig flag on save', () => {
|
it('should set to true savePendig flag on save', () => {
|
||||||
let action = new SaveSubmissionFormAction(submissionId);
|
let action: SubmissionObjectAction = new SaveSubmissionFormAction(submissionId);
|
||||||
let newState = submissionObjectReducer(initState, action);
|
let newState = submissionObjectReducer(initState, action);
|
||||||
|
|
||||||
expect(newState[826].savePending).toBeTruthy();
|
expect(newState[826].savePending).toBeTruthy();
|
||||||
@@ -273,7 +272,7 @@ describe('submissionReducer test suite', () => {
|
|||||||
|
|
||||||
it('should enable submission section properly', () => {
|
it('should enable submission section properly', () => {
|
||||||
|
|
||||||
let action = new EnableSectionAction(submissionId, 'traditionalpagetwo');
|
let action: SubmissionObjectAction = new EnableSectionAction(submissionId, 'traditionalpagetwo');
|
||||||
let newState = submissionObjectReducer(initState, action);
|
let newState = submissionObjectReducer(initState, action);
|
||||||
|
|
||||||
action = new DisableSectionAction(submissionId, 'traditionalpagetwo');
|
action = new DisableSectionAction(submissionId, 'traditionalpagetwo');
|
||||||
|
@@ -548,7 +548,7 @@ function startDeposit(state: SubmissionObjectState, action: DepositSubmissionAct
|
|||||||
* @return SubmissionObjectState
|
* @return SubmissionObjectState
|
||||||
* the new state, with the deposit flag changed.
|
* the new state, with the deposit flag changed.
|
||||||
*/
|
*/
|
||||||
function endDeposit(state: SubmissionObjectState, action: DepositSubmissionSuccessAction | DepositSubmissionErrorAction): SubmissionObjectState {
|
function endDeposit(state: SubmissionObjectState, action: DepositSubmissionSuccessAction | DepositSubmissionErrorAction | DepositSubmissionAction): SubmissionObjectState {
|
||||||
if (hasValue(state[ action.payload.submissionId ])) {
|
if (hasValue(state[ action.payload.submissionId ])) {
|
||||||
return Object.assign({}, state, {
|
return Object.assign({}, state, {
|
||||||
[ action.payload.submissionId ]: Object.assign({}, state[ action.payload.submissionId ], {
|
[ action.payload.submissionId ]: Object.assign({}, state[ action.payload.submissionId ], {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
:host /deep/ .card {
|
:host ::ng-deep .card {
|
||||||
margin-bottom: $submission-sections-margin-bottom;
|
margin-bottom: $submission-sections-margin-bottom;
|
||||||
overflow: unset;
|
overflow: unset;
|
||||||
}
|
}
|
||||||
@@ -9,13 +9,13 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO to remove the following when upgrading @ng-bootstrap
|
// TODO to remove the following when upgrading @ng-bootstrap
|
||||||
:host /deep/ .card:first-of-type {
|
:host ::ng-deep .card:first-of-type {
|
||||||
border-bottom: $card-border-width solid $card-border-color !important;
|
border-bottom: $card-border-width solid $card-border-color !important;
|
||||||
border-bottom-left-radius: $card-border-radius !important;
|
border-bottom-left-radius: $card-border-radius !important;
|
||||||
border-bottom-right-radius: $card-border-radius !important;
|
border-bottom-right-radius: $card-border-radius !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
:host /deep/ .card-header button {
|
:host ::ng-deep .card-header button {
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@@ -67,7 +67,7 @@ describe('SubmissionSectionContainerComponent test suite', () => {
|
|||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
NgbModule.forRoot(),
|
NgbModule,
|
||||||
TranslateModule.forRoot()
|
TranslateModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [
|
declarations: [
|
||||||
|
@@ -48,7 +48,7 @@ export class SubmissionSectionContainerComponent implements OnInit {
|
|||||||
/**
|
/**
|
||||||
* The SectionsDirective reference
|
* The SectionsDirective reference
|
||||||
*/
|
*/
|
||||||
@ViewChild('sectionRef') sectionRef: SectionsDirective;
|
@ViewChild('sectionRef', {static: false}) sectionRef: SectionsDirective;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize instance variables
|
* Initialize instance variables
|
||||||
|
@@ -112,7 +112,7 @@ export class SubmissionSectionformComponent extends SectionModelComponent {
|
|||||||
/**
|
/**
|
||||||
* The FormComponent reference
|
* The FormComponent reference
|
||||||
*/
|
*/
|
||||||
@ViewChild('formRef') private formRef: FormComponent;
|
@ViewChild('formRef', {static: false}) private formRef: FormComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize instance variables
|
* Initialize instance variables
|
||||||
|
@@ -85,7 +85,7 @@ export class SubmissionSectionLicenseComponent extends SectionModelComponent {
|
|||||||
/**
|
/**
|
||||||
* The FormComponent reference
|
* The FormComponent reference
|
||||||
*/
|
*/
|
||||||
@ViewChild('formRef') private formRef: FormComponent;
|
@ViewChild('formRef', {static: false}) private formRef: FormComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize instance variables
|
* Initialize instance variables
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user