mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 05:53:03 +00:00
ESLint: fix dangling commas
This commit is contained in:
@@ -32,26 +32,26 @@ describe('CollectionSelectComponent', () => {
|
||||
const mockCollectionList = [
|
||||
Object.assign(new Collection(), {
|
||||
id: 'id1',
|
||||
name: 'name1'
|
||||
name: 'name1',
|
||||
}),
|
||||
Object.assign(new Collection(), {
|
||||
id: 'id2',
|
||||
name: 'name2'
|
||||
})
|
||||
name: 'name2',
|
||||
}),
|
||||
];
|
||||
const mockCollections = createSuccessfulRemoteDataObject$(createPaginatedList(mockCollectionList));
|
||||
const mockPaginationOptions = Object.assign(new PaginationComponentOptions(), {
|
||||
id: 'search-page-configuration',
|
||||
pageSize: 10,
|
||||
currentPage: 1
|
||||
currentPage: 1,
|
||||
});
|
||||
|
||||
const authorizationDataService = jasmine.createSpyObj('authorizationDataService', {
|
||||
isAuthorized: observableOf(true)
|
||||
isAuthorized: observableOf(true),
|
||||
});
|
||||
|
||||
const linkHeadService = jasmine.createSpyObj('linkHeadService', {
|
||||
addTag: ''
|
||||
addTag: '',
|
||||
});
|
||||
|
||||
const groupDataService = jasmine.createSpyObj('groupsDataService', {
|
||||
@@ -64,9 +64,9 @@ describe('CollectionSelectComponent', () => {
|
||||
findByPropertyName: createSuccessfulRemoteDataObject$(Object.assign(new ConfigurationProperty(), {
|
||||
name: 'test',
|
||||
values: [
|
||||
'org.dspace.ctask.general.ProfileFormats = test'
|
||||
]
|
||||
}))
|
||||
'org.dspace.ctask.general.ProfileFormats = test',
|
||||
],
|
||||
})),
|
||||
});
|
||||
|
||||
const paginationService = new PaginationServiceStub();
|
||||
@@ -84,7 +84,7 @@ describe('CollectionSelectComponent', () => {
|
||||
{ provide: ConfigurationDataService, useValue: configurationDataService },
|
||||
{ provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() },
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
@@ -39,14 +39,14 @@ describe('ItemSelectComponent', () => {
|
||||
{
|
||||
key: 'dc.title',
|
||||
language: 'en_US',
|
||||
value: 'This is just a title'
|
||||
value: 'This is just a title',
|
||||
},
|
||||
{
|
||||
key: 'dc.type',
|
||||
language: null,
|
||||
value: 'Article'
|
||||
value: 'Article',
|
||||
}],
|
||||
_links: { self: { href: 'selfId1' } }
|
||||
_links: { self: { href: 'selfId1' } },
|
||||
}),
|
||||
Object.assign(new Item(), {
|
||||
id: 'id2',
|
||||
@@ -55,21 +55,21 @@ describe('ItemSelectComponent', () => {
|
||||
{
|
||||
key: 'dc.title',
|
||||
language: 'en_US',
|
||||
value: 'This is just another title'
|
||||
value: 'This is just another title',
|
||||
},
|
||||
{
|
||||
key: 'dc.type',
|
||||
language: null,
|
||||
value: 'Article'
|
||||
value: 'Article',
|
||||
}],
|
||||
_links: { self: { href: 'selfId2' } }
|
||||
})
|
||||
_links: { self: { href: 'selfId2' } },
|
||||
}),
|
||||
];
|
||||
const mockItems = createSuccessfulRemoteDataObject$(createPaginatedList(mockItemList));
|
||||
const mockPaginationOptions = Object.assign(new PaginationComponentOptions(), {
|
||||
id: 'search-page-configuration',
|
||||
pageSize: 10,
|
||||
currentPage: 1
|
||||
currentPage: 1,
|
||||
});
|
||||
|
||||
paginationService = new PaginationServiceStub(mockPaginationOptions);
|
||||
@@ -77,7 +77,7 @@ describe('ItemSelectComponent', () => {
|
||||
const authorizationDataService = new AuthorizationDataService(null, null, null, null, null);
|
||||
|
||||
const linkHeadService = jasmine.createSpyObj('linkHeadService', {
|
||||
addTag: ''
|
||||
addTag: '',
|
||||
});
|
||||
|
||||
const groupDataService = jasmine.createSpyObj('groupsDataService', {
|
||||
@@ -90,9 +90,9 @@ describe('ItemSelectComponent', () => {
|
||||
findByPropertyName: createSuccessfulRemoteDataObject$(Object.assign(new ConfigurationProperty(), {
|
||||
name: 'test',
|
||||
values: [
|
||||
'org.dspace.ctask.general.ProfileFormats = test'
|
||||
]
|
||||
}))
|
||||
'org.dspace.ctask.general.ProfileFormats = test',
|
||||
],
|
||||
})),
|
||||
});
|
||||
|
||||
beforeEach(waitForAsync(() => {
|
||||
@@ -109,7 +109,7 @@ describe('ItemSelectComponent', () => {
|
||||
{ provide: ConfigurationDataService, useValue: configurationDataService },
|
||||
{ provide: SearchConfigurationService, useValue: new SearchConfigurationServiceStub() },
|
||||
],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
schemas: [NO_ERRORS_SCHEMA],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
|
@@ -12,7 +12,7 @@ import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-item-select',
|
||||
templateUrl: './item-select.component.html'
|
||||
templateUrl: './item-select.component.html',
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -55,7 +55,7 @@ export class ItemSelectComponent extends ObjectSelectComponent<Item> {
|
||||
const itemPageRoutes = {};
|
||||
items.page.forEach((item) => itemPageRoutes[item.uuid] = getItemPageRoute(item));
|
||||
return itemPageRoutes;
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ export const ObjectSelectionActionTypes = {
|
||||
SELECT: type('dspace/object-select/SELECT'),
|
||||
DESELECT: type('dspace/object-select/DESELECT'),
|
||||
SWITCH: type('dspace/object-select/SWITCH'),
|
||||
RESET: type('dspace/object-select/RESET')
|
||||
RESET: type('dspace/object-select/RESET'),
|
||||
};
|
||||
|
||||
export class ObjectSelectionAction implements Action {
|
||||
|
@@ -4,7 +4,7 @@ import {
|
||||
ObjectSelectionInitialSelectAction,
|
||||
ObjectSelectionResetAction,
|
||||
ObjectSelectionSelectAction,
|
||||
ObjectSelectionSwitchAction
|
||||
ObjectSelectionSwitchAction,
|
||||
} from './object-select.actions';
|
||||
import { objectSelectionReducer } from './object-select.reducer';
|
||||
|
||||
|
@@ -39,9 +39,9 @@ export function objectSelectionReducer(state = initialState, action: ObjectSelec
|
||||
return Object.assign({}, state, {
|
||||
[action.key]: Object.assign({}, state[action.key], {
|
||||
[action.id]: {
|
||||
checked: true
|
||||
}
|
||||
})
|
||||
checked: true,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
return state;
|
||||
@@ -52,9 +52,9 @@ export function objectSelectionReducer(state = initialState, action: ObjectSelec
|
||||
return Object.assign({}, state, {
|
||||
[action.key]: Object.assign({}, state[action.key], {
|
||||
[action.id]: {
|
||||
checked: false
|
||||
}
|
||||
})
|
||||
checked: false,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
return state;
|
||||
@@ -64,9 +64,9 @@ export function objectSelectionReducer(state = initialState, action: ObjectSelec
|
||||
return Object.assign({}, state, {
|
||||
[action.key]: Object.assign({}, state[action.key], {
|
||||
[action.id]: {
|
||||
checked: true
|
||||
}
|
||||
})
|
||||
checked: true,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -74,9 +74,9 @@ export function objectSelectionReducer(state = initialState, action: ObjectSelec
|
||||
return Object.assign({}, state, {
|
||||
[action.key]: Object.assign({}, state[action.key], {
|
||||
[action.id]: {
|
||||
checked: false
|
||||
}
|
||||
})
|
||||
checked: false,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -84,9 +84,9 @@ export function objectSelectionReducer(state = initialState, action: ObjectSelec
|
||||
return Object.assign({}, state, {
|
||||
[action.key]: Object.assign({}, state[action.key], {
|
||||
[action.id]: {
|
||||
checked: (isEmpty(state) || isEmpty(state[action.key]) || isEmpty(state[action.key][action.id])) ? true : !state[action.key][action.id].checked
|
||||
}
|
||||
})
|
||||
checked: (isEmpty(state) || isEmpty(state[action.key]) || isEmpty(state[action.key][action.id])) ? true : !state[action.key][action.id].checked,
|
||||
},
|
||||
}),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ export function objectSelectionReducer(state = initialState, action: ObjectSelec
|
||||
return {};
|
||||
} else {
|
||||
return Object.assign({}, state, {
|
||||
[action.key]: {}
|
||||
[action.key]: {},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ import {
|
||||
ObjectSelectionInitialSelectAction,
|
||||
ObjectSelectionResetAction,
|
||||
ObjectSelectionSelectAction,
|
||||
ObjectSelectionSwitchAction
|
||||
ObjectSelectionSwitchAction,
|
||||
} from './object-select.actions';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
@@ -22,21 +22,21 @@ describe('ObjectSelectService', () => {
|
||||
/* eslint-disable no-empty,@typescript-eslint/no-empty-function */
|
||||
dispatch: {},
|
||||
/* eslint-enable no-empty,@typescript-eslint/no-empty-function */
|
||||
select: of(true)
|
||||
select: of(true),
|
||||
});
|
||||
|
||||
const store: Store<ObjectSelectionsState> = jasmine.createSpyObj('store', {
|
||||
/* eslint-disable no-empty,@typescript-eslint/no-empty-function */
|
||||
dispatch: {},
|
||||
/* eslint-enable no-empty,@typescript-eslint/no-empty-function */
|
||||
select: of(true)
|
||||
select: of(true),
|
||||
});
|
||||
|
||||
const appStore: Store<AppState> = jasmine.createSpyObj('appStore', {
|
||||
/* eslint-disable no-empty,@typescript-eslint/no-empty-function */
|
||||
dispatch: {},
|
||||
/* eslint-enable no-empty, @typescript-eslint/no-empty-function */
|
||||
select: of(true)
|
||||
select: of(true),
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -5,7 +5,7 @@ import {
|
||||
ObjectSelectionDeselectAction,
|
||||
ObjectSelectionInitialDeselectAction,
|
||||
ObjectSelectionInitialSelectAction, ObjectSelectionResetAction,
|
||||
ObjectSelectionSelectAction, ObjectSelectionSwitchAction
|
||||
ObjectSelectionSelectAction, ObjectSelectionSwitchAction,
|
||||
} from './object-select.actions';
|
||||
import { Observable } from 'rxjs';
|
||||
import { hasValue } from '../empty.util';
|
||||
@@ -23,7 +23,7 @@ export class ObjectSelectService {
|
||||
|
||||
constructor(
|
||||
private store: Store<ObjectSelectionListState>,
|
||||
private appStore: Store<AppState>
|
||||
private appStore: Store<AppState>,
|
||||
) {
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export class ObjectSelectService {
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ export class ObjectSelectService {
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
})
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ import { DSpaceObject } from '../../../core/shared/dspace-object.model';
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ds-object-select-abstract',
|
||||
template: ''
|
||||
template: '',
|
||||
})
|
||||
export abstract class ObjectSelectComponent<TDomain> implements OnInit, OnDestroy {
|
||||
|
||||
@@ -133,7 +133,7 @@ export abstract class ObjectSelectComponent<TDomain> implements OnInit, OnDestro
|
||||
*/
|
||||
confirmSelected() {
|
||||
this.selectedIds$.pipe(
|
||||
take(1)
|
||||
take(1),
|
||||
).subscribe((ids: string[]) => {
|
||||
this.confirm.emit(ids);
|
||||
this.objectSelectService.reset(this.key);
|
||||
|
Reference in New Issue
Block a user