import { RenderingContext } from "../../ui/RenderingContext"; import type { Instance } from "../../ui/Instance"; import { PureContainerBase, PureContainerConfig } from "../../ui/PureContainer"; import { BooleanProp, Prop } from "../../ui/Prop"; /** Typed context interface for form-related context properties */ export interface FormRenderingContext extends RenderingContext { parentDisabled?: boolean; parentReadOnly?: boolean; parentViewMode?: boolean | string; parentTabOnEnterKey?: boolean; parentVisited?: boolean; parentStrict?: boolean; parentAsterisk?: boolean; validation?: { errors: ValidationErrorData[]; }; lastFieldId?: string; } export interface ValidationErrorData { fieldId: string; message: string; visited: boolean; type: string; } export interface ValidationGroupInstance extends Instance { validation: { errors: ValidationErrorData[]; }; valid?: boolean; } export interface ValidationGroupConfig extends PureContainerConfig { /** Binding used to store validation errors in the store. */ errors?: Prop; /** Binding which will be set to true if all child form field are valid. */ valid?: BooleanProp; /** Binding which will be set to true if any of child form field reports validation error. */ invalid?: BooleanProp; /** Set to `false` to disable all inner elements that support `disabled` property. */ enabled?: BooleanProp; /** Set to `true` to disable all inner elements that support `disabled` property. */ disabled?: BooleanProp; /** Set to `true` to make read-only all inner elements that support `readOnly` property. */ readOnly?: BooleanProp; /** Set to `true` to isolate children from participating in outer validation scopes. */ isolated?: BooleanProp; /** Set to `true` to notify all children to report errors. */ visited?: BooleanProp; /** Set to `true` to tab on Enter key for all children. */ tabOnEnterKey?: BooleanProp; /** Set to `true` to set all child fields to view mode. */ viewMode?: BooleanProp; /** Set to `true` to force children to respect disabled, readOnly, viewMode and visited flags set on the group level. */ strict?: BooleanProp; /** Set to `true` to add red asterisk for all required fields inside the group. */ asterisk?: BooleanProp; } export declare class ValidationGroup extends PureContainerBase { errors?: Prop; isolated?: boolean; declareData(...args: Record[]): void; explore(context: FormRenderingContext, instance: ValidationGroupInstance): void; exploreCleanup(context: FormRenderingContext, instance: ValidationGroupInstance): void; } //# sourceMappingURL=ValidationGroup.d.ts.map