UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

29 lines (28 loc) 1.54 kB
import type { Callback } from '../enums'; import type { EventValueOrEventCallback } from '../types/callbacks'; import type { Generic } from 'adopted-style-sheets'; import type { KoliBriSortDirection, KoliBriTableDataType, KoliBriTableSelectionKeys } from '../types'; import type { TableHeaderCells } from './table-header-cells'; export type SortEventPayload = { key: string; currentSortDirection: KoliBriSortDirection; }; export type SelectionChangeEventPayload = KoliBriTableSelectionKeys; export type StatefulSelectionChangeEventPayload = KoliBriTableDataType[] | null; export type ChangeHeaderCellsEventPayload = TableHeaderCells; export type TableCallbacksPropType = { [Callback.onSort]?: EventValueOrEventCallback<MouseEvent, SortEventPayload>; [Callback.onSelectionChange]?: EventValueOrEventCallback<Event, SelectionChangeEventPayload>; [Callback.onChangeHeaderCells]?: EventValueOrEventCallback<Event, ChangeHeaderCellsEventPayload>; }; export type TableStatefulCallbacksPropType = { [Callback.onSelectionChange]?: EventValueOrEventCallback<Event, StatefulSelectionChangeEventPayload>; }; export type PropTableCallbacks = { on: TableCallbacksPropType; }; export type StatefulPropTableCallbacks = { on: TableStatefulCallbacksPropType; }; export declare const validateTableCallbacks: (component: Generic.Element.Component, value?: TableCallbacksPropType) => void; export declare const validateTableStatefulCallbacks: (component: Generic.Element.Component, value?: TableStatefulCallbacksPropType) => void;