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