import { r as ExporterEntry } from "./exporter-ZZesPOOU.cjs"; import { _ as TableTheme, a as FilterImplementation, c as InternalColumn, d as PartialTableTheme, f as Sort, g as TableRef, h as TableProps, i as CommonFilterProps, l as InternalTableState, m as TableItem, n as ColumnFactory, o as FunctionWithDeps, p as SortDirection, r as ColumnGenerator, s as Id, t as Column, u as MemoizedTableTheme, v as TableStateStorage } from "./types-1gz-mJJm.cjs"; import * as _emotion_react_jsx_runtime1 from "@emotion/react/jsx-runtime"; import * as react0 from "react"; import { ComponentType, ForwardedRef, HTMLProps, ReactNode } from "react"; import { Store } from "schummar-state/react"; //#region rolldown:runtime //#endregion //#region src/components/autoFocusTextField.d.ts type Props = TableTheme['components']['TextField'] extends ComponentType ? T : never; declare function AutoFocusTextField(props: Omit): _emotion_react_jsx_runtime1.JSX.Element; //#endregion //#region src/components/combinedFilter.d.ts interface CombinedFilterProps extends Pick, 'classNames'> { columnIds?: string[]; } declare function CombinedFilter({ columnIds: inputColumnIds, ...props }: CombinedFilterProps): _emotion_react_jsx_runtime1.JSX.Element; //#endregion //#region src/components/datePicker.d.ts type DateRange = { min: Date; max: Date; }; type DatePickerQuickOption = 'today' | 'thisWeek' | 'thisMonth' | 'thisYear' | 'lastSevenDays' | 'lastThirtyDays' | { label: ReactNode; value: Date | DateRange | (() => Date | DateRange); } | ((onChange: (value: Date | DateRange | null) => void) => ReactNode); type DatePickerChangeSource = 'input' | 'calendarWeek' | 'calendar' | 'quickOption'; type DatePickerProps = { /** Currently selected day or range of days. */ value: Date | DateRange | null; /** Callback for when the day (range) changes. */ onChange: (value: Date | DateRange | null, source: DatePickerChangeSource) => void; /** Currently visible date. */ dateInView?: Date; /** Callback for when the currently visible date changes. */ onDateInViewChange?: (value: Date) => void; /** If enabled, ranges can be selected. */ rangeSelect?: boolean; /** Which locale to use to render the calendar. */ locale?: string; /** Which day of the week should be in the first column. (0=Sunday, 1=Monday, ...) * @default 1 */ firstDayOfWeek?: 0 | 1 | 2 | 3 | 4 | 5 | 6; /** Which month to show initially */ defaultDateInView?: Date; /** Show buttons to quickly select suggested dates or date ranges */ quickOptions?: DatePickerQuickOption[]; noReset?: boolean; /** Minimum selectable date */ /** Date ranges that are visually marked as blocked */ blockedRanges?: DateRange[]; minDate?: Date; /** Maximum selectable date */ maxDate?: Date; /** Whether to show the calendar week in the first column */ showCalendarWeek?: boolean; /** Whether to show and allow editing of time */ showTime?: boolean | { showSeconds?: boolean; }; }; declare function DatePickerProvider({ children, ...props }: Partial> & { children?: ReactNode; }): _emotion_react_jsx_runtime1.JSX.Element; /** Rounds a date down to the start of the day. */ declare const startOfDay: (d: Date) => Date; /** Rounds a date up to the end of the day. */ declare const endOfDay: (d: Date) => Date; declare const lastDays: (days: number) => DateRange; declare const today: () => DateRange; declare const thisWeek: (delta?: number, firstDayOfWeek?: number) => DateRange; declare const thisMonth: (delta?: number) => DateRange; declare const thisYear: (delta?: number) => DateRange; declare const getCalendarWeek: (date: Date) => number; declare const commonQuickOptions: { today: { label: _emotion_react_jsx_runtime1.JSX.Element; value: () => DateRange; }; thisWeek: { label: _emotion_react_jsx_runtime1.JSX.Element; value: (props: DatePickerProps) => DateRange; }; thisMonth: { label: _emotion_react_jsx_runtime1.JSX.Element; value: () => DateRange; }; thisYear: { label: _emotion_react_jsx_runtime1.JSX.Element; value: () => DateRange; }; lastSevenDays: { label: _emotion_react_jsx_runtime1.JSX.Element; value: () => DateRange; }; lastThirtyDays: { label: _emotion_react_jsx_runtime1.JSX.Element; value: () => DateRange; }; }; /** Returns whether two dates and/or date ranges intersect. Intersection is considered per day. */ declare function dateIntersect(a: Date | DateRange | null | undefined, b: Date | DateRange | null | undefined): boolean; declare function dateClamp(date: Date, min?: Date, max?: Date): Date; declare function DatePicker(props: DatePickerProps): _emotion_react_jsx_runtime1.JSX.Element; //#endregion //#region src/components/dateFilter.d.ts declare function DateFilter({ locale, firstDayOfWeek, defaultDateInView, quickOptions, singleSelect, filterBy, minDate, maxDate, showCalendarWeek, showTime, ...props }: { /** If enabled, only single days can be selected. Ranges otherwise. */ singleSelect?: boolean; } & Pick & CommonFilterProps): JSX.Element; //#endregion //#region src/components/rangeFilter.d.ts interface RangeFilterProps extends CommonFilterProps { min?: number; max?: number; } declare function RangeFilter({ min, max, filterBy, ...props }: RangeFilterProps): JSX.Element; //#endregion //#region src/components/virtualList.d.ts interface VirtualListProps extends Omit, 'children'> { virtual?: boolean | { rowHeight?: number; initalRowHeight?: number; throttleScroll?: number; overscan?: number; overscanBottom?: number; overscanTop?: number; }; items: T$1[]; children: (item: T$1, index: number) => ReactNode; } //#endregion //#region src/components/selectFilter.d.ts declare function SelectFilter({ options: providedOptions, stringValue, render, singleSelect, hideSearchField, hideResetButton, ...props }: { /** Which options are provided to select. By default all unique item values are used. */ options?: TFilterBy[]; /** String representation of a value. Used to filter options via the text field. */ stringValue?: (value: TFilterBy) => string; /** Render values. By default a string representation of the value is used. */ render?: (value: TFilterBy) => ReactNode; /** If enabled, only one option can be selected at a time. */ singleSelect?: boolean; /** If enabled, the search field is hidden. */ hideSearchField?: boolean; /** If enabled, the reset button is hidden. */ hideResetButton?: boolean; /** Virtual list props. * @default true */ virtual?: VirtualListProps['virtual']; } & CommonFilterProps>): JSX.Element; //#endregion //#region src/components/table.d.ts declare const Table: (props: TableProps & { ref?: ForwardedRef; }) => ReturnType; declare function _Table(props: TableProps, ref: ForwardedRef): JSX.Element; //#endregion //#region src/components/textFilter.d.ts declare function substringCompare(itemValue: string, filterValue: string): boolean; declare function prefixCompare(itemValue: string, filterValue: string): boolean; declare function exactCompare(itemValue: string, filterValue: string): boolean; declare function TextFilter({ compare, filterBy, placeholder, ...props }: { /** Custom comparison function. Should return true if an item value matches the current filter value. * By default a fuzzy text comparison is used. */ compare?: (itemValue: string, filterValue: string) => boolean; placeholder?: string; } & CommonFilterProps): JSX.Element; //#endregion //#region src/hooks/useFilter.d.ts declare function useFilter(impl: FilterImplementation): { isActive: boolean; close: () => void; value: TFilterValue | undefined; onChange: (value?: TFilterValue) => void; filterBy: (value: TColumnValue, item: TItem) => TFilterBy | TFilterBy[]; }; //#endregion //#region src/hooks/useTheme.d.ts declare function useTheme(selector: (theme: MemoizedTableTheme) => S): S; declare namespace helpers_d_exports { export { asNumber, asNumberOrArray, asString, asStringOrArray, castArray, cx, defaultEquals, flatMap, getAncestors, getDescendants, identity, intersect, isTruthy, orderBy, subStringMatch, uniq }; } declare const flatMap: (array: Iterable, flatMap: (t: T$1) => S[]) => S[]; declare const orderBy: (array: T$1[], selectors?: ((t: T$1) => any)[], direction?: ("desc" | "asc")[], locale?: (string | undefined)[], options?: (Intl.CollatorOptions | undefined)[]) => T$1[]; declare const uniq: (array: T$1[]) => T$1[]; declare const intersect: (a: Iterable, b: { has(t: T$1): boolean; }) => Set; declare const getAncestors: (activeItemsById: Map>, ...items: TableItem[]) => Set; declare const getDescendants: (...items: TableItem[]) => Set; declare const identity: (x: unknown) => any; declare const asString: (x: unknown) => string; declare const asStringOrArray: (x: unknown) => string | string[]; declare const asNumber: (x: unknown) => number | null; declare const asNumberOrArray: (x: unknown) => number | null | (number | null)[]; declare const defaultEquals: (a: unknown, b: unknown) => boolean; declare const subStringMatch: (a: string, b: string) => boolean; declare const castArray: (a: T$1 | T$1[]) => T$1[]; declare const cx: (...classNames: (string | false | undefined | null | Record)[]) => string; type Falsy = false | 0 | '' | null | undefined; declare function isTruthy(x: T$1): x is Exclude; //#endregion //#region src/misc/tableContext.d.ts declare const TableContext: react0.Context> | null>; declare const TableResetContext: react0.Context<() => void>; declare const ColumnContext: react0.Context; declare function useTableContext(): Store>; declare function useColumnContext(): Id; //#endregion //#region src/misc/tableSettings.d.ts interface TableSettingsContextType { theme: PartialTableTheme; exporters: ExporterEntry[]; } declare const TableSettingsContext: react0.Context; declare function TableSettingsProvider({ theme, exporters, additionalExporters, children }: Partial & { additionalExporters?: ExporterEntry[]; children?: ReactNode; }): _emotion_react_jsx_runtime1.JSX.Element; //#endregion //#region src/misc/textMatch.d.ts declare const textMatch: (text: string, query: string) => boolean; declare const termMatch: (text: string, query: string) => boolean; //#endregion //#region src/theme/tableTheme.d.ts declare function configureTableTheme(tableTheme: PartialTableTheme): void; declare function mergeThemes(...themes: PartialTableTheme[]): PartialTableTheme; //#endregion export { AutoFocusTextField, type Column, ColumnContext, type ColumnFactory, type ColumnGenerator, CombinedFilter, type CombinedFilterProps, type CommonFilterProps, DateFilter, DatePicker, type DatePickerChangeSource, type DatePickerProps, DatePickerProvider, type DatePickerQuickOption, type DateRange, type FilterImplementation, type FunctionWithDeps, type Id, type InternalColumn, type PartialTableTheme, RangeFilter, SelectFilter, type Sort, type SortDirection, Table, TableContext, type TableProps, type TableRef, TableResetContext, TableSettingsContext, TableSettingsProvider, type TableStateStorage, TextFilter, commonQuickOptions, configureTableTheme, dateClamp, dateIntersect, endOfDay, exactCompare, getCalendarWeek, helpers_d_exports as helpers, lastDays, mergeThemes, prefixCompare, startOfDay, substringCompare, termMatch, textMatch, thisMonth, thisWeek, thisYear, today, useColumnContext, useFilter, useTableContext, useTheme }; //# sourceMappingURL=index.d.cts.map