PrimeBrickPrimeBrick
  • Docs
  • Contact
  • MIT License
  • Documentation
  • MCP Server
  • API Catalog
  • Services
  • Libraries
PrimeBrickPrimeBrick

© 2026 PrimeBrick. MIT License. v3.8.0

github
Backend
Frontend
    OverviewGetting startedUI stackApp shell & sidebarAuthentication & sessionsSystem settingsUI componentsUI patterns
    Components
      Entity list tableComboSelectDynamicIconColorSelectorAvatarPreviewEventCardCommandPaletteAppShellAppSidebarAppTopbarAppPageLayoutAppPageScaffoldAppPageBreadcrumbAppServerBannerBrowserClientInfoLangSelectThemeToggleSidebarHealthBadgeSidebarModuleSwitcherSidebarOrgSwitcherSidebarProfileMenuSidebarVersionBadgeButton (async)FormPageLayoutFormLabelWithHelpFormLabelWithPriorityHelpPasswordChecklistChoiceboxDateWheelPickerEventToastLoadingBarMetadataLoadingJsonTableViewerDialogBorderedRFCErrorDialogLoginFormPasskeyButtonPasskeyEnrollmentAuthMethodsPromptDialogSessionExpiredDialogInputTooltipForm
    API Reference
Microservices
powered by Zudoku
Components

Entity list table

EntityListTable is the generic, reusable component every module uses to render entity lists. It is generic over a row type TRow extends Record<string, unknown> and lives in src/lib/components/entity-list-table/.

Component overview

The component is controlled: the parent route owns the data and most state (rows, page, search, sort, filters, selection) and passes them in as props with on*Change callbacks. A few props (selectedKeys, filtersOpen, deletionFilterMode, datetimeIanaModeByKey) are bindable for two-way sync.

Key props

GroupProps
Identityuid, entity, columnOrderStorageKey, filterValuesStorageKey, advancedFiltersStorageKey
ColumnsstickyColumns, dataColumns, auditingColumns, columns (back-compat), viewVisibility
Datarows, total, metaLoading, rowsLoading, error
Paginationpage, pageSize, pageSizeOptions, onPageChange, onPageSizeChange
Searchsearch, onSearchInput, searchInKeys, onSearchInKeysChange, searchPlaceholderKey
SortingsortKey, sortDir, onSortChange, defaultSort
Column visibilityvisibleKeys, onVisibleKeysChange, onResetColumnVisibility
SelectionselectedKeys (bindable), onSelectedKeysChange, rowSelectionEnabled
ActionsonRefresh, rowActions (snippet), entityRowActions, customActionHandlers, onCreateAction, onEditAction
FiltersfiltersOpen (bindable), filterValues, onFilterValuesChange, advancedFilters, onAdvancedFiltersChange
Deletion filterdeletionFilterMode (bindable), onDeletionFilterModeChange
Customizationcell (snippet), metaLoadingView, rowsLoadingView, emptyView, errorView

The preferred column shape splits columns into stickyColumns, dataColumns, and auditingColumns groups; the flat columns array is kept for backwards compatibility.

Composable architecture

Behavior is split into 18 composables under composables/, each following the composable state exposure pattern (read-only state getter, mutator functions, individual $derived getters).

ComposableResponsibility
useColumnOrderColumn ordering within sticky/data/auditing groups; persists to sessionStorage
useViewModetable / cards / cards_list mode; persists to sessionStorage
useDeletionFilternon_deleted / deleted / all mode; persists to sessionStorage
useToolbarModeAuto-switches toolbar between filters and bulk modes
useSelectionBasic toggle/select-all/clear logic
useClientSelectionSelected-only view with client-side pagination
useRowRangeSelectionMouse-drag brush selection across rows
useFiltersBasic filter values object
useAdvancedFiltersAdvanced filter builder with operators and AND/OR connector
useSortingSort direction toggling (asc → desc → null)
useKeyboardNavigationArrow keys, space, enter, escape shortcuts
useStickyColumnsSticky column positioning
useScrollPreservationPreserves scroll position across re-renders
useSheetPanelManagementTracks last opened panel; coordinates with global SheetHost
useSheetPanelsOrchestrates columns/filters/search-in panels
useDialogsCentralized dialog open/close state
useBulkActionsBulk delete/restore/duplicate via /api/v1/entities/{entity}/bulk-*
useRowActionsSingle-row edit/preview/delete/restore/duplicate
useExportXLSX/CSV export with HTML preview; /api/v1/entities/{entity}/export
usePreviewPanelPreview row, inline edit mode, prev/next navigation

View modes

Three view modes: table, cards, cards_list. The active mode is stored in sessionStorage under {columnOrderStorageKey}:viewMode (fallback pb.entityList:{uid}:viewMode). The toolbar's ViewModeToggle switches between them. Rendering is handled by EntityListTableTableView and EntityListTableCardView.

Per-view column visibility is controlled by the viewVisibility prop, a ListMetaViewVisibility mapping each view name to a ViewVisibilityConfig (visible, hidden, notDisplayable, notHideable).

Selection model

Two complementary models:

  • Server selection (default) — selectedKeys is owned by the parent and persists across page navigation. Used for server-side bulk operations and export.
  • Client selection (selected-only view) — useClientSelection maintains a Map<string, TRow> of selected rows and provides client-side pagination for the selected-only view. It automatically exits this view on server reload, when selection empties, or when row selection is disabled.

Selection interactions: row checkboxes, header select-all, mouse-drag range selection (useRowRangeSelection), and keyboard space to toggle the focused row. The toolbar auto-switches to bulk mode when items are selected.

Dialogs

All dialogs are centralized through useDialogs and rendered as separate Svelte components in dialogs/:

DialogAction
DeleteDialogSingle-row soft delete
RestoreDialogSingle-row restore
DuplicateDialogSingle or bulk duplicate (50-item limit for bulk)
BulkDeleteDialogBulk soft delete
BulkRestoreDialogBulk restore
ExportDialogExport format (XLSX/CSV) and scope (selected/all)
ExportPreviewDialogHTML export preview (PDF/email modes)
HtmlExportDialogHTML export confirmation

On success, dialogs refresh the list, clear selection, close, and switch the toolbar back to filters mode. Errors go through pushNotification.

Sheet panels

Panels are mounted via the global SheetHost (see App shell) and orchestrated by useSheetPanels:

Panel IDComponentPurpose
entity.columnsColumnsPanelColumn visibility checkboxes + drag-and-drop reordering within groups
entity.filtersFiltersPanelBasic filters + advanced filter builder with operators (=, !=, >, <, >=, <=, contains, startsWith, endsWith, BETWEEN) and AND/OR connector
entity.searchInSearchInPanelToggles which columns are included in search
previewPreviewPanelFull row preview with inline editing and prev/next navigation
version historyVersionHistoryPanelAudit trail from /api/v1/entities/{entity}/{uuid}/audit with a timeline UI

Column types

MetaColumn defines a column. Key fields:

FieldPurpose
keyColumn identifier
labelKeyi18n key for the header label
typetext, badge, date, datetime, color, ...
sortable, searchable, filterable, hideableCapability flags
defaultVisibleShown by default
stickyPinned to the left
badgePer-value { labelKey, labelText, color } mapping
datetimeIanaToggle{ recordIanaField } for IANA timezone toggle
tooltip, tooltipPriority, tooltipTitleTooltip configuration

Utility functions in src/lib/entity-list/types.ts: orderedColumnsFromListMeta(), defaultVisibleColumnKeys(), sanitizeVisibleKeys(), getOperatorsForColumnType().

Persistence

User preferences are persisted to sessionStorage (cleared when the tab closes): column order, view mode, filter values, deletion filter mode, and datetime IANA toggle mode. Storage keys are derived from columnOrderStorageKey / filterValuesStorageKey / advancedFiltersStorageKey props so each list instance has its own namespace.

Next steps

  • Component catalog — every custom/wrapped component
  • System settings — where EntityListTable is used for the users list
  • UI components — custom components on top of Shadcn-Svelte™
  • API reference — full prop tables for every component
Last modified on July 26, 2026
UI patternsComboSelect
On this page
  • Component overview
  • Key props
  • Composable architecture
  • View modes
  • Selection model
  • Dialogs
  • Sheet panels
  • Column types
  • Persistence
  • Next steps