# sprintify-ui v0.12.27 - Type Reference ## ActionColors ``` type ActionColors = | 'dark' | 'light' | 'danger' | 'success' | 'warning' | 'primary' | 'secondary'; ``` ## ActionItem ``` interface ActionItem { label?: string; description?: string; href?: string; to?: RouteLocationRaw; action?: () => Promise | void; icon?: string; count?: number; color?: ActionColors; disabled?: boolean; meta?: { line?: boolean; showSubItems?: 'always' | 'active' | 'never'; dropdownWidth?: number; [key: string]: any }; actions?: ActionItem[]; } ``` ## Address ``` type Address = { address_1?: string | null; address_2?: string | null; postal_code?: string | null; city?: string | null; region?: string | null; country?: string | null; notes?: string | null; }; ``` ## AvatarUserInput ``` type AvatarUserInput = Partial & { name?: string; label?: string; }; ``` ## BaseBadgeProps ``` type BaseBadgeProps = InstanceType["$props"] & { label: string; }; ``` ## BaseCropperConfig ``` interface BaseCropperConfig { source: string; config?: CropperConfig; preset?: CropperPreset; presetOptions?: Record; saveOptions?: ResultOptions; } ``` ## BaseTableColumnClassValue ``` type BaseTableColumnClassValue = string | string[] | Record; ``` ## BaseTableColumnData ``` interface BaseTableColumnData { id: string; label: string; tooltip?: string; field: string; // eslint-disable-next-line @typescript-eslint/no-explicit-any meta: undefined | Record; newKey: string; numeric: boolean; align: 'left' | 'center' | 'right'; searchable: boolean; sortable: boolean; ignoreRowInteractions: boolean; toggle: boolean; toggleDefault: boolean; width: number; class?: BaseTableColumnClassValue | ((row: Row) => BaseTableColumnClassValue); headerClass?: string | string[]; to?: (row: Row) => RouteLocationRaw; href?: (row: Row) => string; target?: '_blank' | '_self' | '_parent' | '_top'; onClick?: (row: Row, index: number, column: BaseTableColumnData, colIndex: number, event: MouseEvent) => void; style: { width: undefined | number; maxWidth: undefined | number; minWidth: undefined | number; overflow: undefined | string; padding: undefined | string; }; } ``` ## Breadcrumb ``` interface Breadcrumb { icon?: string; to: RouteLocationRaw; label: string; } ``` ## CellSize ``` type CellSize = 'none' | Size; ``` ## Collection ``` type Collection = CollectionItem[]; ``` ## CollectionItem ``` interface CollectionItem { [key: string]: any; } ``` ## Country ``` interface Country { id: string; name: string; } ``` ## CropperConfig ``` interface CropperConfig { height?: number; width?: number; viewport?: { type?: CropType; width: number; height: number; }; boundary?: { width: number; height: number; }; enableResize?: boolean; enableZoom?: boolean; enableOrientation?: boolean; showZoomer?: boolean; initialResize?: number; maxWidth?: number; } ``` ## DataFormat ``` enum DataFormat { json = 'json', formData = 'formData', } ``` ## DataIteratorSection ``` interface DataIteratorSection { name: string; title: string; closeText: string; icon: string; count?: number; opened?: boolean; } ``` ## DataTableQuery ``` interface DataTableQuery extends Record { page?: number; sort?: string; search?: string; filter?: Record; } ``` ## Filter ``` interface Filter { label: string; id: string; default?: string; options: FilterOption[] } ``` ## GanttItemFormatted ``` interface GanttItemFormatted { id: number | string; name: string; color: string; height: number; barHeight: number; width: number; start: DateTime; end: DateTime; x: number; y: number; milliseconds: number; meta?: Record; } ``` ## GanttRelationship ``` interface GanttRelationship { fromId: number | string; toId: number | string; } ``` ## GanttRow ``` interface GanttRow { id: number | string; name: string; meta?: Record; items: GanttItem[]; height?: number; } ``` ## GanttRowFormatted ``` interface GanttRowFormatted { id: number | string; name: string; items: GanttItemFormatted[]; height: number; barHeight: number; width: number; start: DateTime; end: DateTime; x: number; y: number; meta?: Record; } ``` ## HeaderAttribute ``` interface HeaderAttribute { icon?: string; label: string; tooltip?: string; to?: RouteLocationRaw; href?: string; action?: () => Promise | void; target?: string; } ``` ## InputConfigProps ``` interface InputConfigProps { label?: string; placeholder?: string; name?: string; type?: string; size?: Size; required?: boolean; disabled?: boolean; } ``` ## JsonData ``` interface JsonData { [key: string]: JsonDataItem; } ``` ## JsonDataItem ``` type JsonDataItem = string | number | null | undefined | JsonData[] | JsonData; ``` ## Locales ``` type Locales = { [locale: string]: string }; ``` ## Media ``` interface Media { id: string; name: string; file_name: string; size: number; mime_type: string; url: string; } ``` ## MediaLibraryPayload ``` type MediaLibraryPayload = (Media | UploadedFile)[]; ``` ## Method ``` enum Method { post = 'post', put = 'put', patch = 'patch', } ``` ## NextFunction ``` type NextFunction = () => void; ``` ## NormalizedOption ``` type NormalizedOption = { option: RawOption | null; value: OptionValue; label: string; }; ``` ## Notification ``` interface Notification { id: string; text: string; to?: RouteLocationRaw; read?: boolean; created_at?: string; } ``` ## NotificationsConfig ``` interface NotificationsConfig { count: number; items: Notification[]; footerLabel?: string; footerTo?: RouteLocationRaw; } ``` ## OptionValue ``` type OptionValue = string | number | null; ``` ## PaginatedCollection ``` interface PaginatedCollection extends PaginationMetadata { data: Collection; } ``` ## PaginationMetadata ``` interface PaginationMetadata { current_page: number; per_page: number; last_page: number; total: number; } ``` ## RawOption ``` type RawOption = Record; ``` ## Region ``` interface Region { id: string; name: string; country_id: string; } ``` ## ResourceCollection ``` interface ResourceCollection { meta: PaginationMetadata; data: Collection; } ``` ## Row ``` type Row = Record; ``` ## RowAction ``` interface RowAction { label: string; icon: string; action?: (row: CollectionItem) => Promise | void; to?: (row: CollectionItem) => RouteLocationRaw; href?: (row: CollectionItem) => string; disabled?: (row: CollectionItem) => boolean; } ``` ## SelectConfiguration ``` interface SelectConfiguration { option?: SelectConfigurationOption; options: SelectConfigurationOption[]; onChange?: (option: SelectConfigurationOption | null) => void; } ``` ## SelectOption ``` type SelectOption = string | number | null; ``` ## Selector ``` interface Selector { label: string; action: (item: Item) => boolean; } ``` ## SignatureError ``` interface SignatureError { code: SignatureErrorCode; message: string; } ``` ## SizeBehavior ``` enum SizeBehavior { default = 'default', input = 'input', } ``` ## StepperItem ``` interface StepperItem { title: string; description?: string | null; stepNumber: number; status: Status; } ``` ## TimelineItem ``` interface TimelineItem { title: string; icon: string; description?: null | string; date?: string | null; color?: string | null; onEdit?: () => void | Promise; onDelete?: () => void | Promise; } ``` ## ToolbarOption ``` type ToolbarOption = 'undo' | 'redo' | '|' | 'heading' | 'mediaEmbed' | 'removeFormat' | 'findAndReplace' | 'bold' | 'italic' | 'underline' | 'link' | 'insertImage' | 'numberedList' | 'bulletedList' | 'code' | 'codeblock' | 'insertTable' | 'fontColor' | 'fontBackgroundColor'; ``` ## UploadedFile ``` interface UploadedFile { id: string; name: string; file_name: string; size: number; mime_type: string; original_file?: File; data_url?: string; } ``` ## User ``` interface User { full_name: string; email?: string; avatar_url?: string; } ``` ## Value ``` type Value = { [locale: string]: string | number | boolean }; ```