- Add getFirstValidationError utility for nested FieldErrors extraction - Add mergeWithDefaults utilities (deepMergeWithDefaults, type guards) - Add useValidationErrorHandler hook for toast + tab navigation - Add FormSelect component with Controller integration - Add FormTextarea component with register integration - Refactor AgentTypeForm to use new utilities - Remove verbose debug logging (now handled by hook) - Add comprehensive tests (53 new tests, 100 total) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
31 lines
701 B
TypeScript
31 lines
701 B
TypeScript
/**
|
|
* Form Utilities and Hooks
|
|
*
|
|
* Centralized exports for form-related utilities.
|
|
*
|
|
* @module lib/forms
|
|
*/
|
|
|
|
// Utils
|
|
export { getFirstValidationError, getAllValidationErrors } from './utils/getFirstValidationError';
|
|
export type { ValidationError } from './utils/getFirstValidationError';
|
|
|
|
export {
|
|
safeValue,
|
|
isNumber,
|
|
isString,
|
|
isBoolean,
|
|
isArray,
|
|
isObject,
|
|
deepMergeWithDefaults,
|
|
createFormInitializer,
|
|
} from './utils/mergeWithDefaults';
|
|
|
|
// Hooks
|
|
export { useValidationErrorHandler } from './hooks/useValidationErrorHandler';
|
|
export type {
|
|
TabFieldMapping,
|
|
UseValidationErrorHandlerOptions,
|
|
UseValidationErrorHandlerReturn,
|
|
} from './hooks/useValidationErrorHandler';
|