import { Pipe, PipeTransform } from '@angular/core'; import { FormioComponentForPdf } from '@core/typings/pdf.typing'; import { ReferenceFieldsUI } from '@core/typings/ui/reference-fields.typing'; import { FormDefinitionComponent } from '@features/configure-forms/form.typing'; import { FormHelperService } from '@features/formio/services/form-helper/form-helper.service'; @Pipe({name: 'gcMapComponentForPDF'}) export class MapComponentForPDFPipe implements PipeTransform { constructor ( private readonly formHelperService: FormHelperService ) { } transform (value: FormDefinitionComponent, refFields: ReferenceFieldsUI.RefResponseMap): FormioComponentForPdf { return this.formHelperService.mapComponentToComponentForPDF(value, refFields); } }