UNPKG

active-table

Version:

Framework agnostic table component for editable data experience

34 lines 1.3 kB
import { LabelOptions, SelectOptions, CellDropdownT } from './cellDropdown'; import { DEFAULT_COLUMN_TYPES_STR } from '../enums/defaultColumnTypes'; import { CustomTextProcessing } from './customTextProcessing'; import { IconSettings } from './dropdownButtonItem'; import { Calendar } from './calendarFunctionality'; import { TextValidation } from './textValidation'; import { InterfacesUnion } from './utilityTypes'; import { Sorting } from './sorting'; export type ColumnIconSettings = InterfacesUnion<{ reusableIconName: DEFAULT_COLUMN_TYPES_STR; } | IconSettings>; interface Parent { name: string; textValidation?: TextValidation; customTextProcessing?: CustomTextProcessing; sorting?: Sorting; iconSettings?: ColumnIconSettings; } interface Label extends Omit<Parent, 'validation'> { label: CellDropdownT<LabelOptions> | true; } interface Select extends Omit<Parent, 'validation'> { select: CellDropdownT<SelectOptions> | true; } interface CalendarT extends Omit<Parent, 'sorting'> { calendar: Calendar; } interface Checkbox extends Omit<Parent, 'sorting'> { checkbox: true; } export type ColumnType = InterfacesUnion<Select | Label | CalendarT | Checkbox | Parent>; export type ColumnTypes = ColumnType[]; export {}; //# sourceMappingURL=columnType.d.ts.map