import type { CustomFilterProps, CustomFloatingFilterProps } from 'ag-grid-react'; import type { IFilter } from 'ag-grid-community'; import { dayOf, fromIsoDate, toIsoDate } from '../calendar-day'; export { dayOf, fromIsoDate, toIsoDate }; /** * Custom AG Grid filter component for date *ranges*. AG Grid Community's * built-in `agDateColumnFilter` only handles single-date comparison — * platform needs "between X and Y" for invoice / transaction lists. * * Wire on a colDef: * ```tsx * { field: 'date', filter: DateRangeFilter } * ``` * * The filter model has shape `{ type: 'inRange', dateFrom, dateTo }` to * stay close to AG Grid's own date-filter convention so server-side * adapters can interpret it the same way. */ export interface DateRangeFilterModel { type: 'inRange'; dateFrom: string | null; dateTo: string | null; } /** * `filterParams` a colDef may pass to `DateRangeFilter` / * `DateRangeFloatingFilter`. * * `commitMode` is forwarded to the wrapped `DateRangePicker`. Leave it unset * (picker default `'auto'`, commit-on-complete-range) for cheap client-side row * models; set `'apply'` for SERVER-side row models so each range edit defers to * one Apply and fires a single datasource round-trip instead of one per commit. */ export interface DateRangeFilterParams { placeholder?: string; commitMode?: 'auto' | 'apply'; } /** Whether a cell's day lies within `[dateFrom, dateTo]` (either end open). */ export declare function dayInRange(cellValue: unknown, dateFrom: string | null | undefined, dateTo: string | null | undefined): boolean; export declare function DateRangeFilter(props: CustomFilterProps): import("react/jsx-runtime").JSX.Element; /** * Floating-filter companion for `DateRangeFilter`. * * Renders the kit's `` directly as the floating-filter * input — its built-in trigger button + calendar popover IS the filter * UI. Earlier versions wrapped the picker in a second ``, * producing the "click → empty popover with another trigger → click * again → calendar" double-step that read as duplicated UI. */ export declare function DateRangeFloatingFilter(props: CustomFloatingFilterProps): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=date-range-filter.d.ts.map