跳到主要内容

ui/build/collection-toolbar/collection-toolbar.types

ui/build/collection-toolbar/collection-toolbar.types

Interfaces

CollectionActionToolbarProps

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:126

Type Parameters

Type Parameter Default type
TCollections extends CollectionRegistry -
TName extends CollectionToolbarName<TCollections> -
TRow extends object CollectionRow<TCollections[TName]>

Properties

about?
optional about?: CollectionToolbarAbout;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:137

actions?
optional actions?: Snippet<[CollectionToolbarComposition<NoInfer<TRow>>]>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:153

Mutating actions, placed at the trailing edge.

client
client: CollectionDbClient<TCollections>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:127

collection
collection: TName;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:128

disabled?
optional disabled?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:143

features?
optional features?: CollectionToolbarFeatures;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:144

filterPersistenceKey?
optional filterPersistenceKey?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:148

View key a cleared seed is remembered against.

filters?
optional filters?: Snippet<[CollectionToolbarComposition<NoInfer<TRow>>]>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:151

Derived-predicate controls, placed in the filter popover above the builder.

initialFilters?
optional initialFilters?: readonly CollectionTableInitialFilter[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:146

Conditions the view opens with, seeded into the builder as removable rows.

optional navigation?: Snippet<[]>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:142

The scope the surface is pinned to and can step through — a month, a period, a legal entity. Placed at the leading edge, before search, on every surface.

operations?
optional operations?: CollectionToolbarOperations<NoInfer<TRow>>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:149

query
query: CollectionQueryState<TRow>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:135

The query model the search box and the filter popover write to.

Owned by the surface rather than the toolbar, because the surface is what runs the query. The filter paths a surface may set are checked against the row type this state was created with.

title?
optional title?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:136


CollectionToolbarAbout

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:104

What the view applies on the operator's behalf, shown behind the toolbar's info button.

Properties

applied?
readonly optional applied?: readonly string[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:107

Conditions the view pins that the operator cannot see in the filter builder.

appliedContent?
readonly optional appliedContent?: Snippet<[]>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:109

Schema-aware rendering for pinned conditions whose values are not plain text.

description?
readonly optional description?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:105


CollectionToolbarActionProps

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:64

Properties

icon?
optional icon?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:67

Iconify name. With iconOnly, the label becomes the accessible name.

iconOnly?
optional iconOnly?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:68

label
label: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:65

onRun
onRun: () => void | Effect<void, unknown, never>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:82

Returns

void | Effect<void, unknown, never>

pending?
optional pending?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:71

Shows a spinner and refuses re-entry while the action is in flight.

unavailable?
optional unavailable?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:81

Why this action cannot be run right now, in the operator's words.

A refusal is a fact about the record, not about the button: "the month is published, so it cannot take an import" is the same sentence whether the operator reads it from the toolbar or from the pipeline panel. Given here it disables the control and states the reason where both a pointer and a screen reader reach it — a title attribute does neither reliably, and a bare disabled button leaves the operator guessing which precondition they missed.

variant?
optional variant?: CollectionToolbarActionVariant;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:69


CollectionToolbarComposition

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:120

Type Parameters

Type Parameter
TRow extends object

Properties

Action
Action: Component<CollectionToolbarActionProps>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:122

Filter
Filter: CollectionToolbarFilterComponent;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:121

query
query: CollectionQueryState<TRow>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:124

The one search + filter + page model this toolbar drives.


CollectionToolbarFeatures

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:111

Properties

filter?
readonly optional filter?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:118

The schema-derived filter builder. Declared Filter controls are unaffected — a surface whose conditions are all derived turns the builder off and still gets the filter popover.

readonly optional search?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:113

Free-text search over the collection's text fields.


CollectionToolbarFilterComponent()

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:44

Filter as handed to the toolbar's filter composition. Callable (the Svelte 5 component shape) so svelte-check accepts it as a component; the generic lets each usage instantiate TValue from options so value and onValueChange stay tied to the same union.

CollectionToolbarFilterComponent<TValue>(
   this,
   internals,
   props): object;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:45

Filter as handed to the toolbar's filter composition. Callable (the Svelte 5 component shape) so svelte-check accepts it as a component; the generic lets each usage instantiate TValue from options so value and onValueChange stay tied to the same union.

Type Parameters

Type Parameter Default type
TValue extends string string

Parameters

Parameter Type
this void
internals Brand
props CollectionToolbarFilterProps<TValue>

Returns

object

$on()?
optional $on(type, callback): () => void;
Parameters
Parameter Type
type string
callback (e) => void
Returns

() => void

$set()?
optional $set(props): void;
Parameters
Parameter Type
props Partial<CollectionToolbarFilterProps<TValue>>
Returns

void

Properties

element?
optional element?: () => HTMLElement;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:49

Returns

HTMLElement

z_$$bindings?
optional z_$$bindings?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:50


CollectionToolbarFilterDeclaration

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:53

A registered Filter, with its authored props kept live by getters.

Properties

id
readonly id: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:54

label
readonly label: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:55

options
readonly options: readonly CollectionToolbarFilterOption<string>[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:56

placeholder?
readonly optional placeholder?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:58

searchable?
readonly optional searchable?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:60

searchPlaceholder?
readonly optional searchPlaceholder?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:59

value
readonly value: string | null;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:57

Methods

change()
change(value): void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:61

Parameters
Parameter Type
value string | null
Returns

void


CollectionToolbarFilterOption

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:7

Type Parameters

Type Parameter Default type
TValue extends string string

Properties

description?
readonly optional description?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:10

label
readonly label: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:9

search_term?
readonly optional search_term?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:12

Extra text a searchable control matches on, beyond the label.

value
readonly value: TValue;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:8


CollectionToolbarFilterProps

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:27

A filter control for a predicate the collection has no field for.

The schema filter builder can only address what the collection stores. A surface that derives its own facts — "this person has a day rostered on shift N", "this month is still drafted" — has nothing for the builder to point at, and every such surface has so far grown its own popover, its own active-count badge and its own "clear all". Declaring the control instead puts it in the same popover, under the same count, cleared by the same button, and resets the page on change like every other narrowing does.

TValue is inferred from options, so onValueChange receives the surface's own union rather than a bare string it has to re-narrow.

Type Parameters

Type Parameter Default type
TValue extends string string

Properties

id
id: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:29

Stable identity for the control, used to key it and to label its combobox.

label
label: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:30

onValueChange
onValueChange: (value) => void;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:37

Parameters
Parameter Type
value TValue | null
Returns

void

options
options: readonly CollectionToolbarFilterOption<TValue>[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:31

placeholder?
optional placeholder?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:34

Shown when nothing is selected; reads as the unfiltered case ("Any status").

searchable?
optional searchable?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:36

searchPlaceholder?
optional searchPlaceholder?: string;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:35

value
value: TValue | null;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:32


CollectionToolbarOperations

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:90

Import, export and integrations, as the shared operations menu takes them.

fields is deliberately absent: the toolbar has the client and the collection name, so it reads the field list from the same definition the filter builder does.

Type Parameters

Type Parameter
TRow extends object

Properties

disabled?
readonly optional disabled?: boolean;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:101

Refuses the menu on its own without taking search and filters down with it.

exportPipelines?
readonly optional exportPipelines?: readonly CollectionTablePipeline<TRow>[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:91

importPipelines?
readonly optional importPipelines?: readonly CollectionTablePipeline<TRow>[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:92

integrations?
readonly optional integrations?: readonly CollectionTableIntegrationStatus[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:93

selectedRows?
readonly optional selectedRows?: readonly TRow[];

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:94

selectionControls?
readonly optional selectionControls?: object;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:95

allSelected
readonly allSelected: boolean;
totalRows
readonly totalRows: number;
toggleAll()
toggleAll(): void;
Returns

void

Type Aliases

CollectionToolbarActionVariant

type CollectionToolbarActionVariant = "default" | "outline" | "ghost" | "destructive";

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:63


CollectionToolbarName

type CollectionToolbarName<TCollections> = Extract<keyof TCollections, string>;

Defined in: apps/website/.api-docs-entry/ui/build/collection-toolbar/collection-toolbar.types.d.ts:6

Type Parameters

Type Parameter
TCollections extends CollectionRegistry