ESlint: fix imports

This commit is contained in:
Yury Bondarenko
2023-06-27 15:40:01 +02:00
parent fa404fff84
commit a11be65f95
2234 changed files with 30059 additions and 15612 deletions

View File

@@ -1,28 +1,33 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
import { TranslateModule } from '@ngx-translate/core';
import { SharedModule } from '../../shared.module';
import { ObjectSelectServiceStub } from '../../testing/object-select-service.stub';
import { ObjectSelectService } from '../object-select.service';
import { HostWindowService } from '../../host-window.service';
import { HostWindowServiceStub } from '../../testing/host-window-service.stub';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import {
ComponentFixture,
TestBed,
waitForAsync,
} from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { CollectionSelectComponent } from './collection-select.component';
import { Collection } from '../../../core/shared/collection.model';
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
import { createPaginatedList } from '../../testing/utils.test';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../testing/pagination-service.stub';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { of as observableOf } from 'rxjs';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { LinkHeadService } from '../../../core/services/link-head.service';
import { GroupDataService } from '../../../core/eperson/group-data.service';
import { ConfigurationDataService } from '../../../core/data/configuration-data.service';
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
import { SearchConfigurationServiceStub } from '../../testing/search-configuration-service.stub';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { GroupDataService } from '../../../core/eperson/group-data.service';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { LinkHeadService } from '../../../core/services/link-head.service';
import { Collection } from '../../../core/shared/collection.model';
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
import { HostWindowService } from '../../host-window.service';
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
import { SharedModule } from '../../shared.module';
import { HostWindowServiceStub } from '../../testing/host-window-service.stub';
import { ObjectSelectServiceStub } from '../../testing/object-select-service.stub';
import { PaginationServiceStub } from '../../testing/pagination-service.stub';
import { SearchConfigurationServiceStub } from '../../testing/search-configuration-service.stub';
import { createPaginatedList } from '../../testing/utils.test';
import { ObjectSelectService } from '../object-select.service';
import { CollectionSelectComponent } from './collection-select.component';
describe('CollectionSelectComponent', () => {
let comp: CollectionSelectComponent;

View File

@@ -1,10 +1,11 @@
import { Component } from '@angular/core';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { Collection } from '../../../core/shared/collection.model';
import { ObjectSelectComponent } from '../object-select/object-select.component';
import { isNotEmpty } from '../../empty.util';
import { ObjectSelectService } from '../object-select.service';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
import { ObjectSelectComponent } from '../object-select/object-select.component';
@Component({
selector: 'ds-collection-select',

View File

@@ -1,29 +1,34 @@
import { ItemSelectComponent } from './item-select.component';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { Item } from '../../../core/shared/item.model';
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
import { TranslateModule } from '@ngx-translate/core';
import { SharedModule } from '../../shared.module';
import { ObjectSelectServiceStub } from '../../testing/object-select-service.stub';
import { ObjectSelectService } from '../object-select.service';
import { HostWindowService } from '../../host-window.service';
import { HostWindowServiceStub } from '../../testing/host-window-service.stub';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import {
ComponentFixture,
TestBed,
waitForAsync,
} from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { of } from 'rxjs';
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
import { createPaginatedList } from '../../testing/utils.test';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { PaginationServiceStub } from '../../testing/pagination-service.stub';
import { ConfigurationDataService } from '../../../core/data/configuration-data.service';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
import { ConfigurationDataService } from '../../../core/data/configuration-data.service';
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
import { LinkHeadService } from '../../../core/services/link-head.service';
import { GroupDataService } from '../../../core/eperson/group-data.service';
import { SearchConfigurationServiceStub } from '../../testing/search-configuration-service.stub';
import { PaginationService } from '../../../core/pagination/pagination.service';
import { LinkHeadService } from '../../../core/services/link-head.service';
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
import { Item } from '../../../core/shared/item.model';
import { SearchConfigurationService } from '../../../core/shared/search/search-configuration.service';
import { HostWindowService } from '../../host-window.service';
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
import { createSuccessfulRemoteDataObject$ } from '../../remote-data.utils';
import { SharedModule } from '../../shared.module';
import { HostWindowServiceStub } from '../../testing/host-window-service.stub';
import { ObjectSelectServiceStub } from '../../testing/object-select-service.stub';
import { PaginationServiceStub } from '../../testing/pagination-service.stub';
import { SearchConfigurationServiceStub } from '../../testing/search-configuration-service.stub';
import { createPaginatedList } from '../../testing/utils.test';
import { ObjectSelectService } from '../object-select.service';
import { ItemSelectComponent } from './item-select.component';
describe('ItemSelectComponent', () => {
let comp: ItemSelectComponent;

View File

@@ -1,14 +1,21 @@
import { Component, Input } from '@angular/core';
import {
Component,
Input,
} from '@angular/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { Item } from '../../../core/shared/item.model';
import { getAllSucceededRemoteDataPayload } from '../../../core/shared/operators';
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
import {
hasValueOperator,
isNotEmpty,
} from '../../empty.util';
import { ObjectSelectService } from '../object-select.service';
import { ObjectSelectComponent } from '../object-select/object-select.component';
import { hasValueOperator, isNotEmpty } from '../../empty.util';
import { Observable } from 'rxjs';
import { getAllSucceededRemoteDataPayload } from '../../../core/shared/operators';
import { map } from 'rxjs/operators';
import { getItemPageRoute } from '../../../item-page/item-page-routing-paths';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
@Component({
selector: 'ds-item-select',

View File

@@ -1,7 +1,8 @@
/* eslint-disable max-classes-per-file */
import { type } from '../ngrx/type';
import { Action } from '@ngrx/store';
import { type } from '../ngrx/type';
export const ObjectSelectionActionTypes = {
INITIAL_DESELECT: type('dspace/object-select/INITIAL_DESELECT'),
INITIAL_SELECT: type('dspace/object-select/INITIAL_SELECT'),

View File

@@ -1,5 +1,8 @@
import { isEmpty } from '../empty.util';
import { ObjectSelectionAction, ObjectSelectionActionTypes } from './object-select.actions';
import {
ObjectSelectionAction,
ObjectSelectionActionTypes,
} from './object-select.actions';
/**
* Interface that represents the state for a single selection of an object

View File

@@ -1,6 +1,6 @@
import { ObjectSelectService } from './object-select.service';
import { Store } from '@ngrx/store';
import { ObjectSelectionListState, ObjectSelectionsState } from './object-select.reducer';
import { of } from 'rxjs';
import { AppState } from '../../app.reducer';
import {
ObjectSelectionDeselectAction,
@@ -10,7 +10,11 @@ import {
ObjectSelectionSelectAction,
ObjectSelectionSwitchAction,
} from './object-select.actions';
import { of } from 'rxjs';
import {
ObjectSelectionListState,
ObjectSelectionsState,
} from './object-select.reducer';
import { ObjectSelectService } from './object-select.service';
describe('ObjectSelectService', () => {
let service: ObjectSelectService;

View File

@@ -1,16 +1,27 @@
import { Injectable } from '@angular/core';
import { createSelector, MemoizedSelector, Store } from '@ngrx/store';
import { ObjectSelectionListState, ObjectSelectionsState, ObjectSelectionState } from './object-select.reducer';
import {
createSelector,
MemoizedSelector,
Store,
} from '@ngrx/store';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { AppState } from '../../app.reducer';
import { hasValue } from '../empty.util';
import {
ObjectSelectionDeselectAction,
ObjectSelectionInitialDeselectAction,
ObjectSelectionInitialSelectAction, ObjectSelectionResetAction,
ObjectSelectionSelectAction, ObjectSelectionSwitchAction,
ObjectSelectionInitialSelectAction,
ObjectSelectionResetAction,
ObjectSelectionSelectAction,
ObjectSelectionSwitchAction,
} from './object-select.actions';
import { Observable } from 'rxjs';
import { hasValue } from '../empty.util';
import { map } from 'rxjs/operators';
import { AppState } from '../../app.reducer';
import {
ObjectSelectionListState,
ObjectSelectionsState,
ObjectSelectionState,
} from './object-select.reducer';
const objectSelectionsStateSelector = (state: ObjectSelectionListState) => state.objectSelection;
const objectSelectionListStateSelector = (state: AppState) => state.objectSelection;

View File

@@ -1,14 +1,28 @@
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { startWith, take } from 'rxjs/operators';
import { of, Observable } from 'rxjs';
import { RemoteData } from '../../../core/data/remote-data';
import {
Component,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output,
} from '@angular/core';
import {
Observable,
of,
} from 'rxjs';
import {
startWith,
take,
} from 'rxjs/operators';
import { SortOptions } from '../../../core/cache/models/sort-options.model';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
import { PaginatedList } from '../../../core/data/paginated-list.model';
import { RemoteData } from '../../../core/data/remote-data';
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
import { PaginationComponentOptions } from '../../pagination/pagination-component-options.model';
import { ObjectSelectService } from '../object-select.service';
import { SortOptions } from '../../../core/cache/models/sort-options.model';
import { FeatureID } from '../../../core/data/feature-authorization/feature-id';
import { AuthorizationDataService } from '../../../core/data/feature-authorization/authorization-data.service';
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
/**
* An abstract component used to select DSpaceObjects from a specific list and returning the UUIDs of the selected DSpaceObjects