mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
87968: Update ESLint disable/enable comments
eslint-disable max-classes-per-file only works at the top of the file now
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { EPerson } from '../../core/eperson/models/eperson.model';
|
import { EPerson } from '../../core/eperson/models/eperson.model';
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -16,7 +17,6 @@ export const EPeopleRegistryActionTypes = {
|
|||||||
CANCEL_EDIT_EPERSON: type('dspace/epeople-registry/CANCEL_EDIT_EPERSON'),
|
CANCEL_EDIT_EPERSON: type('dspace/epeople-registry/CANCEL_EDIT_EPERSON'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to edit an EPerson in the EPeople registry
|
* Used to edit an EPerson in the EPeople registry
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,6 @@ export class EPeopleRegistryCancelEPersonAction implements Action {
|
|||||||
type = EPeopleRegistryActionTypes.CANCEL_EDIT_EPERSON;
|
type = EPeopleRegistryActionTypes.CANCEL_EDIT_EPERSON;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { Group } from '../../core/eperson/models/group.model';
|
import { Group } from '../../core/eperson/models/group.model';
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -16,7 +17,6 @@ export const GroupRegistryActionTypes = {
|
|||||||
CANCEL_EDIT_GROUP: type('dspace/epeople-registry/CANCEL_EDIT_GROUP'),
|
CANCEL_EDIT_GROUP: type('dspace/epeople-registry/CANCEL_EDIT_GROUP'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to edit a Group in the Group registry
|
* Used to edit a Group in the Group registry
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,6 @@ export class GroupRegistryCancelGroupAction implements Action {
|
|||||||
type = GroupRegistryActionTypes.CANCEL_EDIT_GROUP;
|
type = GroupRegistryActionTypes.CANCEL_EDIT_GROUP;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../../../shared/ngrx/type';
|
import { type } from '../../../shared/ngrx/type';
|
||||||
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
|
import { BitstreamFormat } from '../../../core/shared/bitstream-format.model';
|
||||||
@@ -17,7 +18,6 @@ export const BitstreamFormatsRegistryActionTypes = {
|
|||||||
DESELECT_ALL_FORMAT: type('dspace/bitstream-formats-registry/DESELECT_ALL_FORMAT')
|
DESELECT_ALL_FORMAT: type('dspace/bitstream-formats-registry/DESELECT_ALL_FORMAT')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to select a single bitstream format in the bitstream format registry
|
* Used to select a single bitstream format in the bitstream format registry
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +51,6 @@ export class BitstreamFormatsRegistryDeselectAllAction implements Action {
|
|||||||
type = BitstreamFormatsRegistryActionTypes.DESELECT_ALL_FORMAT;
|
type = BitstreamFormatsRegistryActionTypes.DESELECT_ALL_FORMAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../../../shared/ngrx/type';
|
import { type } from '../../../shared/ngrx/type';
|
||||||
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
import { MetadataSchema } from '../../../core/metadata/metadata-schema.model';
|
||||||
@@ -26,7 +27,6 @@ export const MetadataRegistryActionTypes = {
|
|||||||
DESELECT_ALL_FIELD: type('dspace/metadata-registry/DESELECT_ALL_FIELD')
|
DESELECT_ALL_FIELD: type('dspace/metadata-registry/DESELECT_ALL_FIELD')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to edit a metadata schema in the metadata registry
|
* Used to edit a metadata schema in the metadata registry
|
||||||
*/
|
*/
|
||||||
@@ -133,7 +133,6 @@ export class MetadataRegistryDeselectAllFieldAction implements Action {
|
|||||||
type = MetadataRegistryActionTypes.DESELECT_ALL_FIELD;
|
type = MetadataRegistryActionTypes.DESELECT_ALL_FIELD;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { createSelector, Store } from '@ngrx/store';
|
import { createSelector, Store } from '@ngrx/store';
|
||||||
|
|
||||||
@@ -108,7 +109,6 @@ export const MAX_COMCOLS_PER_PAGE = 20;
|
|||||||
* Service class for the community list, responsible for the creating of the flat list used by communityList dataSource
|
* Service class for the community list, responsible for the creating of the flat list used by communityList dataSource
|
||||||
* and connection to the store to retrieve and save the state of the community list
|
* and connection to the store to retrieve and save the state of the community list
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line max-classes-per-file
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CommunityListService {
|
export class CommunityListService {
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
// import @ngrx
|
// import @ngrx
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
// import type function
|
// import type function
|
||||||
@@ -39,7 +40,6 @@ export const AuthActionTypes = {
|
|||||||
UNSET_USER_AS_IDLE: type('dspace/auth/UNSET_USER_AS_IDLE')
|
UNSET_USER_AS_IDLE: type('dspace/auth/UNSET_USER_AS_IDLE')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authenticate.
|
* Authenticate.
|
||||||
@@ -411,7 +411,6 @@ export class SetUserAsIdleAction implements Action {
|
|||||||
export class UnsetUserAsIdleAction implements Action {
|
export class UnsetUserAsIdleAction implements Action {
|
||||||
public type: string = AuthActionTypes.UNSET_USER_AS_IDLE;
|
public type: string = AuthActionTypes.UNSET_USER_AS_IDLE;
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions type.
|
* Actions type.
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { dataService } from '../cache/builders/build-decorators';
|
import { dataService } from '../cache/builders/build-decorators';
|
||||||
import { BROWSE_DEFINITION } from '../shared/browse-definition.resource-type';
|
import { BROWSE_DEFINITION } from '../shared/browse-definition.resource-type';
|
||||||
@@ -18,7 +19,6 @@ import { RemoteData } from '../data/remote-data';
|
|||||||
import { FindListOptions } from '../data/request.models';
|
import { FindListOptions } from '../data/request.models';
|
||||||
import { PaginatedList } from '../data/paginated-list.model';
|
import { PaginatedList } from '../data/paginated-list.model';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
class DataServiceImpl extends DataService<BrowseDefinition> {
|
class DataServiceImpl extends DataService<BrowseDefinition> {
|
||||||
protected linkPath = 'browses';
|
protected linkPath = 'browses';
|
||||||
@@ -123,4 +123,3 @@ export class BrowseDefinitionDataService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { HALLink } from '../../shared/hal-link.model';
|
import { HALLink } from '../../shared/hal-link.model';
|
||||||
import { HALResource } from '../../shared/hal-resource.model';
|
import { HALResource } from '../../shared/hal-resource.model';
|
||||||
import { ResourceType } from '../../shared/resource-type';
|
import { ResourceType } from '../../shared/resource-type';
|
||||||
import { dataService, getDataServiceFor, getLinkDefinition, link, } from './build-decorators';
|
import { dataService, getDataServiceFor, getLinkDefinition, link, } from './build-decorators';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class TestService {
|
class TestService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,4 +80,3 @@ describe('build decorators', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { followLink, FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
|
import { followLink, FollowLinkConfig } from '../../../shared/utils/follow-link-config.model';
|
||||||
@@ -12,7 +13,6 @@ import { isEmpty } from 'rxjs/operators';
|
|||||||
const TEST_MODEL = new ResourceType('testmodel');
|
const TEST_MODEL = new ResourceType('testmodel');
|
||||||
let result: any;
|
let result: any;
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class TestModel implements HALResource {
|
class TestModel implements HALResource {
|
||||||
static type = TEST_MODEL;
|
static type = TEST_MODEL;
|
||||||
|
|
||||||
@@ -251,4 +251,3 @@ describe('LinkService', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
3
src/app/core/cache/object-cache.actions.ts
vendored
3
src/app/core/cache/object-cache.actions.ts
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -15,7 +16,6 @@ export const ObjectCacheActionTypes = {
|
|||||||
APPLY_PATCH: type('dspace/core/cache/object/APPLY_PATCH')
|
APPLY_PATCH: type('dspace/core/cache/object/APPLY_PATCH')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* An ngrx action to add an object to the cache
|
* An ngrx action to add an object to the cache
|
||||||
*/
|
*/
|
||||||
@@ -126,7 +126,6 @@ export class ApplyPatchObjectCacheAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all ObjectCacheActions
|
* A type to encompass all ObjectCacheActions
|
||||||
|
3
src/app/core/cache/object-cache.reducer.ts
vendored
3
src/app/core/cache/object-cache.reducer.ts
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { HALLink } from '../shared/hal-link.model';
|
import { HALLink } from '../shared/hal-link.model';
|
||||||
import { HALResource } from '../shared/hal-resource.model';
|
import { HALResource } from '../shared/hal-resource.model';
|
||||||
import {
|
import {
|
||||||
@@ -49,7 +50,6 @@ export const getResourceTypeValueFor = (type: any): string => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* An interface to represent objects that can be cached
|
* An interface to represent objects that can be cached
|
||||||
*
|
*
|
||||||
@@ -110,7 +110,6 @@ export class ObjectCacheEntry implements CacheEntry {
|
|||||||
alternativeLinks: string[];
|
alternativeLinks: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The ObjectCache State
|
* The ObjectCache State
|
||||||
|
3
src/app/core/cache/response.models.ts
vendored
3
src/app/core/cache/response.models.ts
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { RequestError } from '../data/request.models';
|
import { RequestError } from '../data/request.models';
|
||||||
import { PageInfo } from '../shared/page-info.model';
|
import { PageInfo } from '../shared/page-info.model';
|
||||||
import { ConfigObject } from '../config/models/config.model';
|
import { ConfigObject } from '../config/models/config.model';
|
||||||
@@ -5,7 +6,6 @@ import { DSpaceObject } from '../shared/dspace-object.model';
|
|||||||
import { HALLink } from '../shared/hal-link.model';
|
import { HALLink } from '../shared/hal-link.model';
|
||||||
import { UnCacheableObject } from '../shared/uncacheable-object.model';
|
import { UnCacheableObject } from '../shared/uncacheable-object.model';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
export class RestResponse {
|
export class RestResponse {
|
||||||
public toCache = true;
|
public toCache = true;
|
||||||
public timeCompleted: number;
|
public timeCompleted: number;
|
||||||
@@ -140,4 +140,3 @@ export class FilteredDiscoveryQueryResponse extends RestResponse {
|
|||||||
super(true, statusCode, statusText);
|
super(true, statusCode, statusText);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -12,7 +13,6 @@ export const ServerSyncBufferActionTypes = {
|
|||||||
EMPTY: type('dspace/core/cache/syncbuffer/EMPTY'),
|
EMPTY: type('dspace/core/cache/syncbuffer/EMPTY'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An ngrx action to add a new cached object to the server sync buffer
|
* An ngrx action to add a new cached object to the server sync buffer
|
||||||
@@ -71,7 +71,6 @@ export class EmptySSBAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all ServerSyncBufferActions
|
* A type to encompass all ServerSyncBufferActions
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { RequestService } from '../data/request.service';
|
import { RequestService } from '../data/request.service';
|
||||||
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
import { HALEndpointService } from '../shared/hal-endpoint.service';
|
||||||
@@ -31,7 +32,6 @@ class DataServiceImpl extends DataService<ConfigObject> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line max-classes-per-file
|
|
||||||
export abstract class ConfigService {
|
export abstract class ConfigService {
|
||||||
/**
|
/**
|
||||||
* A private DataService instance to delegate specific methods to.
|
* A private DataService instance to delegate specific methods to.
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { BaseResponseParsingService } from './base-response-parsing.service';
|
import { BaseResponseParsingService } from './base-response-parsing.service';
|
||||||
import { ObjectCacheService } from '../cache/object-cache.service';
|
import { ObjectCacheService } from '../cache/object-cache.service';
|
||||||
import { CacheableObject } from '../cache/object-cache.reducer';
|
import { CacheableObject } from '../cache/object-cache.reducer';
|
||||||
import { GetRequest, RestRequest } from './request.models';
|
import { GetRequest, RestRequest } from './request.models';
|
||||||
import { DSpaceObject } from '../shared/dspace-object.model';
|
import { DSpaceObject } from '../shared/dspace-object.model';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class TestService extends BaseResponseParsingService {
|
class TestService extends BaseResponseParsingService {
|
||||||
toCache = true;
|
toCache = true;
|
||||||
|
|
||||||
@@ -101,4 +101,3 @@ describe('BaseResponseParsingService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { hasNoValue, hasValue, isNotEmpty } from '../../shared/empty.util';
|
import { hasNoValue, hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||||
import { DSpaceSerializer } from '../dspace-rest/dspace.serializer';
|
import { DSpaceSerializer } from '../dspace-rest/dspace.serializer';
|
||||||
import { CacheableObject } from '../cache/object-cache.reducer';
|
import { CacheableObject } from '../cache/object-cache.reducer';
|
||||||
@@ -10,7 +11,6 @@ import { getClassForType } from '../cache/builders/build-decorators';
|
|||||||
import { RestRequest } from './request.models';
|
import { RestRequest } from './request.models';
|
||||||
import { environment } from '../../../environments/environment';
|
import { environment } from '../../../environments/environment';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if halObj has a value for `_links.self`
|
* Return true if halObj has a value for `_links.self`
|
||||||
@@ -180,4 +180,3 @@ export abstract class BaseResponseParsingService {
|
|||||||
return statusCode >= 200 && statusCode < 300;
|
return statusCode >= 200 && statusCode < 300;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
@@ -15,7 +16,6 @@ import { ConfigurationProperty } from '../shared/configuration-property.model';
|
|||||||
import { DefaultChangeAnalyzer } from './default-change-analyzer.service';
|
import { DefaultChangeAnalyzer } from './default-change-analyzer.service';
|
||||||
import { CONFIG_PROPERTY } from '../shared/config-property.resource-type';
|
import { CONFIG_PROPERTY } from '../shared/config-property.resource-type';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class DataServiceImpl extends DataService<ConfigurationProperty> {
|
class DataServiceImpl extends DataService<ConfigurationProperty> {
|
||||||
protected linkPath = 'properties';
|
protected linkPath = 'properties';
|
||||||
|
|
||||||
@@ -60,4 +60,3 @@ export class ConfigurationDataService {
|
|||||||
return this.dataService.findById(name);
|
return this.dataService.findById(name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { compare, Operation } from 'fast-json-patch';
|
import { compare, Operation } from 'fast-json-patch';
|
||||||
@@ -26,7 +27,6 @@ import { RequestEntryState } from './request.reducer';
|
|||||||
|
|
||||||
const endpoint = 'https://rest.api/core';
|
const endpoint = 'https://rest.api/core';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class TestService extends DataService<any> {
|
class TestService extends DataService<any> {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@@ -833,4 +833,3 @@ describe('DataService', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
@@ -18,7 +19,6 @@ import { RequestService } from './request.service';
|
|||||||
import { FindListOptions } from './request.models';
|
import { FindListOptions } from './request.models';
|
||||||
import { PaginatedList } from './paginated-list.model';
|
import { PaginatedList } from './paginated-list.model';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class DataServiceImpl extends DataService<DSpaceObject> {
|
class DataServiceImpl extends DataService<DSpaceObject> {
|
||||||
protected linkPath = 'dso';
|
protected linkPath = 'dso';
|
||||||
|
|
||||||
@@ -104,4 +104,3 @@ export class DSpaceObjectDataService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { hasNoValue, hasValue, isNotEmpty } from '../../shared/empty.util';
|
import { hasNoValue, hasValue, isNotEmpty } from '../../shared/empty.util';
|
||||||
import { DSpaceSerializer } from '../dspace-rest/dspace.serializer';
|
import { DSpaceSerializer } from '../dspace-rest/dspace.serializer';
|
||||||
import { CacheableObject } from '../cache/object-cache.reducer';
|
import { CacheableObject } from '../cache/object-cache.reducer';
|
||||||
@@ -18,7 +19,6 @@ import { RestRequestMethod } from './rest-request-method';
|
|||||||
import { getUrlWithoutEmbedParams, getEmbedSizeParams } from '../index/index.selectors';
|
import { getUrlWithoutEmbedParams, getEmbedSizeParams } from '../index/index.selectors';
|
||||||
import { URLCombiner } from '../url-combiner/url-combiner';
|
import { URLCombiner } from '../url-combiner/url-combiner';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return true if obj has a value for `_links.self`
|
* Return true if obj has a value for `_links.self`
|
||||||
@@ -271,4 +271,3 @@ export class DspaceRestResponseParsingService implements ResponseParsingService
|
|||||||
return statusCode >= 200 && statusCode < 300;
|
return statusCode >= 200 && statusCode < 300;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { DataService } from './data.service';
|
import { DataService } from './data.service';
|
||||||
import { RequestService } from './request.service';
|
import { RequestService } from './request.service';
|
||||||
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
import { RemoteDataBuildService } from '../cache/builders/remote-data-build.service';
|
||||||
@@ -20,7 +21,6 @@ import { ITEM_TYPE } from '../shared/item-relationships/item-type.resource-type'
|
|||||||
import { LICENSE } from '../shared/license.resource-type';
|
import { LICENSE } from '../shared/license.resource-type';
|
||||||
import { CacheableObject } from '../cache/object-cache.reducer';
|
import { CacheableObject } from '../cache/object-cache.reducer';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class DataServiceImpl extends DataService<any> {
|
class DataServiceImpl extends DataService<any> {
|
||||||
// linkPath isn't used if we're only searching by href.
|
// linkPath isn't used if we're only searching by href.
|
||||||
protected linkPath = undefined;
|
protected linkPath = undefined;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { ItemDataService } from './item-data.service';
|
import { ItemDataService } from './item-data.service';
|
||||||
import { UpdateDataService } from './update-data.service';
|
import { UpdateDataService } from './update-data.service';
|
||||||
@@ -24,7 +25,6 @@ import { hasValue } from '../../shared/empty.util';
|
|||||||
import { Operation } from 'fast-json-patch';
|
import { Operation } from 'fast-json-patch';
|
||||||
import { getFirstCompletedRemoteData } from '../shared/operators';
|
import { getFirstCompletedRemoteData } from '../shared/operators';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* A custom implementation of the ItemDataService, but for collection item templates
|
* A custom implementation of the ItemDataService, but for collection item templates
|
||||||
* Makes sure to change the endpoint before sending out CRUD requests for the item template
|
* Makes sure to change the endpoint before sending out CRUD requests for the item template
|
||||||
@@ -228,4 +228,3 @@ export class ItemTemplateDataService implements UpdateDataService<Item> {
|
|||||||
return this.dataService.getCollectionEndpoint(collectionID);
|
return this.dataService.getCollectionEndpoint(collectionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import {type} from '../../../shared/ngrx/type';
|
import {type} from '../../../shared/ngrx/type';
|
||||||
import {Action} from '@ngrx/store';
|
import {Action} from '@ngrx/store';
|
||||||
import {Identifiable} from './object-updates.reducer';
|
import {Identifiable} from './object-updates.reducer';
|
||||||
@@ -21,7 +22,6 @@ export const ObjectUpdatesActionTypes = {
|
|||||||
REMOVE_FIELD: type('dspace/core/cache/object-updates/REMOVE_FIELD')
|
REMOVE_FIELD: type('dspace/core/cache/object-updates/REMOVE_FIELD')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum that represents the different types of updates that can be performed on a field in the ObjectUpdates store
|
* Enum that represents the different types of updates that can be performed on a field in the ObjectUpdates store
|
||||||
@@ -283,7 +283,6 @@ export class RemoveFieldUpdateAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all ObjectUpdatesActions
|
* A type to encompass all ObjectUpdatesActions
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
import { RestRequest } from './request.models';
|
import { RestRequest } from './request.models';
|
||||||
@@ -17,7 +18,6 @@ export const RequestActionTypes = {
|
|||||||
REMOVE: type('dspace/core/data/request/REMOVE')
|
REMOVE: type('dspace/core/data/request/REMOVE')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
export abstract class RequestUpdateAction implements Action {
|
export abstract class RequestUpdateAction implements Action {
|
||||||
abstract type: string;
|
abstract type: string;
|
||||||
lastUpdated: number;
|
lastUpdated: number;
|
||||||
@@ -185,7 +185,6 @@ export class RequestRemoveAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all RequestActions
|
* A type to encompass all RequestActions
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { SortOptions } from '../cache/models/sort-options.model';
|
import { SortOptions } from '../cache/models/sort-options.model';
|
||||||
import { GenericConstructor } from '../shared/generic-constructor';
|
import { GenericConstructor } from '../shared/generic-constructor';
|
||||||
import { ResponseParsingService } from './parsing.service';
|
import { ResponseParsingService } from './parsing.service';
|
||||||
@@ -11,7 +12,6 @@ import { ContentSourceResponseParsingService } from './content-source-response-p
|
|||||||
import { DspaceRestResponseParsingService } from './dspace-rest-response-parsing.service';
|
import { DspaceRestResponseParsingService } from './dspace-rest-response-parsing.service';
|
||||||
import { environment } from '../../../environments/environment';
|
import { environment } from '../../../environments/environment';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
// uuid and handle requests have separate endpoints
|
// uuid and handle requests have separate endpoints
|
||||||
export enum IdentifierType {
|
export enum IdentifierType {
|
||||||
@@ -280,4 +280,3 @@ export class RequestError extends Error {
|
|||||||
statusCode: number;
|
statusCode: number;
|
||||||
statusText: string;
|
statusText: string;
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import {
|
import {
|
||||||
RequestAction,
|
RequestAction,
|
||||||
RequestActionTypes,
|
RequestActionTypes,
|
||||||
@@ -112,7 +113,6 @@ export class ResponseState {
|
|||||||
unCacheableObject?: UnCacheableObject;
|
unCacheableObject?: UnCacheableObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line max-classes-per-file
|
|
||||||
export class RequestEntry {
|
export class RequestEntry {
|
||||||
request: RestRequest;
|
request: RestRequest;
|
||||||
state: RequestEntryState;
|
state: RequestEntryState;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { DataService } from './data.service';
|
import { DataService } from './data.service';
|
||||||
import { Root } from './root.model';
|
import { Root } from './root.model';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
@@ -21,7 +22,6 @@ import { DspaceRestService } from '../dspace-rest/dspace-rest.service';
|
|||||||
import { RawRestResponse } from '../dspace-rest/raw-rest-response.model';
|
import { RawRestResponse } from '../dspace-rest/raw-rest-response.model';
|
||||||
import { catchError, map } from 'rxjs/operators';
|
import { catchError, map } from 'rxjs/operators';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A private DataService implementation to delegate specific methods to.
|
* A private DataService implementation to delegate specific methods to.
|
||||||
@@ -131,4 +131,3 @@ export class RootDataService {
|
|||||||
this.requestService.setStaleByHrefSubstring(this.halService.getRootHref());
|
this.requestService.setStaleByHrefSubstring(this.halService.getRootHref());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -7,7 +8,6 @@ export const HistoryActionTypes = {
|
|||||||
GET_HISTORY: type('dspace/history/GET_HISTORY')
|
GET_HISTORY: type('dspace/history/GET_HISTORY')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
export class AddUrlToHistoryAction implements Action {
|
export class AddUrlToHistoryAction implements Action {
|
||||||
type = HistoryActionTypes.ADD_TO_HISTORY;
|
type = HistoryActionTypes.ADD_TO_HISTORY;
|
||||||
@@ -20,7 +20,6 @@ export class AddUrlToHistoryAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
export type HistoryAction
|
export type HistoryAction
|
||||||
= AddUrlToHistoryAction;
|
= AddUrlToHistoryAction;
|
||||||
|
@@ -3,6 +3,7 @@ import { AddUrlToHistoryAction, HistoryAction, HistoryActionTypes } from './hist
|
|||||||
/**
|
/**
|
||||||
* The auth state.
|
* The auth state.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
export interface HistoryState extends Array<string> {
|
export interface HistoryState extends Array<string> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -12,7 +13,6 @@ export const IndexActionTypes = {
|
|||||||
REMOVE_BY_SUBSTRING: type('dspace/core/index/REMOVE_BY_SUBSTRING')
|
REMOVE_BY_SUBSTRING: type('dspace/core/index/REMOVE_BY_SUBSTRING')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* An ngrx action to add a value to the index
|
* An ngrx action to add a value to the index
|
||||||
*/
|
*/
|
||||||
@@ -86,7 +86,6 @@ export class RemoveFromIndexBySubstringAction implements Action {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all HrefIndexActions
|
* A type to encompass all HrefIndexActions
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -23,7 +24,6 @@ export const JsonPatchOperationsActionTypes = {
|
|||||||
DELETE_PENDING_JSON_PATCH_OPERATIONS: type('dspace/core/patch/DELETE_PENDING_JSON_PATCH_OPERATIONS'),
|
DELETE_PENDING_JSON_PATCH_OPERATIONS: type('dspace/core/patch/DELETE_PENDING_JSON_PATCH_OPERATIONS'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An ngrx action to commit the current transaction
|
* An ngrx action to commit the current transaction
|
||||||
@@ -269,7 +269,6 @@ export class DeletePendingJsonPatchOperationsAction implements Action {
|
|||||||
type = JsonPatchOperationsActionTypes.DELETE_PENDING_JSON_PATCH_OPERATIONS;
|
type = JsonPatchOperationsActionTypes.DELETE_PENDING_JSON_PATCH_OPERATIONS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
export const MetaTagTypes = {
|
export const MetaTagTypes = {
|
||||||
ADD: type('dspace/meta-tag/ADD'),
|
ADD: type('dspace/meta-tag/ADD'),
|
||||||
CLEAR: type('dspace/meta-tag/CLEAR')
|
CLEAR: type('dspace/meta-tag/CLEAR')
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
|
||||||
@@ -28,7 +29,6 @@ import { map } from 'rxjs/operators';
|
|||||||
import { NoContent } from '../shared/NoContent.model';
|
import { NoContent } from '../shared/NoContent.model';
|
||||||
import { getFirstCompletedRemoteData } from '../shared/operators';
|
import { getFirstCompletedRemoteData } from '../shared/operators';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A private DataService implementation to delegate specific methods to.
|
* A private DataService implementation to delegate specific methods to.
|
||||||
@@ -222,4 +222,3 @@ export class ResourcePolicyService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
|
|
||||||
@@ -8,7 +9,6 @@ export const RouterActionTypes = {
|
|||||||
ROUTE_UPDATE: type('dspace/core/router/ROUTE_UPDATE'),
|
ROUTE_UPDATE: type('dspace/core/router/ROUTE_UPDATE'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* An ngrx action to be fired when the route is updated
|
* An ngrx action to be fired when the route is updated
|
||||||
* Note that, contrary to the router-store.ROUTER_NAVIGATION action,
|
* Note that, contrary to the router-store.ROUTER_NAVIGATION action,
|
||||||
@@ -19,4 +19,3 @@ export class RouteUpdateAction implements Action {
|
|||||||
type = RouterActionTypes.ROUTE_UPDATE;
|
type = RouterActionTypes.ROUTE_UPDATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
import { Params } from '@angular/router';
|
import { Params } from '@angular/router';
|
||||||
@@ -15,7 +16,6 @@ export const RouteActionTypes = {
|
|||||||
RESET: type('dspace/core/route/RESET'),
|
RESET: type('dspace/core/route/RESET'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* An ngrx action to set the query parameters
|
* An ngrx action to set the query parameters
|
||||||
*/
|
*/
|
||||||
@@ -151,7 +151,6 @@ export class ResetRouteStateAction implements Action {
|
|||||||
type = RouteActionTypes.RESET;
|
type = RouteActionTypes.RESET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all RouteActions
|
* A type to encompass all RouteActions
|
||||||
|
@@ -1,4 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* Represents the payload of a purposefully empty rest response
|
* Represents the payload of a purposefully empty rest response
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
export interface NoContent {}
|
export interface NoContent {}
|
||||||
|
@@ -3,6 +3,4 @@
|
|||||||
* more details:
|
* more details:
|
||||||
* https://github.com/Microsoft/TypeScript/issues/204#issuecomment-257722306
|
* https://github.com/Microsoft/TypeScript/issues/204#issuecomment-257722306
|
||||||
*/
|
*/
|
||||||
/* eslint-disable @typescript-eslint/consistent-type-definitions */
|
|
||||||
export type GenericConstructor<T> = new (...args: any[]) => T ;
|
export type GenericConstructor<T> = new (...args: any[]) => T ;
|
||||||
/* eslint-enable @typescript-eslint/consistent-type-definitions */
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
import { autoserialize, Serialize, Deserialize } from 'cerialize';
|
import { autoserialize, Serialize, Deserialize } from 'cerialize';
|
||||||
import { hasValue } from '../../shared/empty.util';
|
import { hasValue } from '../../shared/empty.util';
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
export const VIRTUAL_METADATA_PREFIX = 'virtual::';
|
export const VIRTUAL_METADATA_PREFIX = 'virtual::';
|
||||||
|
|
||||||
@@ -138,4 +138,3 @@ export const MetadataMapSerializer = {
|
|||||||
return metadataMap;
|
return metadataMap;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
import { combineLatest as observableCombineLatest, Observable } from 'rxjs';
|
||||||
import { Injectable, OnDestroy } from '@angular/core';
|
import { Injectable, OnDestroy } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
@@ -44,7 +45,6 @@ import { NotificationsService } from '../../../shared/notifications/notification
|
|||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
import { DSOChangeAnalyzer } from '../../data/dso-change-analyzer.service';
|
import { DSOChangeAnalyzer } from '../../data/dso-change-analyzer.service';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* A class that lets us delegate some methods to DataService
|
* A class that lets us delegate some methods to DataService
|
||||||
*/
|
*/
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { HttpClient } from '@angular/common/http';
|
import { HttpClient } from '@angular/common/http';
|
||||||
|
|
||||||
@@ -34,7 +35,6 @@ import { VocabularyOptions } from './models/vocabulary-options.model';
|
|||||||
import { PageInfo } from '../../shared/page-info.model';
|
import { PageInfo } from '../../shared/page-info.model';
|
||||||
import { HrefOnlyDataService } from '../../data/href-only-data.service';
|
import { HrefOnlyDataService } from '../../data/href-only-data.service';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A private DataService implementation to delegate specific methods to.
|
* A private DataService implementation to delegate specific methods to.
|
||||||
@@ -386,4 +386,3 @@ export class VocabularyService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { getTestScheduler } from 'jasmine-marbles';
|
import { getTestScheduler } from 'jasmine-marbles';
|
||||||
import { TestScheduler } from 'rxjs/testing';
|
import { TestScheduler } from 'rxjs/testing';
|
||||||
|
|
||||||
@@ -25,7 +26,6 @@ import { of } from 'rxjs';
|
|||||||
|
|
||||||
const LINK_NAME = 'test';
|
const LINK_NAME = 'test';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class TestTask extends TaskObject {
|
class TestTask extends TaskObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -52,7 +52,6 @@ class DummyChangeAnalyzer implements ChangeAnalyzer<TestTask> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
describe('TasksService', () => {
|
describe('TasksService', () => {
|
||||||
let scheduler: TestScheduler;
|
let scheduler: TestScheduler;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { excludeFromEquals, fieldsForEquals } from './equals.decorators';
|
import { excludeFromEquals, fieldsForEquals } from './equals.decorators';
|
||||||
import { EquatableObject } from './equatable';
|
import { EquatableObject } from './equatable';
|
||||||
import { cloneDeep } from 'lodash';
|
import { cloneDeep } from 'lodash';
|
||||||
@@ -14,7 +15,6 @@ class Dog extends EquatableObject<Dog> {
|
|||||||
public favouriteToy: { name: string, colour: string };
|
public favouriteToy: { name: string, colour: string };
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line max-classes-per-file
|
|
||||||
class Owner extends EquatableObject<Owner> {
|
class Owner extends EquatableObject<Owner> {
|
||||||
@excludeFromEquals
|
@excludeFromEquals
|
||||||
favouriteFood: string;
|
favouriteFood: string;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||||
import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock';
|
import { TranslateLoaderMock } from '../../shared/mocks/translate-loader.mock';
|
||||||
@@ -19,7 +20,6 @@ describe('ItemPageComponent', () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line max-classes-per-file
|
|
||||||
class AcceptNoneGuard implements CanActivate {
|
class AcceptNoneGuard implements CanActivate {
|
||||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||||
console.log('BLA');
|
console.log('BLA');
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Component, Input } from '@angular/core';
|
import { Component, Input } from '@angular/core';
|
||||||
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { MetadataFieldWrapperComponent } from './metadata-field-wrapper.component';
|
import { MetadataFieldWrapperComponent } from './metadata-field-wrapper.component';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-component-without-content',
|
selector: 'ds-component-without-content',
|
||||||
template: '<ds-metadata-field-wrapper [hideIfNoTextContent]="hideIfNoTextContent" [label]="\'test label\'">\n' +
|
template: '<ds-metadata-field-wrapper [hideIfNoTextContent]="hideIfNoTextContent" [label]="\'test label\'">\n' +
|
||||||
@@ -34,7 +34,6 @@ class TextContentComponent {
|
|||||||
@Input() hideIfNoTextContent = true;
|
@Input() hideIfNoTextContent = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
describe('MetadataFieldWrapperComponent', () => {
|
describe('MetadataFieldWrapperComponent', () => {
|
||||||
let component: MetadataFieldWrapperComponent;
|
let component: MetadataFieldWrapperComponent;
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
import { ChangeDetectorRef, ElementRef, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { ChangeDetectorRef, ElementRef, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
@@ -94,7 +95,6 @@ describe('CollectionSelectorComponent', () => {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
// eslint-disable-next-line max-classes-per-file
|
|
||||||
const collectionDataServiceMock = {
|
const collectionDataServiceMock = {
|
||||||
getAuthorizedCollection(query: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig<Collection>[]): Observable<RemoteData<PaginatedList<Collection>>> {
|
getAuthorizedCollection(query: string, options: FindListOptions = {}, ...linksToFollow: FollowLinkConfig<Collection>[]): Observable<RemoteData<PaginatedList<Collection>>> {
|
||||||
return hot( 'a|', {
|
return hot( 'a|', {
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
import { DynamicFormArrayGroupModel } from '@ng-dynamic-forms/core';
|
import { DynamicFormArrayGroupModel } from '@ng-dynamic-forms/core';
|
||||||
@@ -22,7 +23,6 @@ import { RemoveRelationshipAction } from '../relation-lookup-modal/relationship.
|
|||||||
import { SubmissionService } from '../../../../../submission/submission.service';
|
import { SubmissionService } from '../../../../../submission/submission.service';
|
||||||
import { SubmissionObjectEntry } from '../../../../../submission/objects/submission-objects.reducer';
|
import { SubmissionObjectEntry } from '../../../../../submission/objects/submission-objects.reducer';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Abstract class that defines objects that can be reordered
|
* Abstract class that defines objects that can be reordered
|
||||||
*/
|
*/
|
||||||
@@ -218,4 +218,3 @@ export class ExistingMetadataListElementComponent implements OnInit, OnChanges,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core';
|
import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output } from '@angular/core';
|
||||||
import { Store } from '@ngrx/store';
|
import { Store } from '@ngrx/store';
|
||||||
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
import { BehaviorSubject, Observable, Subscription } from 'rxjs';
|
||||||
@@ -14,7 +15,6 @@ import { ViewMode } from '../../../../../core/shared/view-mode.model';
|
|||||||
import { ReorderableRelationship } from '../existing-metadata-list-element/existing-metadata-list-element.component';
|
import { ReorderableRelationship } from '../existing-metadata-list-element/existing-metadata-list-element.component';
|
||||||
import { SubmissionService } from '../../../../../submission/submission.service';
|
import { SubmissionService } from '../../../../../submission/submission.service';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Abstract class that defines objects that can be reordered
|
* Abstract class that defines objects that can be reordered
|
||||||
*/
|
*/
|
||||||
@@ -120,4 +120,3 @@ export class ExistingRelationListElementComponent implements OnInit, OnChanges,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
// Load the implementations that should be tested
|
// Load the implementations that should be tested
|
||||||
import { ChangeDetectorRef, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
import { ChangeDetectorRef, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||||
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
@@ -34,7 +35,6 @@ export let ONEBOX_TEST_GROUP;
|
|||||||
|
|
||||||
export let ONEBOX_TEST_MODEL_CONFIG;
|
export let ONEBOX_TEST_MODEL_CONFIG;
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
// Mock class for NgbModalRef
|
// Mock class for NgbModalRef
|
||||||
export class MockNgbModalRef {
|
export class MockNgbModalRef {
|
||||||
@@ -463,4 +463,3 @@ class TestComponent {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
/**
|
/**
|
||||||
* The list of NameVariantAction type definitions
|
* The list of NameVariantAction type definitions
|
||||||
*/
|
*/
|
||||||
@@ -9,7 +10,6 @@ export const NameVariantActionTypes = {
|
|||||||
REMOVE_NAME_VARIANT: type('dspace/name-variant/REMOVE_NAME_VARIANT'),
|
REMOVE_NAME_VARIANT: type('dspace/name-variant/REMOVE_NAME_VARIANT'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Abstract class for actions that happen to name variants
|
* Abstract class for actions that happen to name variants
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +51,6 @@ export class RemoveNameVariantAction extends NameVariantListAction {
|
|||||||
super(listID, itemID);
|
super(listID, itemID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all RelationshipActions
|
* A type to encompass all RelationshipActions
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
/**
|
/**
|
||||||
* The list of RelationshipAction type definitions
|
* The list of RelationshipAction type definitions
|
||||||
*/
|
*/
|
||||||
@@ -13,7 +14,6 @@ export const RelationshipActionTypes = {
|
|||||||
UPDATE_RELATIONSHIP: type('dspace/relationship/UPDATE_RELATIONSHIP'),
|
UPDATE_RELATIONSHIP: type('dspace/relationship/UPDATE_RELATIONSHIP'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* An ngrx action to create a new relationship
|
* An ngrx action to create a new relationship
|
||||||
*/
|
*/
|
||||||
@@ -132,7 +132,6 @@ export class RemoveRelationshipAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A type to encompass all RelationshipActions
|
* A type to encompass all RelationshipActions
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../ngrx/type';
|
import { type } from '../ngrx/type';
|
||||||
@@ -21,7 +22,6 @@ export const FormActionTypes = {
|
|||||||
FORM_CLEAR_ERRORS: type('dspace/form/FORM_CLEAR_ERRORS'),
|
FORM_CLEAR_ERRORS: type('dspace/form/FORM_CLEAR_ERRORS'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
export class FormInitAction implements Action {
|
export class FormInitAction implements Action {
|
||||||
type = FormActionTypes.FORM_INIT;
|
type = FormActionTypes.FORM_INIT;
|
||||||
payload: {
|
payload: {
|
||||||
@@ -160,7 +160,6 @@ export class FormClearErrorsAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { MenuID } from './initial-menus-state';
|
import { MenuID } from './initial-menus-state';
|
||||||
import { type } from '../ngrx/type';
|
import { type } from '../ngrx/type';
|
||||||
@@ -28,7 +29,6 @@ export const MenuActionTypes = {
|
|||||||
TOGGLE_ACTIVE_SECTION: type('dspace/menu-section/TOGGLE_ACTIVE_SECTION'),
|
TOGGLE_ACTIVE_SECTION: type('dspace/menu-section/TOGGLE_ACTIVE_SECTION'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
// MENU STATE ACTIONS
|
// MENU STATE ACTIONS
|
||||||
/**
|
/**
|
||||||
@@ -225,4 +225,3 @@ export type MenuAction =
|
|||||||
| ToggleActiveMenuSectionAction
|
| ToggleActiveMenuSectionAction
|
||||||
| CollapseMenuPreviewAction
|
| CollapseMenuPreviewAction
|
||||||
| ExpandMenuPreviewAction;
|
| ExpandMenuPreviewAction;
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import {
|
import {
|
||||||
DEFAULT_ENTITY_TYPE,
|
DEFAULT_ENTITY_TYPE,
|
||||||
DEFAULT_REPRESENTATION_TYPE,
|
DEFAULT_REPRESENTATION_TYPE,
|
||||||
@@ -20,7 +21,6 @@ describe('MetadataRepresentation decorator function', () => {
|
|||||||
const typeUnthemed = 'TestTypeUnthemed';
|
const typeUnthemed = 'TestTypeUnthemed';
|
||||||
let prefix;
|
let prefix;
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class Test1PlainText {
|
class Test1PlainText {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { getComponentByWorkflowTaskOption, rendersWorkflowTaskOption } from './claimed-task-actions-decorator';
|
import { getComponentByWorkflowTaskOption, rendersWorkflowTaskOption } from './claimed-task-actions-decorator';
|
||||||
|
|
||||||
describe('ClaimedTaskActions decorator function', () => {
|
describe('ClaimedTaskActions decorator function', () => {
|
||||||
@@ -5,7 +6,6 @@ describe('ClaimedTaskActions decorator function', () => {
|
|||||||
const option2 = 'test_option_2';
|
const option2 = 'test_option_2';
|
||||||
const option3 = 'test_option_3';
|
const option3 = 'test_option_3';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class Test1Action {
|
class Test1Action {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../ngrx/type';
|
import { type } from '../ngrx/type';
|
||||||
import { INotification } from './models/notification.model';
|
import { INotification } from './models/notification.model';
|
||||||
@@ -8,7 +9,6 @@ export const NotificationsActionTypes = {
|
|||||||
REMOVE_NOTIFICATION: type('dspace/notifications/REMOVE_NOTIFICATION'),
|
REMOVE_NOTIFICATION: type('dspace/notifications/REMOVE_NOTIFICATION'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* New notification.
|
* New notification.
|
||||||
@@ -49,7 +49,6 @@ export class RemoveNotificationAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actions type.
|
* Actions type.
|
||||||
|
@@ -4,6 +4,7 @@ import { INotification } from './models/notification.model';
|
|||||||
/**
|
/**
|
||||||
* The notification state.
|
* The notification state.
|
||||||
*/
|
*/
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
||||||
export interface NotificationsState extends Array<INotification> {
|
export interface NotificationsState extends Array<INotification> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Item } from '../../../../core/shared/item.model';
|
import { Item } from '../../../../core/shared/item.model';
|
||||||
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
import { ViewMode } from '../../../../core/shared/view-mode.model';
|
||||||
import { getListableObjectComponent, listableObjectComponent } from './listable-object.decorator';
|
import { getListableObjectComponent, listableObjectComponent } from './listable-object.decorator';
|
||||||
@@ -13,7 +14,6 @@ describe('ListableObject decorator function', () => {
|
|||||||
const typeAncestor = 'TestTypeAncestor';
|
const typeAncestor = 'TestTypeAncestor';
|
||||||
const typeUnthemed = 'TestTypeUnthemed';
|
const typeUnthemed = 'TestTypeUnthemed';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class Test1List {
|
class Test1List {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../../ngrx/type';
|
import { type } from '../../ngrx/type';
|
||||||
import { ListableObject } from '../../object-collection/shared/listable-object.model';
|
import { ListableObject } from '../../object-collection/shared/listable-object.model';
|
||||||
@@ -22,7 +23,6 @@ export const SelectableListActionTypes = {
|
|||||||
/**
|
/**
|
||||||
* Abstract action class for actions on selectable lists
|
* Abstract action class for actions on selectable lists
|
||||||
*/
|
*/
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
export abstract class SelectableListAction implements Action {
|
export abstract class SelectableListAction implements Action {
|
||||||
// eslint-disable-next-line @typescript-eslint/no-shadow
|
// eslint-disable-next-line @typescript-eslint/no-shadow
|
||||||
constructor(public type, public id: string) {
|
constructor(public type, public id: string) {
|
||||||
@@ -98,4 +98,3 @@ export class SelectableListDeselectAllAction extends SelectableListAction {
|
|||||||
super(SelectableListActionTypes.DESELECT_ALL, id);
|
super(SelectableListActionTypes.DESELECT_ALL, id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import {
|
import {
|
||||||
SelectableListAction,
|
SelectableListAction,
|
||||||
SelectableListDeselectAction,
|
SelectableListDeselectAction,
|
||||||
@@ -11,7 +12,6 @@ import { selectableListReducer } from './selectable-list.reducer';
|
|||||||
import { ListableObject } from '../../object-collection/shared/listable-object.model';
|
import { ListableObject } from '../../object-collection/shared/listable-object.model';
|
||||||
import { hasValue } from '../../empty.util';
|
import { hasValue } from '../../empty.util';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
class SelectableObject extends ListableObject {
|
class SelectableObject extends ListableObject {
|
||||||
constructor(private value: string) {
|
constructor(private value: string) {
|
||||||
super();
|
super();
|
||||||
@@ -34,7 +34,6 @@ class NullAction extends SelectableListAction {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
const listID1 = 'id1';
|
const listID1 = 'id1';
|
||||||
const listID2 = 'id2';
|
const listID2 = 'id2';
|
||||||
const value1 = 'Selected object';
|
const value1 = 'Selected object';
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { type } from '../ngrx/type';
|
import { type } from '../ngrx/type';
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
@@ -37,7 +38,6 @@ export class ObjectSelectionAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to set the initial state to deselected
|
* Used to set the initial state to deselected
|
||||||
*/
|
*/
|
||||||
@@ -79,4 +79,3 @@ export class ObjectSelectionSwitchAction extends ObjectSelectionAction {
|
|||||||
export class ObjectSelectionResetAction extends ObjectSelectionAction {
|
export class ObjectSelectionResetAction extends ObjectSelectionAction {
|
||||||
type = ObjectSelectionActionTypes.RESET;
|
type = ObjectSelectionActionTypes.RESET;
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../../ngrx/type';
|
import { type } from '../../../ngrx/type';
|
||||||
@@ -41,7 +42,6 @@ export class SearchFilterAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to collapse a filter
|
* Used to collapse a filter
|
||||||
*/
|
*/
|
||||||
@@ -95,4 +95,3 @@ export class SearchFilterIncrementPageAction extends SearchFilterAction {
|
|||||||
export class SearchFilterResetPageAction extends SearchFilterAction {
|
export class SearchFilterResetPageAction extends SearchFilterAction {
|
||||||
type = SearchFilterActionTypes.RESET_PAGE;
|
type = SearchFilterActionTypes.RESET_PAGE;
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../ngrx/type';
|
import { type } from '../../ngrx/type';
|
||||||
@@ -37,7 +38,6 @@ export class SidebarFilterAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to initialize a filter
|
* Used to initialize a filter
|
||||||
*/
|
*/
|
||||||
@@ -71,4 +71,3 @@ export class FilterExpandAction extends SidebarFilterAction {
|
|||||||
export class FilterToggleAction extends SidebarFilterAction {
|
export class FilterToggleAction extends SidebarFilterAction {
|
||||||
type = SidebarFilterActionTypes.TOGGLE;
|
type = SidebarFilterActionTypes.TOGGLE;
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -27,10 +27,9 @@ export class SidebarEffects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getBaseUrl(action: any): string {
|
getBaseUrl(action: any): string {
|
||||||
/* eslint-disable @typescript-eslint/dot-notation */
|
/* eslint-disable-next-line @typescript-eslint/dot-notation */
|
||||||
const url: string = action['payload'].routerState.url;
|
const url: string = action['payload'].routerState.url;
|
||||||
return new URLBaser(url).toString();
|
return new URLBaser(url).toString();
|
||||||
/* eslint-enable @typescript-eslint/dot-notation */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../ngrx/type';
|
import { type } from '../ngrx/type';
|
||||||
@@ -16,7 +17,6 @@ export const SidebarActionTypes = {
|
|||||||
TOGGLE: type('dspace/sidebar/TOGGLE')
|
TOGGLE: type('dspace/sidebar/TOGGLE')
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to collapse the sidebar
|
* Used to collapse the sidebar
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +37,6 @@ export class SidebarExpandAction implements Action {
|
|||||||
export class SidebarToggleAction implements Action {
|
export class SidebarToggleAction implements Action {
|
||||||
type = SidebarActionTypes.TOGGLE;
|
type = SidebarActionTypes.TOGGLE;
|
||||||
}
|
}
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { ThemedComponent } from './themed.component';
|
import { ThemedComponent } from './themed.component';
|
||||||
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
import { Component, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
|
||||||
@@ -7,7 +8,6 @@ import { getMockThemeService } from '../mocks/theme-service.mock';
|
|||||||
import { TestComponent } from './test/test.component.spec';
|
import { TestComponent } from './test/test.component.spec';
|
||||||
import { ThemeConfig } from '../../../config/theme.model';
|
import { ThemeConfig } from '../../../config/theme.model';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-test-themed-component',
|
selector: 'ds-test-themed-component',
|
||||||
templateUrl: './themed.component.html'
|
templateUrl: './themed.component.html'
|
||||||
@@ -197,4 +197,3 @@ describe('ThemedComponent', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
import { type } from '../ngrx/type';
|
import { type } from '../ngrx/type';
|
||||||
|
|
||||||
@@ -35,7 +36,6 @@ export class TruncatableAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/**
|
/**
|
||||||
* Used to collapse a truncatable component when it's expanded and expand it when it's collapsed
|
* Used to collapse a truncatable component when it's expanded and expand it when it's collapsed
|
||||||
*/
|
*/
|
||||||
@@ -57,4 +57,3 @@ export class TruncatableExpandAction extends TruncatableAction {
|
|||||||
type = TruncatableActionTypes.EXPAND;
|
type = TruncatableActionTypes.EXPAND;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { BehaviorSubject } from 'rxjs';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
import { VocabularyEntryDetail } from '../../core/submission/vocabularies/models/vocabulary-entry-detail.model';
|
import { VocabularyEntryDetail } from '../../core/submission/vocabularies/models/vocabulary-entry-detail.model';
|
||||||
import { PageInfo } from '../../core/shared/page-info.model';
|
import { PageInfo } from '../../core/shared/page-info.model';
|
||||||
@@ -7,7 +8,6 @@ export const LOAD_MORE_ROOT = 'LOAD_MORE_ROOT';
|
|||||||
export const LOAD_MORE_NODE: any = { id: LOAD_MORE };
|
export const LOAD_MORE_NODE: any = { id: LOAD_MORE };
|
||||||
export const LOAD_MORE_ROOT_NODE: any = { id: LOAD_MORE_ROOT };
|
export const LOAD_MORE_ROOT_NODE: any = { id: LOAD_MORE_ROOT };
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
/** Nested node */
|
/** Nested node */
|
||||||
export class TreeviewNode {
|
export class TreeviewNode {
|
||||||
childrenChange = new BehaviorSubject<TreeviewNode[]>([]);
|
childrenChange = new BehaviorSubject<TreeviewNode[]>([]);
|
||||||
@@ -42,4 +42,3 @@ export class TreeviewFlatNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Action } from '@ngrx/store';
|
import { Action } from '@ngrx/store';
|
||||||
|
|
||||||
import { type } from '../../shared/ngrx/type';
|
import { type } from '../../shared/ngrx/type';
|
||||||
@@ -64,7 +65,6 @@ export const SubmissionObjectActionTypes = {
|
|||||||
REMOVE_SECTION_ERRORS: type('dspace/submission/REMOVE_SECTION_ERRORS'),
|
REMOVE_SECTION_ERRORS: type('dspace/submission/REMOVE_SECTION_ERRORS'),
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert a new error of type SubmissionSectionError into the given section
|
* Insert a new error of type SubmissionSectionError into the given section
|
||||||
@@ -802,7 +802,6 @@ export class DeleteUploadedFileAction implements Action {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* eslint-enable max-classes-per-file */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Export a type alias of all actions in this action group
|
* Export a type alias of all actions in this action group
|
||||||
|
@@ -105,6 +105,7 @@ const overrideWithConfig = (config: Config, pathToConfig: string) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const overrideWithEnvironment = (config: Config, key: string = '') => {
|
const overrideWithEnvironment = (config: Config, key: string = '') => {
|
||||||
|
// eslint-disable-next-line guard-for-in
|
||||||
for (const property in config) {
|
for (const property in config) {
|
||||||
const variable = `${key}${isNotEmpty(key) ? '_' : ''}${property.toUpperCase()}`;
|
const variable = `${key}${isNotEmpty(key) ? '_' : ''}${property.toUpperCase()}`;
|
||||||
const innerConfig = config[property];
|
const innerConfig = config[property];
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
|
/* eslint-disable max-classes-per-file */
|
||||||
import { Config } from './config.interface';
|
import { Config } from './config.interface';
|
||||||
import { hasValue, hasNoValue, isNotEmpty } from '../app/shared/empty.util';
|
import { hasValue, hasNoValue, isNotEmpty } from '../app/shared/empty.util';
|
||||||
import { DSpaceObject } from '../app/core/shared/dspace-object.model';
|
import { DSpaceObject } from '../app/core/shared/dspace-object.model';
|
||||||
import { getDSORoute } from '../app/app-routing-paths';
|
import { getDSORoute } from '../app/app-routing-paths';
|
||||||
|
|
||||||
/* eslint-disable max-classes-per-file */
|
|
||||||
export interface NamedThemeConfig extends Config {
|
export interface NamedThemeConfig extends Config {
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user