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