Appearance
Home > @liquidrazor/list-display
list-display package
Functions
Function | Description |
|---|---|
Applies filters to a list of rows and returns the filtered array. | |
Slices the rows according to the pagination state. | |
Applies a single data patch to the current list of rows. | |
Applies a list of patches in order. | |
Applies sorting to a list of rows. | |
Builds a predicate that evaluates whether a row passes all active filters. | |
Builds an immutable snapshot of the current list state. | |
Creates a query-based data source (single-shot load + optional refresh). | |
Initializes a selection state. | |
Creates a simple, static data source that just returns an initial snapshot of rows and does not stream patches. | |
Creates a streaming data source (e.g. SSE, WebSocket, RTSK, NDJSON). | |
Extracts the id from a row based on the configured idKey. | |
Recomputes pagination metadata based on the current rows. | |
Core hook that encapsulates the data-management logic for ListDisplay. It wires a DataSource, schema metadata, and optional actions into a cohesive state machine that can be consumed by UI components. |
Interfaces
Interface | Description |
|---|---|
Tracks which action is currently active in the UI, optionally tied to a row. | |
Configuration for the built-in confirmation modal used by actions that need a simple yes/no flow. | |
Configuration for a user-supplied modal renderer, allowing bespoke flows while still participating in the ListDisplay action lifecycle. | |
Context provided to a custom modal renderer. Extends general context and optionally carries row info. | |
Generic, technology-agnostic data source contract. Wraps parent-provided data, streams, queries etc. | |
Per-field filter configuration. | |
Column/field definition for the list. | |
Option used by select-based filters. | |
Props for the filters panel slot. This component is expected to surface controls for adjusting the active filter set. | |
Mapping of overridable UI components ("slots"). Relaxed typing here since you control any overrides. | |
Public configuration accepted by ListDisplay. | |
Exported snapshot of the list, meant to be consumed by the parent only on demand (not continuously controlled). | |
Full internal state of the list. | |
UI-specific state (separate from data state). | |
Props forwarded to the modal outlet slot which orchestrates confirmation or custom modals associated with actions. | |
State for the modal experience tied to actions. | |
Props for the pagination controls slot. | |
Pagination metadata describing both the current paging parameters and the total counts when known. | |
Tracks the current selection configuration and the ids that are selected. | |
Props for the sort bar slot. This surface exposes the fields that can be sorted alongside a handler to update the current sort descriptor. | |
Describes the active sort configuration for the list. | |
Minimal props shared by the various status state components such as loading, empty, or error states. | |
Props for the table slot responsible for rendering the visible rows. | |
Props passed to the toolbar slot component. This surface focuses on triggering list-level actions and therefore exposes the current list state and the available general actions. | |
Contract returned by useListCore(). It aggregates the current list state as well as callbacks to mutate filters, sorting, pagination, and selection. Action-oriented handlers are also exposed to keep the UI layer thin and declarative. |
Variables
Variable | Description |
|---|---|
Very small, unstyled confirm modal. Styling is left to consumer via CSS classes. | |
Basic container for the list layout. | |
High-level component that renders the entire ListDisplay experience using the core hook for state management and a set of slot-based components for the UI. Consumers can override any slot via the ListConfig.components map while still benefiting from the built-in behaviours. | |
Minimal filters panel (placeholder). | |
Default modal outlet implementation. Supports: - Confirm modal (ModalConfig.type === "confirm") For custom modals (ModalConfig.type === "custom"), consumers are expected to override this component via the "ModalOutlet" slot and handle rendering themselves. | |
Basic pagination controls. | |
Minimal sort bar: renders a dropdown of sortable fields. | |
Default table layout for the list. | |
Default toolbar: renders general actions as buttons. |
Type Aliases
Type Alias | Description |
|---|---|
Active filters at list level. Keyed by field id (or custom logical id). | |
Operators supported by the filtering engine. | |
Logical filter types used to match operators and value shapes. | |
Optional props bag for slot components keyed by the slot name. This allows consumers to feed ad-hoc properties into overridden components while keeping the core library agnostic of their shape. | |
Props forwarded to ListDisplay. They mirror ListConfig and therefore describe the full data, schema, and action configuration for the list. | |
Status values representing the lifecycle of the list data layer. | |
Union describing the supported modal configurations for actions. | |
Identifier type accepted by selection helpers. | |
Available selection modes for the list component. | |
Direction used when sorting rows. | |