import { FieldValidators } from './FieldApi.js'; import { AnyFormApi, FormValidators } from './FormApi.js'; import { GlobalFormValidationError, ValidationCause, ValidationError, ValidationSource } from './types.js'; export type UpdaterFn = (input: TInput) => TOutput; export type Updater = TOutput | UpdaterFn; /** * @private */ export declare function functionalUpdate(updater: Updater, input: TInput): TOutput; /** * Get a value from an object using a path, including dot notation. * @private */ export declare function getBy(obj: unknown, path: string | (string | number)[]): any; /** * Set a value on an object using a path, including dot notation. * @private */ export declare function setBy(obj: any, _path: any, updater: Updater): any; /** * Delete a field on an object using a path, including dot notation. * @private */ export declare function deleteBy(obj: any, _path: any): any; /** * @private */ export declare function makePathArray(str: string | Array): (string | number)[]; /** * @private */ export declare function concatenatePaths(path1: string, path2: string): string; /** * @private */ export declare function isNonEmptyArray(obj: any): boolean; interface AsyncValidatorArrayPartialOptions { validators?: T; asyncDebounceMs?: number; } /** * @private */ export interface AsyncValidator { cause: ValidationCause; validate: T; debounceMs: number; } interface SyncValidatorArrayPartialOptions { validators?: T; } /** * @private */ export interface SyncValidator { cause: ValidationCause; validate: T; } /** * @private */ export declare function getSyncValidatorArray(cause: ValidationCause, options: SyncValidatorArrayPartialOptions & { validationLogic?: any; form?: any; fieldName?: string; }): T extends FieldValidators ? Array> : T extends FormValidators ? Array> : never; /** * @private */ export declare function getAsyncValidatorArray(cause: ValidationCause, options: AsyncValidatorArrayPartialOptions & { validationLogic?: any; form?: any; fieldName?: string; }): T extends FieldValidators ? Array> : T extends FormValidators ? Array> : never; export declare const isGlobalFormValidationError: (error: unknown) => error is GlobalFormValidationError; export declare function evaluate(objA: T, objB: T): boolean; /** * Determines the logic for determining the error source and value to set on the field meta within the form level sync/async validation. * @private */ export declare const determineFormLevelErrorSourceAndValue: ({ newFormValidatorError, isPreviousErrorFromFormValidator, previousErrorValue, }: { newFormValidatorError: ValidationError; isPreviousErrorFromFormValidator: boolean; previousErrorValue: ValidationError; }) => { newErrorValue: ValidationError; newSource: ValidationSource | undefined; }; /** * Determines the logic for determining the error source and value to set on the field meta within the field level sync/async validation. * @private */ export declare const determineFieldLevelErrorSourceAndValue: ({ formLevelError, fieldLevelError, }: { formLevelError: ValidationError; fieldLevelError: ValidationError; }) => { newErrorValue: ValidationError; newSource: ValidationSource | undefined; }; export declare function createFieldMap(values: Readonly): { [K in keyof T]: K; }; /** * Merge the first parameter with the given overrides. * @private */ export declare function mergeOpts(originalOpts: T | undefined | null, overrides: T): T; export declare function uuid(): string; export declare const throttleFormState: (form: AnyFormApi) => void; export declare function deepCopy(obj: T): T; export {};