Skip to content

ui/build/collection-form/collection-form.types

ui/build/collection-form/collection-form.types

Interfaces

CollectionFormComposition

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

Type Parameters

Type Parameter
TCollections extends CollectionRegistry
TName extends CollectionFormName<TCollections>

Properties

Field
Field: CollectionFormFieldComponent<Exclude<Extract<keyof CollectionRow<TCollections[TName]>, string>,
  | "id"
  | "created_at"
  | "updated_at"
  | "sys_period"
  | "row_version"
| "approval_id">>;

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

form
form: CollectionFormController;

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


CollectionFormController

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

Properties

setValues
readonly setValues: (values) => void;

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

Parameters
Parameter Type
values CollectionFormValidationValues
Returns

void

values
readonly values: () => CollectionFormValidationValues;

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

Returns

CollectionFormValidationValues


CollectionFormDeleteAction

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

Properties

disabled?
readonly optional disabled?: boolean;

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

label?
readonly optional label?: string;

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

onDelete
readonly onDelete: () => void | Effect<void, never, never>;

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

Returns

void | Effect<void, never, never>


CollectionFormFieldComponent()

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

Field as handed to form composition snippets. Callable shape, so svelte-check accepts it as a component; the generic lets each usage instantiate TRendererProps from renderer={...} so rendererProps stays typed.

Type Parameters

Type Parameter Default type
TFieldName extends string string
CollectionFormFieldComponent<TRenderer>(
   this,
   internals,
   props): object;

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

Field as handed to form composition snippets. Callable shape, so svelte-check accepts it as a component; the generic lets each usage instantiate TRendererProps from renderer={...} so rendererProps stays typed.

Type Parameters

Type Parameter Default type
TRenderer extends Component<never, { }, string> Component<CollectionFormRendererProps, { }, string>

Parameters

Parameter Type
this void
internals Brand
props CollectionFormFieldProps<TFieldName, TRenderer>

Returns

object

Constructors

Constructor
new CollectionFormFieldComponent<TRenderer>(options): SvelteComponent<CollectionFormFieldProps<TFieldName, TRenderer>>;

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

Parameters
Parameter Type
options ComponentConstructorOptions<CollectionFormFieldProps<TFieldName, TRenderer>>
Returns

SvelteComponent<CollectionFormFieldProps<TFieldName, TRenderer>>

Properties

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

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

Returns

HTMLElement

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

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


CollectionFormFieldProps

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

Type Parameters

Type Parameter Default type
TFieldName extends string string
TRenderer extends Component<never> Component<CollectionFormRendererProps>

Properties

class?
optional class?: string;

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

description?
optional description?: string;

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

One sentence on what this field decides, shown as a tooltip behind an info icon beside the label. The form never prints it inline: a description laced between fields is read once and then becomes clutter the next time a reader passes it.

descriptionExtra?
optional descriptionExtra?: Snippet<[]>;

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

Richer body for the same tooltip, below the description sentence: a compile-fault note, the members an expression may read. The sentence stays the sentence; this is what would have been a paragraph or a link under the control.

disabled?
optional disabled?: boolean;

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

hidden?
optional hidden?: boolean;

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

Registered without a visual control; custom composition or a collection hook owns the value.

label?
optional label?: string;

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

name
name: TFieldName;

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

placeholder?
optional placeholder?: string;

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

readonly?
optional readonly?: boolean;

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

relationOptions?
optional relationOptions?: CollectionRelationOptions<CollectionRecord>;

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

Contextual option-set configuration for the automatic relationship renderer.

renderer?
optional renderer?: TRenderer;

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

rendererProps?
optional rendererProps?: any;

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


CollectionFormProps

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

Type Parameters

Type Parameter
TCollections extends CollectionRegistry
TName extends CollectionFormName<TCollections>

Properties

children
children: Snippet<[CollectionFormComposition<TCollections, TName>]>;

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

Every writable collection field must be declared exactly once; use hidden to conceal one.

class?
optional class?: string;

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

client
client: CollectionDbClient<TCollections, TName>;

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

collection
collection: TName;

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

defaultValues?
optional defaultValues?: Partial<CollectionRow<TCollections[TName]>>;

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

The row being edited, or a partial seed for a new one.

This alone decides create vs. update: a value carrying the framework's row key is an existing record, anything else is a draft. There is deliberately no recordId prop — it was always the same id the caller had just dug out of this record, and every authored +representation.svelte threaded it back by hand. An optional override would be an escape hatch that silently re-legalises reaching into framework-owned fields from authored source.

deleteAction?
optional deleteAction?: CollectionFormDeleteAction;

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

disabled?
optional disabled?: boolean;

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

failure_message?
optional failure_message?: string;

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

Opt-in failure toast text; silent when omitted.

loading?
optional loading?: boolean;

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

notice?
optional notice?: "header" | "inline";

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

Where the resolved record-state notice (read-only lock, pending approval) renders. inline keeps it at the top of the form; header hands it to the record sheet's header when one is mounted above.

onAfterSubmit?
optional onAfterSubmit?: () => void | Effect<void, never, never>;

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

Returns

void | Effect<void, never, never>

readonly?
optional readonly?: boolean;

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

Display-only: every field renders its display branch, and the footer — save, clear, delete — is absent. Distinct from disabled, which keeps the form's controls and mutes them.

recordMetadata?
optional recordMetadata?: readonly CollectionRecordMetadata[];

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

Application-authored behaviour and flags for this record. System metadata is injected.

semantic?
optional semantic?: CollectionFormSemantic;

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

Cross-field or domain validation that may perform asynchronous checks.

sendDebounceMs?
optional sendDebounceMs?: number;

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

Debounce for auto send, in milliseconds.

sendMode?
optional sendMode?: "manual" | "auto";

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

Manual shows the footer submit button; auto saves debounced when fully valid.

skeletonRows?
optional skeletonRows?: number;

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

submitLabel?
optional submitLabel?: string;

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

success_message?
optional success_message?: string;

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

Opt-in success toast text; silent when omitted.


CollectionFormRendererProps

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

Extends

Properties

field
field: CollectionField;

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

onValueChange
onValueChange: (value) => void;

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

Parameters
Parameter Type
value unknown
Returns

void

row
row: Record<string, unknown>;

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

Current form record, including unsaved sibling-field values.

value
value: unknown;

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

Type Aliases

CollectionFormName

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

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

Type Parameters

Type Parameter
TCollections extends CollectionRegistry

CollectionFormSemantic

type CollectionFormSemantic = (values) => Effect.Effect<
  | readonly CollectionFormValidationIssue[]
| void>;

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

Parameters

Parameter Type
values CollectionFormValidationValues

Returns

Effect.Effect< | readonly CollectionFormValidationIssue[] | void>


CollectionFormValidationIssue

type CollectionFormValidationIssue = typeof collectionFormValidationIssueSchema.Type;

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


CollectionFormValidationValues

type CollectionFormValidationValues = object;

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

Index Signature

[field: string]: unknown