interface ComponentSchema { key?: string; calculateValue?: string; calculateValueVariable?: string; redrawOn?: string | string[]; refreshOn?: string | string[]; customConditional?: string; clearOnHide?: boolean; type?: string; } interface ComponentInstance { component: ComponentSchema; redraw: () => unknown; __gdsVisibilityChanging?: boolean; parent?: { data?: unknown; }; key?: string; rootValue?: unknown; evaluate?: (expr: string, ctx: Record, variable?: string) => unknown; _conditionallyClear?: boolean; options?: { readOnly?: boolean; showHiddenFields?: boolean; }; shouldAddDefaultValue?: boolean; defaultValue?: unknown; setValue?: (value: unknown, flags?: { noUpdateEvent?: boolean; }) => unknown; visible?: boolean; allowData?: boolean; builderMode?: boolean; previewMode?: boolean; _data?: unknown; data?: unknown; getComponents?: () => ComponentInstance[]; hasValue?: (data?: unknown) => boolean; } interface ComponentPrototype { __gdsCalculatedValueRedrawGuardInstalled?: boolean; __gdsClearOnHideGuardInstalled?: boolean; __gdsHiddenDefaultGuardInstalled?: boolean; checkRefreshOn: (this: ComponentInstance, changes: unknown[], flags?: unknown) => void; redraw: (this: ComponentInstance) => unknown; clearComponentOnHide?: (this: ComponentInstance) => void; checkCondition?: (this: ComponentInstance, row?: unknown, data?: unknown) => boolean; } interface ComponentConstructor { prototype: ComponentPrototype; } interface DataGridInstance { dataValue: unknown[]; rows: Record[]; component: { components?: ComponentSchema[]; }; } interface DataGridSetValueFlags { triggeredComponentId?: string; [key: string]: unknown; } interface DataGridPrototype { __gdsDataGridRedrawGuardInstalled?: boolean; setValue: (this: DataGridInstance, value: unknown, flags?: DataGridSetValueFlags) => boolean; } interface DataGridConstructor { prototype: DataGridPrototype; } /** * Patches Form.io v5 prototypes to: * - stop calculated fields flickering from redundant redraws; * - stop `customConditional` containers losing data on tab switches; * - keep hidden fields out of the data, as v4 did; * - avoid the double iteration in `NestedComponent.checkData` (input lag). * * UMD consumers must call this explicitly after Formio is ready: * * installCalculatedValueRedrawGuard( * Formio.Components.components.component, * Formio.Components.components.datagrid * ); */ export declare const installCalculatedValueRedrawGuard: (ComponentClass?: ComponentConstructor, DataGridClass?: DataGridConstructor) => void; export {}; //# sourceMappingURL=avoidCalculatedValueRedraw.d.ts.map