govuk-angular
Version:
Angular components port of govuk-frontend nunjucks macros.
28 lines (27 loc) • 1.13 kB
TypeScript
import { ElementRef, OnInit } from '@angular/core';
import * as i0 from "@angular/core";
export declare const createValidationSummary: () => ValidationSummary;
export interface ValidationSummary {
hasError: boolean;
errors: Array<ValidationError>;
}
export interface ValidationError {
/** id of input with error */
id?: string;
hasError: boolean;
fullError: string;
}
export declare class GovUKErrorSummaryComponent implements OnInit {
el: ElementRef;
/** ErrorSummary details */
private errorSummaryValue;
set errorSummary(value: ValidationSummary);
get errorSummary(): ValidationSummary;
/** A function which will set the focus on the input corresponding to the clicked error message */
focus: (id: string) => void;
constructor(el: ElementRef);
setFocus(id: any, $event: Event): void;
ngOnInit(): void;
static ɵfac: i0.ɵɵFactoryDeclaration<GovUKErrorSummaryComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<GovUKErrorSummaryComponent, "govuk-error-summary", never, { "errorSummary": "errorSummary"; "focus": "focus"; }, {}, never, never>;
}