export interface MinMaxRangeItem { enabled: boolean; minValue?: number | string | { field: string; }; maxValue?: number | string | { field: string; }; } export interface MinMaxConstraints { minValue?: number | string; maxValue?: number | string; minDate?: string; maxDate?: string; minTime?: string; maxTime?: string; } export declare class MinMaxRuleEngine { /** * Extract min/max constraints from minMaxRange array * Handles three cases: * 1. Direct values (enabled: false) * 2. Single field reference (enabled: true, 1 range) * 3. Multiple ranges (enabled: true, 2+ ranges) - takes UTMOST * * @param minMaxRange - Array of range configurations * @param formValues - Current form state values (id → value) * @param componentType - 'number' | 'date' | 'dateRange' * @returns Constraints object with appropriate keys */ static getConstraints(minMaxRange: MinMaxRangeItem[] | undefined, formValues: Record, componentType?: string): MinMaxConstraints; /** * Resolve a single value - either direct or field reference * * @param value - Direct value or field reference object * @param formValues - Form state values for field lookup * @returns Resolved value or undefined */ private static resolveValue; /** * Get the most permissive (widest) minimum value * For numbers: MIN of all mins * For dates: earliest date (MIN string comparison on ISO format) * For times: earliest time (MIN string comparison on 24-hour format) * * @param ranges - Array of {min, max} values * @param componentType - Type of component * @returns Most permissive minimum value */ private static getPermissiveMin; /** * Get the most permissive (widest) maximum value * For numbers: MAX of all maxs * For dates: latest date (MAX string comparison on ISO format) * For times: latest time (MAX string comparison on 24-hour format) * * @param ranges - Array of {min, max} values * @param componentType - Type of component * @returns Most permissive maximum value */ private static getPermissiveMax; /** * Convert MM/DD/YYYY date format to ISO (YYYY-MM-DD) for comparison * Handles both formats gracefully * * @param dateString - Date in MM/DD/YYYY or ISO format * @returns ISO date string (YYYY-MM-DD) */ private static convertToISO; /** * Convert 12-hour time format to 24-hour format for comparison * Handles both 12-hour (hh:mm a) and 24-hour (HH:mm) formats * * @param timeString - Time in 12-hour (hh:mm a/p) or 24-hour (HH:mm) format * @returns 24-hour format time string (HH:mm) */ private static convertTimeTo24Hour; /** * Get empty constraints object based on component type */ private static getEmptyConstraints; /** * Validate if a value passes all min/max constraints (optional) * Can be used for client-side validation before submission * * @param value - Value to validate * @param constraints - Constraints to check against * @param componentType - Type of component * @returns Validation result with error message if invalid */ static validateValue(value: any, constraints: MinMaxConstraints, componentType: string): { isValid: boolean; error?: string; }; }