analytica-frontend-lib
Version:
Repositório público dos componentes utilizados nas plataformas da Analytica Ensino
51 lines • 1.86 kB
TypeScript
import { type StudentsHighlightPeriod } from '../../hooks/useStudentsHighlight';
/**
* Period selection type - either a fixed period or custom date range
*/
export interface PeriodSelection {
/** Selection type: 'fixed' for predefined periods, 'custom' for date range */
type: 'fixed' | 'custom';
/** Selected period when type is 'fixed' */
period?: StudentsHighlightPeriod;
/** Start date when type is 'custom' (ISO date string YYYY-MM-DD) */
startDate?: string;
/** End date when type is 'custom' (ISO date string YYYY-MM-DD) */
endDate?: string;
}
/**
* Default period selection (1 year)
*/
export declare const DEFAULT_PERIOD_SELECTION: PeriodSelection;
interface PeriodSelectorModalProps {
/** Whether the modal is open */
readonly isOpen: boolean;
/** Callback when modal is closed */
readonly onClose: () => void;
/** Callback when period selection is applied */
readonly onApply: (selection: PeriodSelection) => void;
/** Current period selection */
readonly currentSelection?: PeriodSelection;
}
/**
* Get display label for a period selection
*/
export declare function getPeriodSelectionLabel(selection: PeriodSelection): string;
/**
* PeriodSelectorModal - Modal for selecting report period
*
* Allows selecting either a fixed period (7 days, 1 month, etc.) or
* a custom date range with start and end dates.
*
* @example
* ```tsx
* <PeriodSelectorModal
* isOpen={isOpen}
* onClose={() => setIsOpen(false)}
* onApply={(selection) => setPeriodSelection(selection)}
* currentSelection={periodSelection}
* />
* ```
*/
export declare function PeriodSelectorModal({ isOpen, onClose, onApply, currentSelection, }: PeriodSelectorModalProps): import("react/jsx-runtime").JSX.Element;
export default PeriodSelectorModal;
//# sourceMappingURL=PeriodSelectorModal.d.ts.map