import { Context } from './context'; import { FormState } from './form.state'; import { ValidatorFn } from '@angular/forms/src/directives/validators'; /** * Base class for all widget contexts. * * @author Wael Jammal */ export declare abstract class WidgetContext extends Context { private _parent; private _path; protected _groupId: string; protected _ready: boolean; /** Schema path **/ readonly path: string; /** Parent context **/ readonly parent: Context; /** Form group id **/ readonly groupId: string; /** Ready state **/ readonly ready: boolean; /** Returns true if value is required **/ readonly required: boolean; /** Returns true if widget should be hidden **/ readonly hidden: boolean; /** * Initialize the widget. * * @param state Holds forms state * @param root Root context * @param schema Root schema * @param type Widget type * @param parent Parent context * @param object Model * @param path Widget path */ doInitInternal(state: FormState, root: WidgetContext, schema: any, type: string, parent: Context, object: any, path: string): Promise; /** * Aggregates all errors relating to this widget. */ getAllErrors(): Array; /** * Find a schema that matches the active model or passed model. */ protected findOneOfSchema(model?: any): any; /** * Find a schema that matches the active model or passed model. */ protected findAnyOfSchema(model?: any): any; /** * Returns a list of validators for this widget. */ protected getValidators(): ValidatorFn | ValidatorFn[]; /** * Destroy. */ protected destroy(): void; }