mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-3088] Fix lint errors
This commit is contained in:
@@ -337,12 +337,6 @@ export const models =
|
||||
})
|
||||
|
||||
export class CoreModule {
|
||||
constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
|
||||
if (isNotEmpty(parentModule)) {
|
||||
throw new Error('CoreModule is already loaded. Import it in the AppModule only');
|
||||
}
|
||||
}
|
||||
|
||||
static forRoot(): ModuleWithProviders {
|
||||
return {
|
||||
ngModule: CoreModule,
|
||||
@@ -351,4 +345,10 @@ export class CoreModule {
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
constructor(@Optional() @SkipSelf() parentModule: CoreModule) {
|
||||
if (isNotEmpty(parentModule)) {
|
||||
throw new Error('CoreModule is already loaded. Import it in the AppModule only');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -23,5 +23,4 @@ export class VocabularyEntriesResponseParsingService extends EntriesResponsePars
|
||||
return VocabularyEntry;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -31,9 +31,9 @@ export abstract class DsDynamicVocabularyComponent extends DynamicFormControlCom
|
||||
|
||||
public abstract pageInfo: PageInfo;
|
||||
|
||||
constructor(protected vocabularyService: VocabularyService,
|
||||
protected layoutService: DynamicFormLayoutService,
|
||||
protected validationService: DynamicFormValidationService
|
||||
protected constructor(protected vocabularyService: VocabularyService,
|
||||
protected layoutService: DynamicFormLayoutService,
|
||||
protected validationService: DynamicFormValidationService
|
||||
) {
|
||||
super(layoutService, validationService);
|
||||
}
|
||||
@@ -75,7 +75,6 @@ export abstract class DsDynamicVocabularyComponent extends DynamicFormControlCom
|
||||
return initValue$;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Emits a blur event containing a given value.
|
||||
* @param event The value to emit.
|
||||
|
@@ -22,6 +22,7 @@ export class DynamicListCheckboxGroupModel extends DynamicCheckboxGroupModel {
|
||||
@serializable() vocabularyOptions: VocabularyOptions;
|
||||
@serializable() repeatable: boolean;
|
||||
@serializable() groupLength: number;
|
||||
@serializable() _value: VocabularyEntry[];
|
||||
isListGroup = true;
|
||||
valueUpdates: Subject<any>;
|
||||
|
||||
@@ -38,7 +39,9 @@ export class DynamicListCheckboxGroupModel extends DynamicCheckboxGroupModel {
|
||||
this.valueUpdates.next(config.value);
|
||||
}
|
||||
|
||||
@serializable() _value: VocabularyEntry[];
|
||||
get hasAuthority(): boolean {
|
||||
return this.vocabularyOptions && hasValue(this.vocabularyOptions.name);
|
||||
}
|
||||
|
||||
get value() {
|
||||
return this._value;
|
||||
@@ -55,8 +58,4 @@ export class DynamicListCheckboxGroupModel extends DynamicCheckboxGroupModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
get hasAuthority(): boolean {
|
||||
return this.vocabularyOptions && hasValue(this.vocabularyOptions.name);
|
||||
}
|
||||
}
|
||||
|
@@ -16,7 +16,6 @@ import { ConfidenceType } from '../../../../../../core/shared/confidence-type';
|
||||
import { PaginatedList } from '../../../../../../core/data/paginated-list';
|
||||
import { getFirstSucceededRemoteDataPayload } from '../../../../../../core/shared/operators';
|
||||
import { DsDynamicVocabularyComponent } from '../dynamic-vocabulary.component';
|
||||
import { DynamicLookupModel } from './dynamic-lookup.model';
|
||||
|
||||
/**
|
||||
* Component representing a lookup or lookup-name input field
|
||||
@@ -29,7 +28,7 @@ import { DynamicLookupModel } from './dynamic-lookup.model';
|
||||
export class DsDynamicLookupComponent extends DsDynamicVocabularyComponent implements OnDestroy, OnInit {
|
||||
@Input() bindId = true;
|
||||
@Input() group: FormGroup;
|
||||
@Input() model: DynamicLookupModel | DynamicLookupNameModel;
|
||||
@Input() model: any;
|
||||
|
||||
@Output() blur: EventEmitter<any> = new EventEmitter<any>();
|
||||
@Output() change: EventEmitter<any> = new EventEmitter<any>();
|
||||
@@ -272,7 +271,7 @@ export class DsDynamicLookupComponent extends DsDynamicVocabularyComponent imple
|
||||
public setCurrentValue(value: any, init = false) {
|
||||
if (init) {
|
||||
this.getInitValueFromModel()
|
||||
.subscribe((value: FormFieldMetadataValueObject) => this.setDisplayInputValue(value.display));
|
||||
.subscribe((formValue: FormFieldMetadataValueObject) => this.setDisplayInputValue(formValue.display));
|
||||
} else if (hasValue(value)) {
|
||||
if (value instanceof FormFieldMetadataValueObject || value instanceof VocabularyEntry) {
|
||||
this.setDisplayInputValue(value.display);
|
||||
|
@@ -148,7 +148,7 @@ export class DsDynamicScrollableDropdownComponent extends DsDynamicVocabularyCom
|
||||
|
||||
if (init) {
|
||||
result = this.getInitValueFromModel().pipe(
|
||||
map((value: FormFieldMetadataValueObject) => value.display)
|
||||
map((formValue: FormFieldMetadataValueObject) => formValue.display)
|
||||
);
|
||||
} else {
|
||||
if (isEmpty(value)) {
|
||||
|
@@ -187,8 +187,8 @@ export class DsDynamicTypeaheadComponent extends DsDynamicVocabularyComponent im
|
||||
let result: string;
|
||||
if (init) {
|
||||
this.getInitValueFromModel()
|
||||
.subscribe((value: FormFieldMetadataValueObject) => {
|
||||
this.currentValue = value;
|
||||
.subscribe((formValue: FormFieldMetadataValueObject) => {
|
||||
this.currentValue = formValue;
|
||||
});
|
||||
} else {
|
||||
if (isEmpty(value)) {
|
||||
|
@@ -7,7 +7,6 @@ import { createSuccessfulRemoteDataObject$ } from '../remote-data.utils';
|
||||
import { RemoteData } from '../../core/data/remote-data';
|
||||
import { VocabularyOptions } from '../../core/submission/vocabularies/models/vocabulary-options.model';
|
||||
|
||||
|
||||
export class VocabularyServiceStub {
|
||||
|
||||
private _payload = [
|
||||
|
@@ -270,7 +270,6 @@ export class VocabularyTreeviewComponent implements OnDestroy, OnInit {
|
||||
return isNotEmpty(this.searchText);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reset tree resulting from a previous search
|
||||
*/
|
||||
|
Reference in New Issue
Block a user