mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 13:33:03 +00:00
101108: Automatic ng update @angular/core@14
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import {Injectable, Optional} from '@angular/core';
|
||||
import { AbstractControl, FormControl, FormGroup } from '@angular/forms';
|
||||
import { AbstractControl, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
||||
|
||||
import {
|
||||
DYNAMIC_FORM_CONTROL_TYPE_ARRAY,
|
||||
@@ -59,7 +59,7 @@ export class FormBuilderService extends DynamicFormService {
|
||||
/**
|
||||
* This map contains the active forms control groups
|
||||
*/
|
||||
private formGroups: Map<string, FormGroup>;
|
||||
private formGroups: Map<string, UntypedFormGroup>;
|
||||
|
||||
/**
|
||||
* This is the field to use for type binding
|
||||
@@ -83,7 +83,7 @@ export class FormBuilderService extends DynamicFormService {
|
||||
|
||||
}
|
||||
|
||||
createDynamicFormControlEvent(control: FormControl, group: FormGroup, model: DynamicFormControlModel, type: string): DynamicFormControlEvent {
|
||||
createDynamicFormControlEvent(control: UntypedFormControl, group: UntypedFormGroup, model: DynamicFormControlModel, type: string): DynamicFormControlEvent {
|
||||
const $event = {
|
||||
value: (model as any).value,
|
||||
autoSave: false
|
||||
@@ -369,12 +369,12 @@ export class FormBuilderService extends DynamicFormService {
|
||||
return model.type === DYNAMIC_FORM_CONTROL_TYPE_INPUT;
|
||||
}
|
||||
|
||||
getFormControlById(id: string, formGroup: FormGroup, groupModel: DynamicFormControlModel[], index = 0): AbstractControl {
|
||||
getFormControlById(id: string, formGroup: UntypedFormGroup, groupModel: DynamicFormControlModel[], index = 0): AbstractControl {
|
||||
const fieldModel = this.findById(id, groupModel, index);
|
||||
return isNotEmpty(fieldModel) ? formGroup.get(this.getPath(fieldModel)) : null;
|
||||
}
|
||||
|
||||
getFormControlByModel(formGroup: FormGroup, fieldModel: DynamicFormControlModel): AbstractControl {
|
||||
getFormControlByModel(formGroup: UntypedFormGroup, fieldModel: DynamicFormControlModel): AbstractControl {
|
||||
return isNotEmpty(fieldModel) ? formGroup.get(this.getPath(fieldModel)) : null;
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ export class FormBuilderService extends DynamicFormService {
|
||||
* @param id id of model
|
||||
* @param formGroup FormGroup
|
||||
*/
|
||||
addFormGroups(id: string, formGroup: FormGroup): void {
|
||||
addFormGroups(id: string, formGroup: UntypedFormGroup): void {
|
||||
this.formGroups.set(id, formGroup);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user