import { FieldFormatTokenInfo, FieldSectionData, FieldSectionType } from '../models/dateSection'; export interface SectionWithPosition extends FieldSectionData { startIndex: number; endIndex: number; startInInput: number; endInInput: number; separatorStart?: number; separatorEnd?: number; startSeparator?: string; } export type CharacterQuery = string; export declare const cleanString: (dirtyString: string) => string; export declare const getTokenConfig: (token: string) => FieldFormatTokenInfo; export declare const findFormatTokens: (format: string) => Array<{ token: string; index: number; }>; /** * Clean separator for display by removing unwanted characters */ export declare const cleanSeparator: (separator: string) => string; /** * Extract sections and separators from a format string */ export declare const parseFormatIntoSections: (format: string) => Array<{ token: string; type: FieldSectionType; separator: string; index: number; trailingSeparator?: string; }>; /** * Expands format shortcuts into full format strings * Similar to MUI's expandFormat */ export declare const expandDateFormat: (utils: any, format: string) => string; /** * Finds parts of the format string that are escaped * Based on MUI's implementation */ export declare const getEscapedPartsFromFormat: (utils: any, expandedFormat: string) => Array<{ start: number; end: number; }>; /** * Gets section type and configuration from a format token * Similar to MUI's getDateSectionConfigFromFormatToken */ export declare const getSectionTypeFromFormatToken: (token: string) => { type: FieldSectionType; contentType: "digit" | "letter" | "digit-with-letter"; }; /** * Get maximum length for a section based on its type */ export declare const getSectionMaxLength: (type: FieldSectionType, token: string) => number; interface ExtendedFieldSectionData extends FieldSectionData { startSeparator?: string; } /** * Post-process sections to add input positions and handle formatDensity * Following MUI's approach to accurately track positions */ export declare const addPositionPropertiesToSections: (sections: ExtendedFieldSectionData[], options?: { isRtl?: boolean; formatDensity?: "dense" | "spacious"; }) => SectionWithPosition[]; /** * Enhanced implementation of parseDateSections, based on MUI's buildSectionsFromFormat * This handles format expansion, better token extraction, and improved section positioning */ export declare const parseDateSections: (format: string, value: string, utils: any, options?: { isRtl?: boolean; formatDensity?: "dense" | "spacious"; }) => FieldSectionData[]; /** * Convert sections back to date string with improved handling */ export declare const sectionsToDateString: (sections: FieldSectionData[], format: string, options?: { isRtl?: boolean; formatDensity?: "dense" | "spacious"; }) => string; /** * Clean a digit value based on section boundaries * Ensures the value is within valid range and properly formatted */ export declare const cleanDigitValue: (type: FieldSectionType, value: string, options?: { pad?: boolean; }) => string; /** * Function to build the visible string value in the input field from sections */ export declare const getInputValueFromSections: (sectionsWithPositions: SectionWithPosition[], options?: { includeRTLCharacters?: boolean; cleanStr?: boolean; }) => string; /** * Similar to MUI's mergeDateIntoReferenceDate but as a standalone utility */ export declare const mergeParsedDateWithReference: (utils: any, parsedDate: any, referenceDate: any, sectionTypes: string[]) => any; export declare const getSectionsFromFormat: (format: string) => string[]; export declare const getSectionFormatPatterns: () => Record; export declare const formatContainsSection: (format: string, sectionType: FieldSectionType) => boolean; export declare const extractSectionsFromValueString: (valueStr: string, format: string, utils: any) => Record; /** * Creates a section data object from a format token * Based on MUI's approach */ export declare const createSectionFromToken: (utils: any, token: string, value: string, startSeparator?: string, sectionIndex?: number) => ExtendedFieldSectionData; export {};