ui/build/collection-table/internal/collection-table-state.svelte
ui/build/collection-table/internal/collection-table-state.svelte
Classes
ColumnAPI
Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:70
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends Record<string, unknown> |
- |
TCondition |
unknown |
Constructors
Constructor
new ColumnAPI<T, TCondition>(init): ColumnAPI<T, TCondition>;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:98
Parameters
| Parameter | Type |
|---|---|
init |
ColumnAPIOptions<T, TCondition> |
Returns
ColumnAPI<T, TCondition>
Properties
accessor?
optional accessor?: (row) => unknown;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:78
Parameters
| Parameter | Type |
|---|---|
row |
RowAPI<T, TCondition> |
Returns
unknown
cell?
optional cell?: (__namedParameters) => unknown;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:75
Parameters
| Parameter | Type |
|---|---|
__namedParameters |
{ row: RowAPI<T, TCondition>; } |
__namedParameters.row |
RowAPI<T, TCondition> |
Returns
unknown
currentDisplay?
optional currentDisplay?: string;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:86
displayOptions?
optional displayOptions?: object[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:82
label
label: string;value
value: string;
enableHiding
enableHiding: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:92
enablePinning
enablePinning: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:90
enableResizing
enableResizing: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:91
enableSelection
enableSelection: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:93
enableSorting
enableSorting: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:89
header
header: (__namedParameters) => unknown;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:72
Parameters
| Parameter | Type |
|---|---|
__namedParameters |
{ table: TableAPI<T, TCondition>; } |
__namedParameters.table |
TableAPI<T, TCondition> |
Returns
unknown
id
id: string;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:71
initialWidth?
optional initialWidth?: number;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:79
isPinned
isPinned: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:95
isVisible
isVisible: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:94
maxWidth?
optional maxWidth?: number;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:81
minWidth?
optional minWidth?: number;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:80
onDisplayChange?
optional onDisplayChange?: (value) => void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:87
Parameters
| Parameter | Type |
|---|---|
value |
string |
Returns
void
sortDirection
sortDirection: "asc" | "desc" | undefined;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:97
width
width: number;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:96
Methods
setSize()
setSize(newSize): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:102
Parameters
| Parameter | Type |
|---|---|
newSize |
number |
Returns
void
togglePin()
togglePin(): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:100
Returns
void
toggleSort()
toggleSort(): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:99
Returns
void
toggleVisibility()
toggleVisibility(): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:101
Returns
void
RowAPI
Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:38
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends Record<string, unknown> |
- |
TCondition |
unknown |
Constructors
Constructor
new RowAPI<T, TCondition>(args): RowAPI<T, TCondition>;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:45
Parameters
| Parameter | Type |
|---|---|
args |
RowAPIOptions<T, TCondition> |
Returns
RowAPI<T, TCondition>
Properties
id
id: string;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:39
index
index: number;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:40
isExpanded
isExpanded: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:44
isSelected
isSelected: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:43
raw
raw: T;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:41
Methods
toggleExpanded()
toggleExpanded(): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:47
Returns
void
toggleSelection()
toggleSelection(): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:46
Returns
void
TableAPI
Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:121
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends Record<string, unknown> |
- |
TCondition |
unknown |
Constructors
Constructor
new TableAPI<T, TCondition>(args): TableAPI<T, TCondition>;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:163
Parameters
| Parameter | Type |
|---|---|
args |
TableAPIOptions<T, TCondition> |
Returns
TableAPI<T, TCondition>
Properties
CHECKBOX_WIDTH
readonly CHECKBOX_WIDTH: 48 = 48;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:122
columnDisplay
columnDisplay: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:139
columnLayouts
columnLayouts: object[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:152
canResize
canResize: boolean;cssVar
cssVar: `--table-col-${string}-width`;id
id: string;index
index: number;instance
instance: ColumnAPI<T, TCondition>;isCheckbox
isCheckbox: boolean;isPinned
isPinned: boolean;leftOffset
leftOffset: number;width
width: number;
columnOrder
columnOrder: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:137
columns
columns: ColumnAPI<T, TCondition>[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:141
columnSizing
columnSizing: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:136
columnVisibility
columnVisibility: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:135
condition
condition: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:131
contentFitWidths
contentFitWidths: Record<string, number>;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:140
data
data: T[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:129
DEFAULT_WIDTH
readonly DEFAULT_WIDTH: 150 = 150;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:123
expanded
expanded: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:134
isAllPageRowsSelected
isAllPageRowsSelected: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:149
isSomePageRowsSelected
isSomePageRowsSelected: boolean;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:150
orderedColumns
orderedColumns: ColumnAPI<T, TCondition>[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:151
pageSelectionState
pageSelectionState: object;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:144
isAllSelected
isAllSelected: boolean;isSomeSelected
isSomeSelected: boolean;selectedCount
selectedCount: number;
persistenceKey
persistenceKey: string;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:124
pinnedColumns
pinnedColumns: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:138
rowIds
rowIds: string[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:143
rowInstances
rowInstances: RowAPI<T, TCondition>[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:142
rowKey
rowKey: keyof T;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:126
rowSelection
rowSelection: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:133
sort
sort: any;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:132
totalRows
totalRows: number;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:130
viewKey
viewKey: string;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:125
Methods
createColumnResizer()
createColumnResizer(options): object;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:194
Parameters
| Parameter | Type |
|---|---|
options |
ColumnResizerOptions |
Returns
object
activeColumnId
readonly activeColumnId: string | null;handle
handle: (event, id) => void;Parameters
| Parameter | Type |
|---|---|
event |
MouseEvent | TouchEvent |
id |
string |
Returns
void
fitAllColumns()
fitAllColumns(): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:184
Returns
void
fitColumn()
fitColumn(columnId): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:183
Parameters
| Parameter | Type |
|---|---|
columnId |
string |
Returns
void
setColumnDisplay()
setColumnDisplay(columnDisplay): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:188
Parameters
| Parameter | Type |
|---|---|
columnDisplay |
Record<string, string> |
Returns
void
setColumnOrder()
setColumnOrder(order): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:191
Parameters
| Parameter | Type |
|---|---|
order |
string[] |
Returns
void
setColumns()
setColumns(columns): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:187
Parameters
| Parameter | Type |
|---|---|
columns |
ColumnAPI<T, TCondition>[] |
Returns
void
setColumnSize()
setColumnSize(columnId, size): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:181
Parameters
| Parameter | Type |
|---|---|
columnId |
string |
size |
number |
Returns
void
setCondition()
setCondition(condition): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:189
Parameters
| Parameter | Type |
|---|---|
condition |
TCondition |
Returns
void
setContentFitWidths()
setContentFitWidths(widths, initialize): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:182
Parameters
| Parameter | Type |
|---|---|
widths |
Record<string, number> |
initialize |
boolean |
Returns
void
setData()
setData(data): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:185
Parameters
| Parameter | Type |
|---|---|
data |
T[] |
Returns
void
setExpanded()
setExpanded(expanded): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:193
Parameters
| Parameter | Type |
|---|---|
expanded |
Record<string, boolean> |
Returns
void
setRowSelection()
setRowSelection(selection): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:192
Parameters
| Parameter | Type |
|---|---|
selection |
Record<string, boolean> |
Returns
void
setSort()
setSort(sort): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:190
Parameters
| Parameter | Type |
|---|---|
sort |
object[] |
Returns
void
setTotalRows()
setTotalRows(totalRows): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:186
Parameters
| Parameter | Type |
|---|---|
totalRows |
number |
Returns
void
toggleAllPageRowsSelected()
toggleAllPageRowsSelected(select): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:177
Parameters
| Parameter | Type |
|---|---|
select |
boolean |
Returns
void
toggleColumnPin()
toggleColumnPin(columnId): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:180
Parameters
| Parameter | Type |
|---|---|
columnId |
string |
Returns
void
toggleColumnVisibility()
toggleColumnVisibility(columnId): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:179
Parameters
| Parameter | Type |
|---|---|
columnId |
string |
Returns
void
toggleRowExpanded()
toggleRowExpanded(rowId): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:178
Parameters
| Parameter | Type |
|---|---|
rowId |
string |
Returns
void
toggleRowSelection()
toggleRowSelection(rowId): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:176
Parameters
| Parameter | Type |
|---|---|
rowId |
string |
Returns
void
toggleSort()
toggleSort(columnId): void;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:175
Parameters
| Parameter | Type |
|---|---|
columnId |
string |
Returns
void
Type Aliases
TableCallbacks
type TableCallbacks<TCondition> = object;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:21
Optional callback handlers that are invoked when table state changes.
These allow parent components to react to state mutations without using
external watch or $effect patterns.
Type Parameters
| Type Parameter |
|---|
TCondition |
Properties
TableSortEntry
type TableSortEntry = typeof tableSortEntrySchema.Type;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:9
TCreateColumnProps
type TCreateColumnProps<T, TCondition> = Omit<ConstructorParameters<typeof ColumnAPI>["0"], "table">;Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:31
Type Parameters
| Type Parameter | Default type |
|---|---|
T extends Record<string, unknown> |
- |
TCondition |
unknown |
Variables
COLLECTION_TABLE_SELECTION_COLUMN_ID
const COLLECTION_TABLE_SELECTION_COLUMN_ID: "__selection";Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:10
Functions
withSelectionColumn()
function withSelectionColumn<TData, TCondition>(
cols,
enabled,
t?): TCreateColumnProps<TData, TCondition>[];Defined in: apps/website/.api-docs-entry/ui/build/collection-table/internal/collection-table-state.svelte.d.ts:208
Type Parameters
| Type Parameter | Default type |
|---|---|
TData extends Record<string, unknown> |
- |
TCondition |
unknown |
Parameters
| Parameter | Type |
|---|---|
cols |
TCreateColumnProps<TData, TCondition>[] |
enabled |
boolean |
t? |
any |
Returns
TCreateColumnProps<TData, TCondition>[]